Delivery, Forwarding and RoutingNetworking Fundamentals
22.2DELIVERYDELIVERY• DeliveryDelivery of a packet is defined as the handling ofof a packet is defined as the handling ofthe packets by the underlying Physical networksthe packets by the underlying Physical networksbased on the supervision of the Networkbased on the supervision of the Network (& Data(& DataLink)Link) layer.layer.• Delivery of a packet to its final destination isDelivery of a packet to its final destination isaccomplished by using two different methods,accomplished by using two different methods,direct and indirect.direct and indirect.
22.4FORWARDING & ROUTINGFORWARDING & ROUTING• ForwardingForwarding means to place the packet in its route to itsmeans to place the packet in its route to itsdestination. Forwarding requires a host or a router todestination. Forwarding requires a host or a router tohave a routing table. When a host has a packet to sendhave a routing table. When a host has a packet to sendor when a router has received a packet to be forwarded,or when a router has received a packet to be forwarded,it looks at this table to find the route to the finalit looks at this table to find the route to the finaldestination.destination.• RoutingRouting refers to the way routing tables are created torefers to the way routing tables are created tohelp in forwarding.help in forwarding.• We now see three forwarding techniques, these makeWe now see three forwarding techniques, these makethethe size of the routing table manageablesize of the routing table manageable..
22.51. Route method versus next-hop method (lesser content)
22.62. Host-specific versus network-specific method (again lesser content)
22.73. Default method (The default route is normally defined as address 0.0.0.0)
22.8Classless Inter-Domain Routing (CIDR) is a systemof IP addressing and routing that solves the manyproblems of “classful” addressing by eliminatingfixed address classes in favor of a flexible,multiple-level, hierarchical structure of networksof varying size.Note
22.14Routing table for router R1 in FigureActually, for Default route, Mask should be /0 and Network Addressshould be 0.0.0.0
22.15Show the forwarding process if a packet arrives at R1 inFigure with the destination address 22.214.171.124.Example 2SolutionThe router performs the following steps:1. The first mask (/26) is applied to the destination address.The result is 126.96.36.199, which does not match thecorresponding network address.2. The second mask (/25) is applied to the destinationaddress. The result is 188.8.131.52, which matches thecorresponding network address. The desination addressand the interface number m0 are passed to ARP forfurther processing.
22.16Show the forwarding process if a packet arrives at R1 inFigure with the destination address 184.108.40.206.Example 3SolutionThe router performs the following steps:1. The first mask (/26) is applied to the destinationaddress. The result is 220.127.116.11, which does notmatch the corresponding network address.2. The second mask (/25) is applied to the destination address. Theresult is 18.104.22.168, which does not match the correspondingnetwork address (row 2).3. The third mask (/24) is applied to the destinationaddress. The result is 22.214.171.124, which matches thecorresponding network address. The destinationaddress of the packet and the interface number m3 arepassed to ARP.
22.17Show the forwarding process if a packet arrives at R1 inFigure with the destination address 126.96.36.199.Example 4SolutionThis time all masks are applied, one by one, to thedestination address, but no matching network address isfound. When it reaches the end of the table, the modulegives the next-hop address 188.8.131.52 and interfacenumber m2 to ARP. This is probably an outgoingpackage that needs to be sent, via the default router, tosomeplace else in the Internet.
22.23As an example of hierarchical routing, let us consider theFigure. A regional ISP is granted 16,384 addressesstarting from 184.108.40.206. The regional ISP has decidedto divide this block into four subblocks, each with 4096addresses. Three of these subblocks are assigned to threelocal ISPs; the second subblock is reserved for future use.Note that the mask for each block is /20 because theoriginal block with mask /18 is divided into 4 blocks.Example 5The first local ISP has divided its assigned subblock into8 smaller blocks and assigned each to a small ISP. Eachsmall ISP provides services to 128 households, each usingfour addresses.
22.24The second local ISP has divided its block into 4 blocks and hasassigned the addresses to four large organizations.Example 5 (continued)There is a sense of hierarchy in this configuration. All routers inthe Internet send a packet with destination address 220.127.116.11 to18.104.22.168 to the regional ISP.The regional ISP sends every packet between 22.214.171.124 to126.96.36.199 to local ISP1.Local ISP1 sends every packet between 188.8.131.52 to184.108.40.206 to Small ISP1.Small ISP1 sends every packet between 220.127.116.11 to 18.104.22.168to H001.The third local ISP has divided its block into 16 blocks andassigned each block to a small organization. Each smallorganization has 256 addresses, and the mask is /24.
22.25Hierarchical routing with ISPs22.214.171.124126.96.36.199188.8.131.52184.108.40.206220.127.116.11818.104.22.16822.214.171.124126.96.36.199188.8.131.52184.108.40.206
22.29One utility that can be used to find the contents of arouting table for a host or router is netstat in UNIX orLINUX. The next slide shows the list of the contents of adefault server. We have used two options, r and n. Theoption r indicates that we are interested in the routingtable, and the option n indicates that we are looking fornumeric addresses. Note that this is a routing table for ahost, not a router. Although we discussed the routing tablefor a router throughout, a host also needs a routing table.Example 6
22.30Example 6 (continued)The destination column here defines the network address.The term gateway used by UNIX is synonymous withrouter. This column actually defines the address of the nexthop. The value 0.0.0.0 shows that the delivery is direct. Thelast entry has a flag of G, which means that the destinationcan be reached through a router (default router). The Ifacedefines the interface.
22.31Example 6 (continued)More information about the IP address and physicaladdress of the server can be found by using the ifconfigcommand on the given interface (eth0).
22.32Configuration of the server for Example 6
22.33Destination : The destination can be an IP network address.Netmask : Specifies the netmask (also known as a subnet mask)Gateway : Specifies the forwarding or next hop IP address over which the set of addresses defined by the network destination and subnet mask are reachable.
22.35UNICAST ROUTING PROTOCOLSUNICAST ROUTING PROTOCOLS• A routing table can be eitherA routing table can be either staticstatic oror dynamicdynamic. A. Astatic table is one with manual entries. A dynamicstatic table is one with manual entries. A dynamictable is one that is updated automatically whentable is one that is updated automatically whenthere is a change somewhere in the Internet.there is a change somewhere in the Internet.• A routing protocol is a combination of rules andA routing protocol is a combination of rules andprocedures that lets routers in the Internet informprocedures that lets routers in the Internet informeach other of changes.each other of changes.• A dynamic routing table is updated periodically byA dynamic routing table is updated periodically byusing one of these protocols.using one of these protocols.
22.39Distance-Vector Protocols• The distance-vector routing approach determines the direction(vector) and distance (hop count) to any link in the internetwork.Distance-vector algorithms periodically (such as every 30 seconds)send all or some portion of their routing table to their adjacentneighbors.• Routers running a distance-vector routing protocol send periodicupdates even if there are no changes in the network. By receiving aneighbor’s routing table, a router can verify all the known routes andmake changes to the local routing table based on updated informationreceived from the neighboring router.• Distance-vector protocols use the Bellman-Ford Algorithm tocalculate the best paths. Examples of distance-vector protocolsinclude the following:■ Routing Information Protocol (RIP)—The most common IGP in theInternet, RIP uses hop count as its routing metric.■ Interior Gateway Routing Protocol (IGRP)— Addresses the issuesassociated with routing in large, heterogeneous networks.
22.40Link-State Protocols• Link-state routing protocols were designed to overcome thelimitations of distance vector routing protocols. Link-state routingprotocols respond quickly to network changes, send trigger updatesonly when a network change has occurred, and send periodic updates(called link-state refreshes) at long time intervals, such as every 30minutes.• When a link changes state, the device that detected the changecreates a link-state advertisement (LSA) concerning that link (route),and that LSA is propagated to all neighboring devices. Each routingdevice takes a copy of the LSA, updates its link-state (topological)database, and forwards the LSA to all neighboring devices. Thisflooding of the LSA is required to ensure that all routing devicesupdate their databases before creating an updated routing table thatreflects the new topology.• The link-state database is used to calculate the best pathsthrough the network by applying the Dijkstra Shortest Path First (SPF)algorithm• Examples of link-state protocols are OSPF and IS-IS.
22.41BGP• Border Gateway Protocol (BGP) is an example of anEGP. BGP exchanges routing information betweenautonomous systems while guaranteeing loop-free pathselection.• It is the principal route advertising protocol used bymajor companies and ISPs on the Internet. BGP-4 is thefirst version of BGP that supports classless interdomainrouting (CIDR) and route aggregation.• Unlike common IGPs such as RIP, OSPF, andEIGRP, BGP does not use metrics such as hop count orbandwidth or delay.• Instead, BGP makes routing decisions based onnetwork policies or rules using various BGP pathattributes.