5. OSI 7-Layer Model IP TCP/UDP Virtual End-to-end connectivity Path selection, Internetworking Error-free communication links Transmission of raw signal Mail, Web, etc. 1 3 2 4 5 6 7 Ethernet Data encryption,compression Managing sessions Funtionality Examples Layers Application Presentation Session Transport Network Data Link Physical
6. OSI 7-Layer Host Router Router Host End to end Hop by hop Application Presentation Session Transport Network Link Physical Network Link Link Network Link Link Physical Physical Application Presentation Session Transport Network Link
7. TCP/IP Model Host Router Router End to end No session or presentation layers in TCP/IP model Host Hop by hop Application Transport Network Link Physical Network Link Link Network Link Link Physical Physical Application Transport Network Link
8. Packet structure Trailer Header Header Header Application Transport Network Data Link Data Transport Layer Data Network Layer Data Link Layer Data
12. IPv4 Header Transport Layer Data… 0 4 8 16 32 IHL Type of Service Total Length Version Fragment Offset Identification Flags Time to Live Protocol Header Checksum Source Address Destination Address Padding Options
21. Look up Forwarding Table Destination =12.5.9.16 ------------------------------- payload Prefix Interface Next Hop 12.0.0.0/8 10.14.22.19 eth1 12.4.0.0/15 12.5.9.0/24 attached eth2 Serial 1/0/7 10.1.3.77 IP Forwarding Table 0.0.0.0/0 10.14.11.33 eth0 even better OK better best! Longest Prefix Match (Classless) Forwarding
22. IP Forwarding – Example 1 Forwarding Table on host 192.1.1.1 Note: 127.0.0.1 is the special address of the local interface 192.1.3.2 192.1.1.2 192.1.1.1 192.1.1.3 192.1.1.4 192.1.3.1 192.1.3.27
23. IP Forwarding – Example 2 Forwarding Table on host 192.1.1.1 Note: 127.0.0.1 is the special address of the local interface 192.1.3.2 192.1.1.2 192.1.1.1 192.1.1.3 192.1.1.4 192.1.3.1 192.1.3.27
24. IP Forwarding – Example 2 Forwarding Table on host 192.1.1.4 Note: 127.0.0.1 is the special address of the local interface 192.1.3.2 192.1.1.2 192.1.1.1 192.1.1.3 192.1.1.4 192.1.3.1 192.1.3.27
25.
26.
27. 2 0 1 from from x y z x y z 0 2 3 from cost to x y z x y z 0 2 3 from cost to x y z x y z ∞ ∞ ∞ ∞ ∞ cost to x y z x y z 0 2 7 from cost to x y z x y z 0 2 3 from cost to x y z x y z 0 2 3 from cost to x y z x y z 0 2 7 from cost to x y z x y z ∞ ∞ ∞ 7 1 0 cost to ∞ ∞ ∞ 2 0 1 7 1 0 2 0 1 7 1 0 2 0 1 3 1 0 2 0 1 3 1 0 2 0 1 3 1 0 2 0 1 3 1 0 time node x table node y table node z table D x (y) = min{c(x,y) + D y (y), c(x,z) + D z (y)} = min{2+0 , 7+1} = 2 D x (z) = min{ c(x,y) + D y (z), c(x,z) + D z (z) } = min{2+1 , 7+0} = 3 ∞ x y z x y z 0 2 7 ∞ ∞ ∞ ∞ ∞ ∞ from cost to x z 1 2 7 y
34. TCP Header 0 Source Port Destination Port Sequence Number Acknowledgement Number Data Offset Window Reserved ACK URG EOL RST SYN FIN Checksum Urgent Pointer Padding Options 4 8 16 32 Application Layer Data…
37. TCP – Streams-based Host A Seq=100, 20 bytes data ACK=100 Host B Seq=92, 8 bytes data ACK=120 SendBase = 120 Sendbase = 100 time
38.
39. Stop-and-Wait operation first packet bit transmitted, t = 0 sender receiver RTT last packet bit transmitted, t = L / R first packet bit arrives last packet bit arrives, send ACK ACK arrives, send next packet, t = RTT + L / R
40. Pipelining: increased utilization first packet bit transmitted, t = 0 sender receiver RTT last bit transmitted, t = L / R first packet bit arrives last packet bit arrives, send ACK ACK arrives, send next packet, t = RTT + L / R last bit of 2 nd packet arrives, send ACK last bit of 3 rd packet arrives, send ACK Increase utilization by a factor of 3!
55. TCP Connection Tear-down: FSM CLOSING CLOSE WAIT FIN WAIT-1 ESTAB TIME WAIT snd FIN CLOSE send FIN CLOSE rcv ACK of FIN LAST-ACK CLOSED FIN WAIT-2 snd ACK rcv FIN delete TCB Timeout=2msl send FIN CLOSE send ACK rcv FIN snd ACK rcv FIN rcv ACK of FIN snd ACK rcv FIN+ACK