Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Chapter 4: Internetworking (Internet Protocol) Dr. Rocky K. C. Chang 16 March 2004.

Similar presentations


Presentation on theme: "1 Chapter 4: Internetworking (Internet Protocol) Dr. Rocky K. C. Chang 16 March 2004."— Presentation transcript:

1 1 Chapter 4: Internetworking (Internet Protocol) Dr. Rocky K. C. Chang 16 March 2004

2 2 1. The IP technology (except routing) IP service model IP protocol family IP datagram structure IP datagram fragmentation and reassembly IP subnets IP forwarding mechanisms IP tunnels Other IP layer protocols

3 3 2. The IP service model The IP service model consists of –an addressing scheme to identify an IP host, and –a datagram (connectionless) model of data delivery. IP provides a best-effort service. –IP makes its best effort to send a datagram to its destination. –The best-effort service does not guarantee reliable datagram delivery, i.e., an unreliable service.

4 4 3. Internet protocol suite (incomplete) … FTPHTTPNV TFTP TCP UDP IP NET 1 2 n Application Transport Network Data-link ICMP IGMP ARP & RARP Ping DNS RTP SSL

5 5 4. IP datagram VersionHLen TOSLength IdentFlagsOffset TTLProtocolChecksum SourceAddr DestinationAddr Options (variable) Pad (variable) 048161931 Data

6 6 4. IP datagram Version: 4 for the current IP. Type of service (TOS) for specifying how a router should handle this datagram. Header length handles a variable-length header. –20-byte IP header without IP options A 16-bit length limits the size of an IP datagram to 65,535 bytes, including the IP header. Identification, flags, and offset are used for packet fragmentation and reassembly.

7 7 4. IP datagram Time to live (TTL) limits the the number of times that a datagram processed by routers. Protocol specifies the type of payload, e.g., 6 for TCP and 17 for UDP. Checksum is a 16-bit word checksum. IP options, e.g., –Source routing –Record route

8 8 5. MTU and packet fragmentation Each network chooses a maximum packet size that can be sent on it, Maximum Transmission Unit (MTU). For example, –1500 bytes for 10-Mbps Ethernet –4352 bytes for FDDI –17914 bytes for 16-Mbps token ring Note that all MTUs are smaller than IP datagram’s maximum size. One internetworking problem is to accommodate various MTU values.

9 9 5. MTU and packet fragmentation To send datagrams to a directly attached host, use the network’s MTU. To send datagrams to a nondirectly attached host, use the path MTU. –Path MTU is the minimum of the networks’ MTUs on the path from the source to destination. If the actual MTU used is larger than the path MTU, packet fragmentation occurs. –Fragmentation occurs when a router attempts to forward it to a network with a smaller MTU.

10 10 5. MTU and packet fragmentation H1R1R2R3H8 ETHIP(1400)FDDIIP(1400)PPPIP(512) PPPIP(376) PPPIP(512) ETHIP(512) ETHIP(376) ETHIP(512)

11 11 Ident = xOffset = 0 Start of header 0 Rest of header 1400 data bytes (a) Ident = xOffset = 0 Start of header 1 Rest of header 512 data bytes (b) Ident = xOffset = 512 Start of header 1 Rest of header 512 data bytes Ident = xOffset = 1024 Start of header 0 Rest of header 376 data bytes

12 12 5. MTU and packet fragmentation Each IP fragment contains enough information for forwarding to the destination. A fragmented IP datagram will be reassembled only at the destination node. If any fragments do not arrive within a certain time, other received fragments in the datagram will be discarded. Fragmentation could occur multiple times to an IP datagram.

13 13 6. IP subnets IP subnets introduce additional levels within an IP network: –A network address, a subnet ID, and a host ID. IP subnets offer flexibility in allocating addresses to different sizes of sub-networks. A subnet mask is used to indicate which bits are referred to the network and subnet ID. –Each network interface stores subnet mask and its unicast IP address.

14 14 6. IP subnets Subnetting for a class B address: Network numberHost number Class B address Subnet mask (255.255.255.0) Subnetted address 1111111111111111 1111111100000000 Network numberHost IDSubnet ID

15 15 6. IP subnets Subnet mask: 255.255.255.128 Subnet number: 128.96.34.0 128.96.34.15 128.96.34.1 H1 R1 128.96.34.130 Subnet mask: 255.255.255.128 Subnet number: 128.96.34.128 128.96.34.129 128.96.34.139 R2 H2 128.96.33.1 128.96.33.14 Subnet mask: 255.255.255.0 Subnet number: 128.96.33.0 H3

16 16 7. IP forwarding mechanisms Assume that both routers and hosts already have appropriate routing tables in place. –Routing tables for routers are constructed from routing protocols. –Routing tables for hosts are constructed from other means. Problem: Given a routing table, how do hosts and routers forward datagrams?

17 17 7.1 Examples of routing tables For example, R1’s routing table: –Network/SubnetSubnet MaskNext Hop –128.96.34.0255.255.255.128upper int. –128.96.34.128255.255.255.128lower int. –128.96.33.0255.255.255.0128.96.34.129 For example, H1’s routing table: –Network/SubnetSubnet MaskNext Hop –128.96.34.0255.255.255.128upper int. –0.0.0.00.0.0.0128.96.34.1

18 18 7.2 Host’s forwarding mechanisms A host sends a datagram to another host on the same LAN or not. –In the former, it sends the datagram to the destination directly. –In the latter, it sends the datagram to a default router. –In both cases, the host uses ARP cache or ARP to find out the corresponding MAC addresses.

19 19 7.3 A general forwarding mechanism

20 20 7.4 Characteristics of IP forwarding Both hosts and routers are involved in forwarding. –Compared with routers, a host makes a much simpler binary decision. IP forwarding is done on a hop-by-hop basis. It is assumed that the next-hop router is really closer to the destination. IP forwarding is able to specify a route to a network, and not have to specify a route to every host.

21 21 8. IP tunnels Two network nodes (hosts or routers) may “tunnel” IP datagrams between them. –Other nodes on the path are not aware of the other datagram encapsulated by the outer datagram. –A tunnel configured from R1 to R2, which is assigned with a virtual number of 0: NetworkNext Hop 1Interface 0 2Virtual interface 0 DefaultInterface 1

22 22 8. IP tunnels Network interfaces configured as tunnel endpoints perform IP-in-IP encapsulation. –When sending datagrams to each other, the sender uses its IP address as the source address and the other’s IP address as the destination address. –Each performs IP-in-IP encapsulation/decapsulation and then IP routing. –A datagram may traverse several IP tunnels before arriving at the destination.

23 23 8.1 An example of IP tunnels IP header, Destination = 2.x IP payload IP header, Destination = 10.0.0.1 IP header, Destination = 2.x IP payload IP header, Destination = 2.x IP payload Network 1R1 Internetwork Network 2R2 10.0.0.1

24 24 8.2 Uses of IP tunnels Mobile IP: IP tunnel between a foreign agent (or a mobile host) and a home agent. Mbone (Multicast backbone): IP tunnels connect islands of multicast-enabled IP networks. IPv6: IP tunnels will be used for IPv4-IPv6 transition. IPSec: IP tunnels with security is used in establishing Virtual Private Networks (VPNs).

25 25 8.3 Virtual private networks C A Corporation X private network B KL M Corporation Y private network C AB KL M Physical links Virtual circuits (a) (b)

26 26 9. Dynamic host configuration protocol DHCP provides a framework for passing configuration information to hosts. –IP addresses, address of a default router, etc. DHCP is a client-server system, including a relay agent. DHCP operation: –A DHCP client initially broadcasts a DISCOVER message to find a DHCP server. If the server is not directly connected to the client, a relay agent on the LAN will forward this message to the server.

27 27 9. Dynamic host configuration protocol –The server sends an OFFER message back to the relay agent, which then forwards it in either unicast or broadcast back to the client. –Upon accepting an OFFER from a DHCP server, the client sends a REQUEST message to that server. –The final step is for the server to send a REQUEST ACK back to the client. DHCP provides IP addresses to clients for a finite lease duration. –The client either renews the lease or rebinds to another new address.

28 28 9. Dynamic host configuration protocol DHCP relay DHCP server Other networks Unicast to server Broadcast Host

29 29 10. Internet control message protocol The main functions associated with the ICMP are error reporting, reachability test, and route- change notification. ICMP reports errors to the source for host unreachable, lost of fragments, etc. Ping program uses ICMP echo request and reply to test a host’s aliveness. ICMP sends a re-direct message for a better route back to the source.

30 30 10. Internet control message protocol Host R1 R2 (1) IP datagram (2) IP datagram (3) ICMP redirect to the destination


Download ppt "1 Chapter 4: Internetworking (Internet Protocol) Dr. Rocky K. C. Chang 16 March 2004."

Similar presentations


Ads by Google