Chap 9 TCP/IP Andres, Wen-Yuan Liao Department of Computer Science and Engineering De Lin Institute...
-
Upload
elaine-ramsey -
Category
Documents
-
view
212 -
download
0
Transcript of Chap 9 TCP/IP Andres, Wen-Yuan Liao Department of Computer Science and Engineering De Lin Institute...
Chap 9 TCP/IPAndres, Wen-Yuan LiaoAndres, Wen-Yuan Liao
Department of Computer Science and EngineeringDepartment of Computer Science and Engineering
De Lin Institute of TechnologyDe Lin Institute of Technology
[email protected]@dlit.edu.tw
http://www.cse.dlit.edu.tw/~andreshttp://www.cse.dlit.edu.tw/~andres
Overview TCP/IP operation TCP/IP operation TCP/IP protocol stack TCP/IP protocol stack
componentcomponent Reliable and unreliable Reliable and unreliable
transport layer protocols transport layer protocols ICMP/ARP/RARPICMP/ARP/RARP
The TCP/IP Protocol Suite TCP/IP protocols & the OSI TCP/IP protocols & the OSI
modelmodel TThe application layerhe application layer The transport layerThe transport layer TCP and UDP segment formatTCP and UDP segment format Port numbers Port numbers Three-way handshakeThree-way handshake Acknowledgment & windowingAcknowledgment & windowing
TCP/IP protocols and the OSI model Defense Advanced Defense Advanced
Research Projects Agency Research Projects Agency (DARPA) (DARPA)
TCP/IP is the de facto TCP/IP is the de facto standard for internetwork standard for internetwork communications communications
TCP/IP
A universally available protocol A universally available protocol A useful reference for A useful reference for
understanding other protocols understanding other protocols BeBe important because the router important because the router
uses it as a configuration tooluses it as a configuration tool
TCP/IPThe layers most closely The layers most closely
affected by TCP/IP are Layer affected by TCP/IP are Layer 7, Layer 4, and Layer 3 7, Layer 4, and Layer 3
Enable communication Enable communication among any set of among any set of interconnected networksinterconnected networks
Application layer
Supports addressing protocols Supports addressing protocols and network managementand network management
Has protocols for file Has protocols for file transfer, e-mail, and remote transfer, e-mail, and remote loginlogin
translating names of domains and their publicly advertised network nodes into addresses
Translate names of domains into
addresses
WINS
Windows Internet Naming ServiceWindows Internet Naming Service Microsoft-developed standard for Microsoft-developed standard for
Microsoft Windows NT that Microsoft Windows NT that automatically associates NT automatically associates NT workstations with Internet domain workstations with Internet domain namesnames
HOSTS
A file created by network A file created by network administrators and maintained administrators and maintained on serverson servers
Be used to provide static Be used to provide static mapping between IP addresses mapping between IP addresses and computer namesand computer names
SMTP
Simple Mail Transport ProtocolSimple Mail Transport Protocol Governs the transmission of e-Governs the transmission of e-
mail over computer networksmail over computer networks Does not provide support for Does not provide support for
transmission of data other than transmission of data other than plain textplain text
SNMP
Simple Network Management Simple Network Management ProtocolProtocol
Provides a means to monitor and Provides a means to monitor and control network devices, and to control network devices, and to manage configurations, statistics manage configurations, statistics collection, performance and collection, performance and security security
FTP File Transfer ProtocolFile Transfer Protocol A reliable connection-oriented A reliable connection-oriented
service that uses TCP to transfer service that uses TCP to transfer files between systems that files between systems that support FTPsupport FTP
Supports bi-directional binary file Supports bi-directional binary file and ASCII file transfersand ASCII file transfers
TFTP
Trivial File Transfer ProtocolTrivial File Transfer Protocol A connectionless unreliable A connectionless unreliable
service service Be useful in some LANs Be useful in some LANs
because it operates faster than because it operates faster than FTP in a stable environmentFTP in a stable environment
HTTP Hypertext Transfer ProtocolHypertext Transfer Protocol Supports the exchange of Supports the exchange of
information on the WWWinformation on the WWW Supports many different file Supports many different file
types, including text, graphic, types, including text, graphic, sound, and videosound, and video
Troubleshooting protocols
TelnetTelnet PINGPING TracerouteTraceroute NBSTATNBSTAT NETSTATNETSTAT ipconfig/winipcfgipconfig/winipcfg
NBSTAT
To troubleshoot NetBIOS To troubleshoot NetBIOS name resolutionname resolution
Be used to view and remove Be used to view and remove entries from the name cacheentries from the name cache
NETSTAT
Provides information about Provides information about TCP/IP statisticsTCP/IP statistics
Be used to provide information Be used to provide information about the status of TCP/IP about the status of TCP/IP connections and summaries of connections and summaries of ICMP, TCP, and UDP ICMP, TCP, and UDP
ipconfig/winipcfg
View current network View current network settings for all ip (nic) settings for all ip (nic) adapters on a deviceadapters on a device
Be used to view the MAC Be used to view the MAC address, IP address, and address, IP address, and gateway gateway
Transport layer
End-to-end service (segment)End-to-end service (segment) Layer 4 data streamLayer 4 data stream
A logical connection between A logical connection between the endpoints of a networkthe endpoints of a network
Provides transport services Provides transport services from a host to a destinationfrom a host to a destination
TCP A connection-oriented, reliable A connection-oriented, reliable
protocolprotocolFlow control: sliding windowsFlow control: sliding windowsReliability: sequence numbers and Reliability: sequence numbers and
acknowledgmentsacknowledgmentsRe-sends/Virtual circuit Re-sends/Virtual circuit Provides guaranteed deliveryProvides guaranteed delivery
UDP Connectionless and unreliableConnectionless and unreliable Responsible for transmitting Responsible for transmitting
messagesmessagesNo software checking No software checking
Advantage: speedAdvantage: speed No acknowledgments/less traffic No acknowledgments/less traffic
is sent/making the transfer fasteris sent/making the transfer faster
Protocols using UDP
TFTPTFTPSNMPSNMP Network File System (NFS)Network File System (NFS) Domain Name System Domain Name System
(DNS)(DNS)
TCP and UDP port numbers
Use port numbers to pass Use port numbers to pass information to the upper layersinformation to the upper layers
Keep track of the different Keep track of the different conversations conversations
Well-known port numbersWell-known port numbers
Port numbers assignment
Numbers below 255 are for public Numbers below 255 are for public applicationsapplications
Numbers 255-1023 are assigned to Numbers 255-1023 are assigned to companies for marketable companies for marketable applicationsapplications
Numbers above 1023 are Numbers above 1023 are unregulatedunregulated
Originating source port numbers, usually some numbers larger than 1023, are dynamically assigned by the source host
Three-way handshake Connection establishmentConnection establishment
The two end stations must The two end stations must synchronize on each other's initial synchronize on each other's initial TCP sequence numbers (ISNs)TCP sequence numbers (ISNs)
Sequence numbers Sequence numbers Track the order of packets and to Track the order of packets and to
ensure that no packets are lostensure that no packets are lost
Simple acknowledgment and windowing To govern the flow of data To govern the flow of data
between devices, between devices, TCP uses TCP uses a peer-to-peer flow control a peer-to-peer flow control mechanismmechanism
Window size
The number of bytes that The number of bytes that are transmitted before are transmitted before receiving an receiving an acknowledgmentacknowledgment
Acknowledgments
TCP uses expectational TCP uses expectational acknowledgments, meaning acknowledgments, meaning that the acknowledgment that the acknowledgment number refers to the octet number refers to the octet expected nextexpected next
Sliding window
The The slidingsliding The window size is The window size is
negotiated dynamically negotiated dynamically during the TCP sessionduring the TCP session
A larger window size allows A larger window size allows more data to be transmittedmore data to be transmitted
Sequence and acknowledgment numbers
Each datagram is numbered Each datagram is numbered At the receiver, TCP reassembles At the receiver, TCP reassembles
the segments into a complete the segments into a complete messagemessage
If a sequence number is missing If a sequence number is missing in the series, that segment is in the series, that segment is retransmitted (timeout)retransmitted (timeout)
Layer 3 Concepts
TCP/IP and the Internet TCP/IP and the Internet LayerLayer
Diagram the IP datagramDiagram the IP datagram Internet Control Message Internet Control Message
Protocol (ICMP)Protocol (ICMP) How ARP worksHow ARP works
TCP/IP & the Internet Layer
ICMPICMP -- provides control and -- provides control and messaging capabilitiesmessaging capabilities
ARPARP -- IP addresses -- IP addresses -> -> the data the data link layer address link layer address
RARPRARP -- data link layer addresses -- data link layer addresses -> network addresses-> network addresses
IP Header VERSVERS -- version number -- version number HLENHLEN -- header length, in 32-bit words -- header length, in 32-bit words type of servicetype of service -- how the datagram -- how the datagram
should be handled should be handled total lengthtotal length -- total length (header + data) -- total length (header + data) identification, flags, frag offsetidentification, flags, frag offset -- --
provides fragmentation of datagrams to provides fragmentation of datagrams to allow differing MTUs in the internetworkallow differing MTUs in the internetwork
IP Header TTLTTL -- Time-To-Live -- Time-To-Live protocol protocol -- the upper-layer (Layer 4) -- the upper-layer (Layer 4)
protocol sending the datagram protocol sending the datagram header checksumheader checksum -- an integrity check -- an integrity check
on the headeron the header source source and and destination IP addressdestination IP address IP optionsIP options -- network testing, -- network testing,
debugging, security, and other optionsdebugging, security, and other options
Internet Control Message Protocol (ICMP) ICMP messages are carried ICMP messages are carried
in IP datagrams and are in IP datagrams and are used to send error and used to send error and control messagescontrol messages
How ARP works
ARP is used to resolve or map ARP is used to resolve or map a known IP address to a MAC a known IP address to a MAC sublayer address sublayer address
ARP cache ARP cache Local ARP Local ARP
Summary
TCP/IP and OSITCP/IP and OSIApplication protocols Application protocols Transport layer Transport layer ICMP, ARP, RARPICMP, ARP, RARP