Download presentation
Presentation is loading. Please wait.
Published bySolomon Bishop Modified over 9 years ago
1
1 Introduction to TCP/IP
2
2 OSI and Protocol Stack OSI: Open Systems Interconnect OSI ModelTCP/IP HierarchyProtocols 7 th Application Layer 6 th Presentation Layer 5 th Session Layer 4 th Transport Layer 3 rd Network Layer 2 nd Link Layer 1 st Physical Layer Application Layer Transport Layer Network Layer Link Layer Link Layer : includes device driver and network interface card Network Layer : handles the movement of packets, i.e. Routing Transport Layer : provides a reliable flow of data between two hosts Application Layer : handles the details of the particular application
3
3 Packet Encapsulation The data is sent down the protocol stack Each layer adds to the data by prepending headers 22Bytes20Bytes 4Bytes 64 to 1500 Bytes
4
4 Ethernet Computer Computer communication on same network Each device has unique MAC address (48-bit) example: 00-C0-4F-48-47-93 Ethernet Packet: Dest. address DataCRC Source address Type MAC: Media Access Control 6bytes 2bytes Preamble 8bytes64 - 1500bytes4bytes
5
5 ARP : Address Resolution Protocol ARP provides mapping 32bit IP address 48bit MAC address 128.97.89.153 00-C0-4F-48-47-93 ARP cache maintains the recent mappings from IP addresses to MAC addresses Protocol 1.ARP request broadcast on Ethernet 2.Destination host ARP layer responds
6
6 IP: Internet Protocol Unreliable … connectionless datagram delivery service Responsible for routing of data through intermediate networks and computers IP header: 1 :ICMP 6 :TCP 17 :UDP
7
7 IP Routing Routing Table Destination IP address IP address of a next-hop router Flags Network interface specification Application Transport Network Link Application Transport Network Link Network Link Source Destination Router
8
8 ICMP : Internet Control Message Protocol Used to report problems with delivery of IP Datagrams within an IP network Used by Ping, Tracerout commands Types and Codes Echo Request (type=8, code=0) Echo Reply(type=0, code=0) Destination Unreachable(type=3, code=0) Time Exceeded(type=11, code=0) : Time-to-Live =0 ICMP Message ICMP Data ICMP Header IP Header 4bytes20bytes TypeCodeChecksum 1byte 2bytes
9
9 TCP : Transmission Control Protocol Connection-Oriented, Reliable, Byte Stream Service Protocol 1.Set up connection 2.Transfer data 3.Close connection 012345678910101 1212 1313 1414 1515 1616 1717 1818 1919 2020 21212 2323 2424 2525 2626 2727 2828 2929 3030 3131 Source PortDestination Port Sequence Number Acknowledgement Number Data Offset ---- Window ChecksumUrgent Pointer Options (0 to 10 Words of 32 Bits) TCP Payload TCP Header Format
10
10 TCP : State Diagram
11
11 TCP : Connection HostClient Send SYN seq=x Receive SYN +ACK segment Send ACK y+1 Receive SYN segment Send SYN seq=y, ACK x+1 Receive ACK segment HostClient Send FIN seq=x Receive FIN + ACK segment Send ACK y+1 Receive FIN segment Send ACK x+1 Receive ACK segment Establishing a TCP Connection Closing a TCP Connection Receive ACK segment Send FIN seq=y, ACK x+1
12
12 TCP : Data transfer HostClient Send Packet 1 Start Timer Retransmit Packet1 Start Timer Packet should arrive ACK should be sent ACK would normally Arrive at this time Receive Packet 1 Send AXK 1 Time Expires Receive ACK 1 Cancel Timer Packet Lost Timer
13
13 HTTP : Hyper Text Transfer Protocol Stateless Transaction Protocol Each transaction creates a new connection Steps in Transaction 1.Establish connection 2.Request Method 3.Response Response Code 4.Close connection
14
14 HTTP Common Request Methods GET, PUT, POST Response Categories Informational:100 Successful:200 Redirection:300 Client Error:400 (eg. 404 Not found) Server Error:500
15
15 Example: Access www.ee.ucla.edu Http request GET “http://www.ee.ucla.edu” Http response 200 “” Initiate connection (hdshk) Package data (add TCP header) send http request packet Assemble response (break into several packets) Send http response packets send data to next hop Appl HTTP Transp TCP Net IP Link ethernet Close connection (hdshk) Relay data Client Server Router(s) Net IP Link ethernet Appl HTTP Transp TCP Net IP Link ethernet ARP to provide IP/MAC translation
16
16 References “ TCP/IP Illustrated, Volume 1 The Protocols “ by W. Richard Stevens (http://yenigul.net/tcpip)http://yenigul.net/tcpip “ Internet Working with TCP/IP Volume 1 ” by Douglas E. Comer “ Sams Teach Yourself TCP/IP in 24 Hours ” by Joe Casad. Published by Sams. (http://www.informit.com)http://www.informit.com
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.