Chapter 3 Internetworking

22 downloads 106 Views 217KB Size Report
Chapter 3 Internetworking ... Every datagram contains the IP address of the destination host. ▫ If a node (host or router) is directly connected to destination.
Chapter 3 Internetworking Subnetting • Assigning one network number per physical network is inefficient o A network with 10 hosts is assigned a class C network address, wasting over 200 addresses o A network with 300 hosts is assigned a class B network address, wasting over 65,000 addresses • Subnetting addresses the inefficiency by allocating a single network number to several physical networks, which are referred to as subnets • An IP address now has three parts: network + subnet + host

• Subnetting can be used in a large campus or corporation that has many physical networks o All physical networks share the same network number o Each physical network is assigned a unique subnet number o All hosts on the same physical network have the same subnet number

• A host is configured with both an IP address and a subnet mask for the subnet to which it is attached o Subnet mask indicates the split between network + subnet part and host part o All hosts on a given subnet are configured with the same subnet mask, i.e., there is one subnet mask per subnet o IP address of the host &(bitwise AND) subnet mask = subnet number of the host • Host forwarding algorithm if (my subnet mask & destination IP address = my subnet number) Deliver packet to destination directly else deliver packet to default router • To support subnetting, the forwarding table of a router holds entries of the form o If the packet’s destination IP address & SubnetMask =SubnetNumber, then forward the packet to the NextHop router • Router forwarding algorithm D = destination IP address of the datagram

for each forwarding table entry if (SubnetMask & D = SubnetNumber) if NextHop is an interface deliver packet directly to destination else deliver packet to NextHop (a router) if no matches are found, then deliver packet to default router

• Subnetting enables aggregation of routing information o Subnets are not visible from routers outside the site; outside routers see a single network for the site  Outside routers keep only one entry (128.96 for the example in Figure 3.12) in their forwarding tables for the site o Subnets are visible from routers inside the site; these routers need to route the packets to the right subnet • In summary, subnetting reduces the total number of network numbers that are assigned, which improves o Address assignment efficiency, and o Routing scalability (due to aggregation of routing information)