670 likes | 887 Views
Chapter 21. Unicast and Multicast Routing: Routing Protocols. 21.1 Unicast Routing. Metric. Interior and Exterior Routing. Figure 21.1 Unicasting. A metric is the cost assigned for passage of a packet through a network.
E N D
Chapter 21 Unicast and Multicast Routing: Routing Protocols
21.1 Unicast Routing Metric Interior and Exterior Routing
Figure 21.1Unicasting • A metric is the cost assigned for passage of a packet through a network. • A router consults its routing table to determine the best path for a packet.
Note: In unicast routing, the router forwards the received packet through only one of its ports.
21.2 Unicast Routing Protocols RIP (Routing Information Protocol) OSPF (Open Shortest Path First) BGP (Border Gateway Protocol)
Figure 21.2Popular routing protocols • RIP and OSPF are popular interior routing protocols used to update routing tables in an autonomous system (AS). • BGP is an interautonomous system routing protocol used to update routing tables.
Figure 21.3Autonomous systems • An autonomous system (AS) is a group of networks and routers under the authority of a single administration.
Table 21.1 A distance vector routing table • A RIP routing table entry consists of a destination network address, the hop count to that destination, and the IP address of the next router.
RIP Updating Algorithm Receive: a response RIP message 1. Add one hop to the hop count for each advertised destination. 2. Repeat the following steps for each advertised destination: 1. If (destination not in the routing table) 1. Add the advertised information to the table. 2. Else 1. If (next-hop field is the same) 1. Replace entry in the table with the advertised one. 2. Else 1. If (advertised hop count smaller than one in the table) 1. Replace entry in the routing table. 3. Return. • RIP is based on distance vector routing, in which each router shares, at regular intervals, its knowledge about the entire AS with its neighbor.
Figure 21.4Example of updating a routing table • Each routing table is updated upon receipt of RIP messages using the RIP updating algorithm
Figure 21.5 Initial routing tables in a small autonomous system • The table contains only the directly attached networks • The hop count is initialized to 1
Figure 21.6Final routing tables for Figure 21.5 • Previous AS with final routing tables
Figure 21.7Areas in an autonomous system • OSPF is based on link state routing, in which each router sends the state of its neighborhood to every other router in the area. A packet is sent only if there is a change in the neighborhood. • OSPF divides an AS into areas, defined as collections of networks, hosts, and routers
Figure 21.8Types of links • OSPF defines four types of links (networks): point-to-point, transient, stub, and virtual.
Figure 21.9Point-to-point link • A point-to-point link connects two routers without any other host or router in between.
Figure 21.10Transient link • A transient link is a network with several routers attached to it
Figure 21.11Stub link • A stub link is a network that is connected to only one router
Figure 21.12Example of an internet DS = Digital Signal service • T-1 line: DS-1, 1.544 Mbps, 24 voice channels • T-3 line: DS-3, 44.736 Mbps, 672 voice channels
Figure 21.13Graphical representation of an internet • Square nodes are routers • Ovals are networks (represented by designated routers)
Figure 21.14Types of LSAs • An LSA (link state advertisement) is a mutifield entry in a link state update packet. • Five types of LSAs disperse information in OSPF: router link, network link, summary link to network, summary link to AS boundary router, and external link.
Figure 21.15Router link • A router link advertisement defines the links of a true router. • A true router uses this advertisement to announce information about all its links and what is at the other side of the link (neighbors)
Figure 21.16Network link • A router compiles all the information from the LSAs it receives into a link state database. This database is common to all routers in an area. • A network link advertisement defines the links of a network. • A designated router, on behalf of the transient network, distributes this type of LSA packet; the packet announces the existence of all router connected to the network
Figure 21.17Summary link to network • R1 floods area 1 with information about how to reach a network located in area 0 • R2 floods area 2 with information about how to reach the same network in area 0
Figure 21.18Summary link to AS boundary router • The area border routers flood their areas with information on routes to autonomous boundary routers to allow a router inside an area to send a packet to outside the AS
Figure 21.19External link • The external link advertisement provides information that allows a router inside an AS to know which networks are available outside the AS
Note: In OSPF, all routers have the same link state database.
Dijkstra Algorithm 1. Start with the local node (router): the root of the tree. 2. Assign a cost of 0 to this node and make it the first permanent node. 3. Examine each neighbor node of the node that was the last permanent node. 4. Assign a cumulative cost to each node and make it tentative. 5. Among the list of tentative nodes 1. Find the node with the smallest cumulative cost and make it permanent. 2. If a node can be reached from more than one direction 1. Select the direction with the shortest cumulative cost.6. Repeat steps 3 to 5 until every node becomes permanent. • The Dijkstra algorithm calculates the shortest path between to points on a network, using a graph made of nodes and edges • The algorithm divides the nodes into two sets: tentative and permanent
Figure 21.20Shortest-path calculation • Some steps of Dijkstra algorithm applied to node A of figure 21.13
Table 21.2 Link state routing table for router A • To find the cost of reaching networks outside of the are, the routers use the summary link to network, the summary link to boundary router, and the external link advertisements
Table 21.3 Path vector routing table • BGP is based of a routing method called path vector routing
Figure 21.21Path vector messages • In BGP, the ASs through which a packet must pass are explicitly listed.
Figure 21.22Types of BGP messages • There are four types of BGP messages: open, update, keep-alive, and notification.
21.3 Multicast Routing IGMP (Internet Group Management Protocol) Multicast Trees MBONE (multicast backbone)
Figure 21.23Multicasting • Multicasting applications include distributed databases, information dissemination, teleconferencing, and distance learning. • For efficient multicasting we use a shortest-path spanning tree to represent the communication path.
Note: In multicast routing, the router may forward the received packet through several of its ports.
Note: IGMP is a group management protocol. It helps a multicast router create and update a list of loyal members related to each router interface.
Figure 21.24IGMP message types • A host or router can have membership in a group. • The three IGMP message types are the query message, the membership report, and the leave report.
Figure 21.25IGMP message format • Type: Type of message • Maximum response time: Amount of time in which a query must be answered • Checksum: Calculated over the 8-byte message • Group address: Groupid (multicast address of the group in the special query, the membership report, and the leave report messages.
Table 21.4 IGMP type field • The value of the field is shown in both hexadecimal and binary notation
Figure 21.26IGMP operation • IGMP operates locally
Figure 21.27Membership report • A host maintains a list of processes that have membership in a group. • A router maintains a list of groupids that shows group membership for each interface. • A membership report is sent out of all interfaces except the one from which the new interest comes
Note: In IGMP, a membership report is sent twice, one after the other.
Figure 21.28Leave report No Response • When a host sees that no process is interested in a specific group it sends a leave report
Note: The general query message does not define a particular group.
Figure 21.29General query message No Response • The query message must be sent by only one router (normally called the query router)
Example 1 Imagine there are three hosts in a network, as shown in Figure 21.30 (below). A query message was received at time 0; the random delay time (in tenths of seconds) for each group is shown next to the group address. Show the sequence of report messages. • The events occur in the sequence Time 12, Time 30, Time 50 and Time 70
Solution • The events occur in this sequence: • Time 12. The timer for 228.42.0.0 in host A expires and a membership report is sent, which is received by the router and every host including host B which cancels its timer for 228.42.0.0. • Time 30. The timer for 225.14.0.0 in host A expires and a membership report is sent, which is received by the router and every host including host C which cancels its timer for 225.14.0.0. • Time 50. The timer for 251.71.0.0 in host B expires and a membership report is sent, which is received by the router and every host. • Time 70. The timer for 230.43.0.0 in host C expires and a membership report is sent, which is received by the router and every host including host A which cancels its timer for 230.43.0.0. • If each host had sent a report for every group in the list, there would have been seven reports; with this strategy only four reports are sent
Note: In a source-based tree approach, the combination of source and group determines the tree.
Note: In the group-shared tree approach, the group determines the tree.
Figure 21.31Logical tunneling • The multicast routers are seen as a group of routers on the top of the unicast routers. • The multicast routers may not be connected physically, but they are connected logically