VIEWS: 9 PAGES: 35 POSTED ON: 9/2/2011
INTERNETWORKS Internetwork collection of networks interconnected to provide some sort of host to-host packet delivery service global internetwork to which a large percentage of networks are now connected An internetwork is an interconnected collection of such networks An internetwork is often referred to as a “network of networks” because it is made up of lots of smaller networks • Ethernets, FDDI ring and a point-to-point link. • Each of these is a single-technology network. • The nodes that interconnect the networks are called routers or gateways, • The Internet Protocol is the key tool used today to build scalable, heterogeneous internetworks. It was originally known as the Kahn-Cerf protocol. • IP is that it runs on all the nodes (both hosts and routers) in a collection of networks and defines the infrastructure that allows these nodes and networks to function as a single logical internetwork. • Hosts H1 and H8 are logically connected by the internet ,including the protocol graph running on each node. • Higher-level protocols, such as TCP and UDP, typically run on top of IP on the hosts. Service Model • A good place to start when you build an internetwork is to define its service model, ie the host-to-host services you want to provide. • can provide a host-to-host service only if this service can somehow be provided over each of the underlying physical networks IP service model : two parts: 1. Addressing scheme - provides a way to identify all hosts in the internetwork. 2. Datagram (connectionless) model (best effort ) - IP makes every effort to deliver datagram's, it makes no guarantees. Datagram Delivery • The IP datagram is fundamental to the Internet Protocol. • A datagram is a type of packet that happens to be sent in a connectionless manner over a network. • Every datagram carries enough information to let the network forward the packet to its correct destination. • there is no need for any advance setup mechanism to tell the network what to do when the packet arrives. • If something goes wrong and the packet gets lost, corrupted, misdelivered, or in any way fails to reach its intended destination, the network does nothing—it made its best effort, and that is all it has to do. • It does not make any attempt to recover from the failure. This is sometimes called an unreliable service. Packet Format Packet Format • Version: (version of IP.) -The current version of IP is 4, (IPv4) • Hlen: (Header Length) -length of the header in 32-bit words. • TOS: (type of service) -field has had a number of different definitions over the years, but its basic function is to allow packets to be treated differently based on application needs. • Length:(Length of the datagram) -including the header. The Length field counts bytes rather than words. The maximum size of an IP datagram is 65,535 bytes. Packet Format • TTL (time to live): -TTL was set to a specific number of seconds that the packet would be allowed to live. • Protocol -is simply a demultiplexing key that identifies the higher-level protocol to which this IP packet should be passed. • Checksum -is calculated by considering the entire IP header as a sequence of 16-bit words, adding them up using ones complement arithmetic, and taking the ones complement of the result. • SourceAddr &DestinationAddr - Source address and destination address for the packet. Fragmentation and Reassembly • Packets can be fragmented and reassembled when they are too big to go over a given network technology. • Every network type has a maximum transmission unit (MTU), which is the largest IP datagram that it can carry in a frame • When a host sends an IP datagram, therefore, it can choose any size that it wants. A reasonable choice is the MTU of the network to which the host is directly attached. • Then fragmentation will only be necessary if the path to the destination includes a network with a smaller MTU. Should the transport protocol that sits on top of IP give IP a packet larger than the local MTU, however, then the source host must fragment it. • Assuming that the MTU is 1500 bytes for the two Ethernets, 4500 bytes for the FDDI network, and 532 bytes for the point-to-point network, then a 1420-byte datagram (20-byte IP header plus 1400 bytes of data) sent from H1 makes it across the first Ethernet and the FDDI network without fragmentation but must be fragmented into three datagrams at router R2. These three fragments are then forwarded by router R3 across the second Ethernet to the destination host • The figure also serves to reinforce two important points: 1. Each fragment is itself a self-contained IP datagram that is transmitted over a sequence of physical networks, independent of the other fragments. 2. Each IP datagram is re encapsulated for each physical network over which it travels. Global Addresses • If you want to be able to send data to any host on any network, there needs to be a way of identifying all the hosts. • Thus, we need a global addressing scheme— one in which no two hosts have the same address. • Global uniqueness is the first property that should be provided in an addressing scheme • IP addresses are divided into three different classes IP Addressing 32 bits Dotted Decimal Network Host Maximum 255 255 255 255 1 8 9 16 17 24 25 32 Binary 11111111 11111111 11111111 11111111 128 64 32 16 8 4 2 1 1 8 4 2 128 64 32 16 8 128 64 32 16 4 2 1 128 64 32 16 8 4 2 Example 1 Decimal 172 16 122 204 Example 10101100 00010000 01111010 11001100 Binary IP Address Classes 8 bits 8 bits 8 bits 8 bits •Class A: Network Host Host Host •Class B: Network Network Host Host •Class C: Network Network Network Host •Class D: Multicast •Class E: Research IP Address Classes Bits: 1 8 9 16 17 24 25 32 0NNNNNNN Host Host Host Class A: Range (1-126) Bits: 1 8 9 16 17 24 25 32 10NNNNNN Network Host Host Class B: Range (128-191) 1 8 9 16 17 24 25 32 Bits: 110NNNNN Network Network Host Class C: Range (192-223) 1 8 9 16 17 24 25 32 Bits: 1110MMMM Multicast Group Multicast Group Multicast Group Class D: Range (224-239) IP Address Classes • class D addresses that specify a multicast group, and class E addresses that are currently unused. In all cases, the address is 32 bits long. • The class of an IP address is identified in the most significant few bits. • If the first bit is 0, it is a class A address. • If the first bit is 1 and the second is 0, it is a class B address. • If the first two bits are 1 and the third is 0, it is a class C address . • Approximately 4 billion possible IP addresses, half are class A, one quarter are class B, and one-eighth are class C. • Each class allocates a certain number of bits for the network part of the address and the rest for the host part. • Class A networks have 7 bits for the network part and 24 bits for the host part, meaning that there can be only 126 class A networks (the values 0 and 127 are reserved). IP Address Classes 1. Internet would consist of a small number of wide area networks (these would be class A networks) 2. Modest number of site- (campus-) sized networks (these would be class B networks), 3. A large number of LANs (these would be class C networks). IP Address (Example) • IP addresses are written as four decimal integers separated by dots. • Each integer represents the decimal value contained in 1 byte of the address, starting at the most significant. • For example, the address of the computer on which this sentence was typed is 184.108.40.206. • Domain names tend to be ASCII strings separated by dots, such as cs.princeton.edu. Datagram Forwarding in IP • Forwarding is the process of taking a packet from an input and sending it out on the appropriate output. • Routing is the process of building up the tables that allow the correct output for a packet to be determined. Forwarding of IP datagrams • Every IP datagram contains the IP address of the destination host. • The “network part” of an IP address uniquely identifies a single physical network that is part of the larger Internet. • All hosts and routers that share the same network part of their address are connected to the same physical network and can thus communicate with each other by sending frames over that network. • Every physical network that is part of the Internet has at least one router that, by definition, is also connected to at least one other physical network; this router can exchange packets with hosts or routers on either network. Forwarding of IP datagrams can be handled in the following Way • A datagram is sent from a source host to a destination host, possibly passing through several routers along the way . • Any node, whether it is a host or a router, first tries to establish whether it is connected to the same physical network as the destination. • It compares the network part of the destination address with the network part of the address of each of its network interfaces. • If a match occurs, then that means that the destination lies on the same physical network as the interface, and the packet can be directly delivered over that network. Forwarding of IP datagrams can be handled in the following Way • If the node is not connected to the same physical network as the destination node, then it needs to send the datagram to a router. • Each node will have a choice of several routers, and so it needs to pick the best one, or at least one that has a reasonable chance of getting the datagram closer to its destination. • The router that it chooses is known as the next hop router. The router finds the correct next hop by consulting its forwarding table . Datagram forwarding algorithm Working Principle • H1 wants to send a datagram to H2. Since they are on the same physical network, H1 and H2 have the same network number in their IP address. Thus, H1deduce that it can deliver the datagram directly to H2 over the Ethernet. The one issue that needs to be resolved is how H1 finds out the correct Ethernet address for H2—this is the address resolution mechanism • H1 wants to send a datagram to H8. Since these hosts are on different physical networks, they have different network numbers, so H1 deduces that it needs to send the datagram to a router. R1 is the only choice—the default router—so H1 sends the datagram over the Ethernet to R1. Working Principle • R1 knows that it cannot deliver a datagram directly to H8 because neither of R1’s interfaces is on the same network as H8 . • R1’s default router is R2; R1 then sends the datagram to R2 over the token ring network. Assuming R2 has the forwarding table • H8’s network number (network 1)and forwards the datagram to R3. Finally,R3, since it is on the same network as H8,forwards the datagram directly to H8. • Example: the network interfaces of router R2 as interface 0 for the point-to point link (network 4) and interface 1 for the token ring (network 3). Then R2 would have the forwarding table • Any network number that R2 encounters in a packet, it knows what to do. Either that network is directly connected to R2, in which case the packet can be delivered to its destination over that network, or the network is reachable via some next hop router that R2 can reach over a network to which it is connected. In either case, R2 will use ARP, to find the MAC address of the node to which the packet is to be sent next. • In example, R2 could store the information needed to reach all the hosts in the network in a four-entry table. Even if there were 100 hosts on each physical network,R2 would still only need those same four entries. This is a good first step in achieving scalability. The most important principles of building scalable networks: • To achieve scalability, you need to reduce the amount of information that is stored in each node and that is exchanged between nodes. The most common way to do that is hierarchical aggregation. • IP introduces a two-level hierarchy, with networks at the top level and nodes at the bottom level. We have aggregated information by letting routers deal only with reaching the right network; the information that a router needs to deliver a datagram to any node on a given network is represented by a single aggregated piece of information.
Pages to are hidden for
"IP"Please download to view full document