Presentation is loading. Please wait.

Presentation is loading. Please wait.

TCP/IP Basic Theory V1.2. Course Outline OSI model and layer function TCP/IP protocol suite Transfer Control Protocol Internet Protocol Address Resolution.

Similar presentations


Presentation on theme: "TCP/IP Basic Theory V1.2. Course Outline OSI model and layer function TCP/IP protocol suite Transfer Control Protocol Internet Protocol Address Resolution."— Presentation transcript:

1 TCP/IP Basic Theory V1.2

2 Course Outline OSI model and layer function TCP/IP protocol suite Transfer Control Protocol Internet Protocol Address Resolution Protocol

3 N.Y.Pekin TomJim Post network To Jim Post code Destination address stamp Post system

4 TCP/IP First used protocol suite Universal De-facto standard Internet standard communication Host A Internet TCP/IP Host B

5 Data layer Transport Data link Network Physical OSI Model Upper layer session Presentation Application Layer7 Layer6 Layer5 Layer4 Layer3 Layer2 Layer1

6 Telnet FTP ASCII EBCDIC JPEG Keep different applications independent Authentication Example Session Upper Layer function Network User Interface Application Presentation Present data Encryption, decryption

7 TCP UDP SPX 802.3 / 802.2 HDLC EIA/TIA-232 V.35 IP IPX Example Data layer function Transport Network Data Link Physical Reliable and Unreliable transfer Use retransmission to ensure reliability Combine bit to byte and byte to frame Access media by MAC address Error detection without error correction Provide logical address and path-finding method for the working of routers Transfer bit between devices Define voltage, bit rate, physical connection

8 Upper Layer Data TCP Header IP Header 0101110101001000010 MAC+LLC Header Segment Packet Bits Frame PDU FCS Data Encapsulation Transport Data Link Physical Network Presentation Application Session Upper Layer Data

9 MAC+LLC Header IP + TCP + Upper Layer Data TCP+ Upper Layer Data IP Header Upper Layer Data TCP Header 0101110101001000010 Transport Data Link Physical Network Presentation Application Session Data Decapsulation

10 Course Outline OSI model and layer function TCP/IP protocol suite Transfer Control Protocol Internet Protocol Address Resolution Protocol

11 Application Presentation Session Transport Network Data Link Physical Application Transport Internet Data Link TCP/IP model vs OSI model

12 Application Data Link TCP FTPFTP TELNETTELNET DNSDNS TFTPTFTP SMTPSMTP UDP 2123255369161 IP 176 SNMPSNMP Application Transport Internet Data Link ARPICMP Ethernet II (RFC 894 ) 08000806 1 TCP/IP Protocol Suite

13 Course Outline OSI Model and Layer Function TCP/IP Protocol Suite Transfer Control Protocol Internet Protocol Address Resolution Protocol

14 Transport Layer Segment upper layer data Establish end to end connection Ensure the reliability of data transfer Logical connection

15 TCP Protocol Source port (16) Destination port (16) Sequence number (32) Header length (4) Acknowledgement number (32) Reserved (6) Code bits (6) Window (16) Checksum (16)Urgent (16) Options (0 or 32 if any) Data (varies) 20 Bytes Bit 0 Bit 15Bit 16Bit 31

16 well-known port number :1-1023 common port number: 1024-65535 Port Number range Application TCP FTPFTP TELNETTELNET DNSDNS TFTPTFTP SMTPSMTP UDP 2123255369161 SNMPSNMP Application Transport Application Transport Internet Data Link

17 Source Port Number Destination Port Number client 102823 SPDP Telnet Z Process #1 Port Number function Destination port = 23 Send packet to my Telnet application server 102923 Telnet Z Process #2 Port multiplexing

18 SenderReceiver Send 2 Send 1 Send 3 Ack 4 Send 5 Send 4 Send 6 Retransfer 5 Send 5 Ack 7 123456123456 Sequence and Ack Number

19 Code Bits URG: Urgent Pointer field significant ACK: Acknowledgment field significant PSH: Push function RST: Reset the connection SYN: Synchronize sequence numbers FIN: No more data from sender URGURG PSHPSH RSTRST SYNSYN FINFIN ACKACK

20 Window size = 1 Send 1 Receive 1 Ack 2 Send 2 Receive 2 Ack 3 Send 1 Send 2 Receive 1 Receive 2 Window size = 3 Send 3 Receive 3 Ack 4 Send 4 SenderReceiver SenderReceiver Window control

21 Establish connection (synchronize) Data transfer (Send Segments) SenderReceiver Connection-oriented session Tear down connection 1 3 2 TCP connection

22 Send SYN (seq=100 ctl=SYN) SYN received Send SYN, ACK (seq=300 ack=101 ctl=SYN,ACK) Established (seq=101 ack=301 ctl=ACK) Host AHost B 1 2 3 SYN received Establish Connection TCP Three Way Handshake/Open Connection Established

23 1028 23 SourceDest. 103103 Seq. 302 Ack. 1028 23 SourceDest. 102102 Seq. 301 Ack. 1028 23 SourceDest. 103103 Seq. 301 Ack. 1028 23 SourceDest. 104104 Seq. 302 Ack. Data transfer SPDPSeq. #Ack. # Host AHost B Upper layer data

24 ACK to FIN FIN Close application Host A Host B Close application Tear down connection TCP four way handshakes/connection terminating 1 2 3 4

25 UDP Protocol No sequence and acknowledgement Unreliable and connectionless Efficient and fast Source port (16) Destination port (16) Length (16) Data (if any) Bit 0Bit 15Bit 16Bit 31 Checksum (16) 8 Bytes

26 TCPUDP Connection oriented Or connectionless Connection oriented connectionless Reliable or not Reliableunreliable With traffic Control Or not Traffic controlNo traffic control Transfer speed SlowFast overhead of protocol BigSmall TCP/UDP Comparison

27 Course Outline OSI Model and Layer Function TCP/IP Protocol Suite Transfer Control Protocol Internet Protocol Address Resolution Protocol

28 Data Link TCP UDP IP 176 Application Transport Internet Data Link ARPICMP 1 Internet/Network layer Define logical address Provide path-finding method routers

29 IP packet format Version (4) Destination IP Address (32) Options (0 or 32 if any) Upper layer data (varies if any) 1 Bit 0 Bit 15Bit 16Bit 31 Header Length (4) Type of Service (8) Total Length (16) Identification (16) Flags (3) Fragment offset (13) Time to live (8) Protocol (8)Header checksum (16) Source IP Address (32) 20 Bytes

30 Type of Service field precedence DTR00 Bits 0-2: Precedence Bit 3: Delay Bit 4: Throughput Bit 5: Reliability Bits 6-7: Reserved for future use 037

31 MTU and fragmentation 015 16 17 18 Identification (16)Fragment offset (13) Flags(3) DFDF 0 MFMF Bit 16: Reserved, must be zero Bit 17: (DF)0=May fragment, 1=Don’t fragment Bit 18: (MF)0=Last fragment, 1=More fragment Host A Host B Ethernet MTU 1000 IP(1500) HDLCIP(750) HDLCIP(750) EthernetIP(750) EthernetIP(750) RARB

32 IP Address Host A Host B 172.16.2.1 10.250.8.11 172.16.2.110.6.24.2 Fei_1/1Fei_1/2 255 Dotted Decimal Maximum NetworkHost 255 128 64 32 16 8 4 2 1 11111111 Binary 07815 16 232431 128 64 32 16 8 4 2 1

33 ICMP Data Link IP Application Transport Internet Data Link ICMP 1

34 Host A I am here. ICMP echo reply Hi B, are you there? Host B ICMP echo request PING and reachability Host or port unreachable Network unreachable Destination Unreachable Is B reachable? ICMP echo request no yes

35 Time Exceeded and TTL Host A Host B A: Tracert 10.1.1.2 1: 172.16.1.1 2: 200.1.1.2 3: 10.1.1.2 10.1.1.2 10.1.1.1 200.1.1.1 200.1.1.2 172.16.1.2 172.16.1.1 RARB TTL=1 TTL=2 TTL=3

36 Course Outline OSI Model and Layer Function TCP/IP Protocol Suite Transfer Control Protocol Internet Protocol Address Resolution Protocol

37 Data link Layer Combine bit to byte and byte to frame Access media by physical address (MAC address) SAP associated with upper layer protocols type Error detection without error correction Data Link IP Application Transport Internet Data Link ARPICMP Ethernet II (RFC 894 ) 08000806 1

38 Data Src. AddrFCS Type Dest. Addr Variable Length 46-1500 2664 00.d0.d0 xx.xx.xx Sequence ID for NIC IEEE assign to Manufacturers Ethernet II frame (RFC 894) Preamble 8# Bytes 48-bits MAC Address

39 Address Resolution Protocol Map IP to MAC Local broadcast IP: 172.16.3.2 Ethernet: 0800.0020.1111 IP: 172.16.3.2 Ethernet: 0800.0020.1111 172.16.3.1 172.16.3.2 IP: 172.16.3.2 = ??? I got the packet, I will reply with my MAC address. I need the MAC address of IP 172.16.3.2 Host A Host B Other hosts

40 Packet process procedure FTP client ftp://10.66.1.100:21  I wanna download a file SP:1024 DP:21 Seq.100 Ack.200 FTP server SIP:10.66.1.1 DIP:10.66.1.100,TTL=100, DF, Protocol=7 SA:01-00-39 DA:01-00-4A type=0800 01010010100010101010101010100010110111000101001

41 Summarization OSI reference model TCP protocol suite Transport layer Network layer Data link layer

42


Download ppt "TCP/IP Basic Theory V1.2. Course Outline OSI model and layer function TCP/IP protocol suite Transfer Control Protocol Internet Protocol Address Resolution."

Similar presentations


Ads by Google