Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Internetworking: IP Packet Switching Reading: 4.1.1 - 4.1.7 (except Implementation; pp. 245-250 )

Similar presentations


Presentation on theme: "1 Internetworking: IP Packet Switching Reading: 4.1.1 - 4.1.7 (except Implementation; pp. 245-250 )"— Presentation transcript:

1 1 Internetworking: IP Packet Switching Reading: 4.1.1 - 4.1.7 (except Implementation; pp. 245-250 )

2 2 Terminology ii“internetwork”, internet: an arbitrary collection of physical networks interconnected to provide some sort of host- to-host packet delivery service –interconnect physical networks (e.g. Ethernets, FDDIs, ATMs, PPP,..) form a logical network (an internet) IInternet: widely used, global internetwork to which a large percentage of networks are now connected Learn the principles of internetworking –illustrate ideas with real-world examples from Internet

3 3 Network of “Single Technology Networks” Internet Protocol, IP: a tool used to build scalable, heterogeneous internetwork –net 1, net 2 : Ethernets –net 3: FDDI –net 4: point-to-point link –R1, R2, R3: routers for interconnection

4 4 Service Model Connectionless (datagram-based) Best-effort delivery (unreliable service to transport {or other higher} layer protocols) –packets are lost –packets are delivered out of order –duplicate copies of a packet are delivered –packets can be delayed for a long time

5 5 Packet Format: 20 to 24 byte Header I 1.Version 2.HLen: length of header in 32-bit words 3.TOS, Type of Service: allow packets to be treated differently based on application needs 4.Length: bytes of datagram (including header, max 65,535) 5.Indent, Offset, Flag: information used for fragmentation

6 6 Packet Format: 20 to 24 byte Header II 6.TTL, time to live: discard looping packets; 64 is the current default 7.Protocol: higher-level protocol (TCP = 6, UDP =17, …) 8.Checksum: calculated for IP header considered as a sequence of 16-bit words 9.SourceAddr, DestinationAddr: IP defines its own global address space, independent of physical networks 10.Options, Pad: rarely use

7 7 Fragmentation and Reassembly Each physical network has some maximum transmission unit (MTU). –Examples Ethernet packets up to 1500 bytes FDDI packets up to 4500 bytes Fragmentation and Reassembly Design Decisions: 1.try to avoid fragmentation at source host –source host chooses size of IP datagram equals to MTU of physical network to which it is directly attached –if transport protocol gives IP a packet larger than local MTU, then source host fragments it 2.fragment when necessary –whenever the path to destination includes a network with MTU < Datagram

8 8 Design Decisions (cont.) 3.re-fragmentation is possible –a router wants to forward a datagram over a network with MTU < received datagram 4.fragments are self-contained datagrams 5.delay reassembly until destination host –fragments carry same identifier in Ident Ident chosen by sending host unique among datagrams that might arrive at destination from source over some reasonable time period 6.do not recover from lost fragments –If all fragments do not arrive at receiving host, it discards fragments that arrived

9 9 Example 4500 MTU1500 MTU 532 MTU IP on H1 wants to send to H8 a 1420-byte packet (20-byte IP header plus 1400 bytes of data) R2 must fragment the packet before routing it to RT3 MTU of net2 = 1500 byte MTU of net3 = 4500 byte MTU of net4 = 532 byte MTU of net4 = 1500 byte

10 10 Example (continued) (a) Ident = x Start of header Rest of header 1400 data bytes Offset = 00 (b) Ident = x Start of header Rest of header 512 data bytes Offset = 01 Ident = x Rest of header 512 data bytes Offset = 641 Start of header Ident = x Start of header Rest of header 376 data bytes Offset = 1280 4500 MTU 1500 MTU 532 MTU 1420-byte datagram (20-byte IP header plus 1400 bytes of data) First fragment M bit 1 in the Flags field (more fragments to follow) Offset 0 (fragment contains first part of original datagram) Second fragment starts with the 513th byte Offset field in header set to 64, which is 512/8 fragmentation is done on 8-byte boundaries Offset field counts 8-byte chunks Third fragment contains last 376 bytes offset (2 x 512)/ 8 = 128 M bit is 0 (b) (a)

11 11 Global Addresses Although globally unique, Ethernet addresses have no structure to provide clues to routing protocols IP addresses: 32 bits –globally unique (4,294,967,296 possible addresses) –hierarchical: network + host Dot Notation –10.3.2.4 –128.96.33.81 –192.12.69.77

12 12 IP addresses (cont. I) The original idea was that the Internet would consist of a)a small number of wide area networks (these would be class A networks), 126 Yes. Yes. Yes. Yes. Yes. Yes. Yes.\ Yes. Yes. Yes. Yes. Yes. Yes. Yes. 1.126 class A networks (the values 0 and 127 are reserved) 2.each class A network accommodate up to 2 24 - 2 (about 16 million) hosts (again, there are two reserved values)

13 13 IP addresses (cont. II) The original idea was that the Internet would consist of a)a small number of wide area networks (these would be class A networks), 126 b)a modest number of site- (campus-) sized networks (these would be class B networks) 65,534 hosts /network Yes. Yes. Yes. Yes. Yes. Yes. Yes.\ Yes. Yes. Yes. Yes. Yes. Yes. Yes.

14 14 IP addresses (cont. III) The original idea was that the Internet would consist of a)a small number of wide area networks (these would be class A networks), 126 b)a modest number of site- (campus-) sized networks (these would be class B networks) 65,534 hosts /network c)a large number of LANs (these would be class C networks) 254 hosts/LAN 255 reserved for broadcast 0 not a valid host number

15 15 Datagram Forwarding Strategy every datagram contains destination’s address if router is connected to destination network, then forward to host if not directly connected, then forward to some router forwarding table maps network number into next hop (router) each host has a default router each router maintains a forwarding table

16 16 Datagram Forwarding (cont.) Example: R2 Table Network Number Next Hop 1 R3 2 R1 3 interface 1 4 interface 0

17 17 Address Translation a packet reaches a new physical network map IP address into a physical address –Either determine physical address of destination host –OR determine physical address of next hop router encapsulate IP datagram inside a frame that contains link-level address

18 18 Address Resolution Protocol (ARP) ARP enables each host on a physical network to dynamically build up a table of mappings between IP addresses and link-level addresses Invoking ARP: an “originator” host wants to send a datagram to a host (or router) on the same physical network if no mapping is found in its ARP table, it invokes the Address Resolution Protocol

19 19 Executing ARP 1.“originator” host broadcast an ARP query containing “target IP address” and {IP address; link-layer address} of originator host 2.if a host on network already has an entry for originator host, it “refreshes” this entry (resets length of time until it discards entry) 3.target host adds information about originator to its table & sends back a response message that contains its link- layer address 4.originator adds information contained in the response to its ARP table 5.all other hosts do not add an entry for the originator host

20 20 ARP: Notes mappings may change over time entries are timed out periodically and removed –discarded if not refreshed (in about 10 minutes)

21 21 ARP Packet Format HardwareType: type of physical network (e.g., Ethernet) ProtocolType: type of higher layer protocol (e.g., IP) HLEN & PLEN: length of physical and protocol addresses Operation: request or response Source/Target - Physical/Protocol addresses

22 22 ARP Packet Format TargetHardwareAddr (bytes 2 5) TargetProtocolAddr (bytes 0 3) SourceProtocolAddr (bytes 2 3) Hardware type = 1ProtocolType = 0x0800 SourceHardwareAddr (bytes 4 5) TargetHardwareAddr (bytes 0 1) SourceProtocolAddr (bytes 0 1) HLen = 48PLen = 32Operation SourceHardwareAddr (bytes 0―3) 081631 ― ― ―― ― ― Mapping IP into Ethernet Addresses

23 23 Internet Control Message Protocol (ICMP) a companion protocol to IP defines a collection of error messages that are sent back to source host whenever a router or host is unable to process an IP datagram successfully

24 24 Error Messages Defined by ICMP Destination unreachable TTL exceeded (so datagrams don’t cycle forever) Checksum failed Reassembly failed Cannot fragment Echo (ping) Redirect (one of the control messages a router can send back to a source host) –there is a better route to the destination


Download ppt "1 Internetworking: IP Packet Switching Reading: 4.1.1 - 4.1.7 (except Implementation; pp. 245-250 )"

Similar presentations


Ads by Google