Download presentation
Presentation is loading. Please wait.
1
371-1-0291: An Introduction to Computer Networks
Homepage Handout #4: Internetworking and Routing Additional Reading Text book: Chap
2
Outline Techniques Routing in the Internet Multicast Routing
Reliable Flooding Distributed Bellman Ford Algorithm Dijkstra’s Shortest Path First Algorithm Routing in the Internet Hierarchy and Autonomous Systems Interior Routing Protocols: RIP, OSPF Exterior Routing Protocol: BGP Multicast Routing
3
Where in the OSI Layer? Protocol Stack App Transport Network
IP + Routing Data Hdr IP Datagram Link
4
The Problem “A” “B” R2 R1 R4 R3 How does R1 choose a route to host B?
5
An algorithm ensuring all nodes get a copy of an update packet
Reliable Flooding An algorithm ensuring all nodes get a copy of an update packet R1 Un update packet: Node sequence update id number data Algorithm: A source node sends out the packet on all ports Each node receiving the packet checks the sequence no. and if more recent, stores it and sends it out on all ports but the ingress port Each node receiving the packet acks the directly node which sent it A sending node, not receiving an ack within a T/O, retransmits
6
Reliable Flooding Advantages: Reliable transmission.
Works also when network topology is unknown. If the network is connected, every node gets a copy of the packet Disadvantages: Some nodes receive multiple copies of the packet Packets can go round in loops forever. Waste of network resources To prevent looping for ever, a TTL is added to packet Useful only for important updates – not for regular routing Node sequence TTL update id number data
7
Bellman-Ford Algorithm
Objective: Finds the minimum cost path from every node to every other node Example: Determine the route from (R1, …, R7) to R8 that minimizes the cost. Examples of link cost: Distance, data rate, price, congestion/delay, … R1 1 1 4 R2 R4 R6 2 3 2 2 R7 3 R5 2 R3 4 R8
8
B-F is a Distance Vector Algorithm
1 1 4 R1 R2 R4 R6 3 2 2 2 R7 R5 2 3 4 R3 R8 The solution is a spanning tree with R8 as the root of the tree (link costs are cost in the direction to R8). The Bellman-Ford Algorithm finds all spanning trees.
9
The Distributed Bellman-Ford Algorithm
10
Bellman-Ford Algorithm - Example
1 1 4 R2 R4 R6 2 3 2 2 R7 3 R5 2 R3 4 R8 R1 Inf R2 R3 4, R8 R4 R5 2, R8 R6 R7 3, R8 R2 R5 R7 R4 R6 R8 R3 R1 1 4 2 3
11
Bellman-Ford Algorithm - Example
1 1 4 R1 R2 R4 R6 3 2 3 2 2 2 R7 3 4 R5 2 4 R3 R8 R8 R6 R4 R2 R1 R3 R5 1 4 2 3 R7 Solution R1 5, R2 R2 4, R5 R3 4, R8 R4 R5 2, R8 R6 R7 3, R8
12
Bellman-Ford Algorithm
Questions: How long can the algorithm take to run? How do we know that the algorithm always converges? What happens when link costs change, or when routers/links fail?
13
A Problem with Bellman-Ford
“Bad news travels slowly” 1 1 1 R1 R2 R3 R4 Consider the update of distances to R4, given the optimal ones when all links are active Time R1 R2 R3 3,R2 2,R3 1, R4 R3 R4 fails 1 3,R2 2,R3 3,R2 2 3,R2 4,R3 3,R2 3 5,R2 4,R3 5,R2 … “Counting to infinity” … … …
14
Counting to Infinity Problem Solutions
Set infinity = “some small integer” (e.g. 16). Stop when count = 16. Split Horizon: “Because R2 received lowest cost path from R3, it does not advertise cost to R3 “ Split-horizon with poison reverse: “R2 advertises infinity to R3 “
15
Dijkstra’s Shortest Path First (SPF) Alg
Objective: Finds the minimum cost path from every node to every other node Executed by every node based on the following complete network topology and link costs When completed at node, say R8, C(n) will contain the minimum cost path from R8 to node n
16
Dijkstra’s Shortest Path First (SPF) Alg
Each router calculates lowest cost path to all its neighbors, starting from itself; At each step of the algorithm, a router adds a node to M to which it can reach with its current minimum cost For every node outside M, updates the minimum path cost to it
17
Getting Network Topology for SPF
Done by the Reliable Flooding algorithm that sends the following Link State Packet (LSP): LSP are sent out whenever the state of an attached link changes (up/down), or when an Interval Timer expires Node sequence TTL attached links id number and their costs
18
Dijkstra’s Shortest Path First Algorithm Example
1 1 4 R2 R4 R6 2 3 2 2 R7 3 R5 2 R3 4 R8
19
Dijkstra’s Shortest Path First Algorithm Example
1 1 4 R2 R4 R6 2 3 2 2 R7 3 R5 2 R3 4 R8 is the minimum
20
Dijkstra’s Shortest Path First Algorithm Example
is the minimum R1 1 1 4 R2 R4 R6 2 3 2 2 R7 3 R5 2 R3 4 R8
21
Dijkstra’s Shortest Path First Algorithm Example
is the minimum R1 1 1 4 R2 R4 R6 2 3 2 2 R7 3 R5 2 R3 4 R8
22
Dijkstra’s Shortest Path First Algorithm Example
1 1 4 R2 R4 R6 2 3 2 2 R7 3 R5 2 R3 4 R8 is the minimum
23
Dijkstra’s Shortest Path First Algorithm Example
1 1 4 R2 R4 R6 2 3 2 2 R7 3 R5 2 R3 4 R8 is the minimum
24
Dijkstra’s Shortest Path First Algorithm Example
1 1 4 R2 R4 R6 2 3 2 2 R7 3 R5 2 R3 4 R8 is the minimum
25
Dijkstra’s Shortest Path First Algorithm Example
1 1 4 R2 R4 R6 2 3 2 2 R7 3 R5 2 R3 4 R8 is the minimum
26
Outline Techniques Routing in the Internet Multicast Routing
Reliable Flooding Distributed Bellman Ford Algorithm Dijkstra’s Shortest Path First Algorithm Routing in the Internet Hierarchy and Autonomous Systems Interior Routing Protocols: RIP, OSPF Exterior Routing Protocol: BGP Multicast Routing
27
Routing in the Internet
The Internet uses hierarchical routing The Internet is split into Autonomous Systems (AS’s) Examples of AS’s: Stanford (32), HP (71), MCI Worldcom (17373) Try: whois –h whois.arin.net ASN “MCI Worldcom” Within an AS, the administrator chooses an Interior Gateway Protocol (IGP) Examples of IGPs: RIP (rfc 1058), OSPF (rfc 1247). Between AS’s, the Internet uses an Exterior Gateway Protocol AS’s today use the Border Gateway Protocol, BGP-4 (rfc 1771)
28
Routing in the Internet
AS ‘A’ AS ‘B’ AS ‘C’ BGP BGP Interior Gateway Protocol Interior Gateway Protocol Interior Gateway Protocol Stub AS – single AS neighbor Transit AS e.g. backbone service provider Stub AS
29
Routing within a Stub AS
In stubs, there is only one exit point, so routers within the AS can use default routing. Each router knows all Network IDs within AS. Packets destined to another AS are sent to the default router. Default router is the border gateway to the next AS. Routing tables in Stub AS’s tend to be small. Multihomed AS – An AS connected to several AS but rejects transient traffic
30
Interior Routing Protocols
RIP (Routing Information Protocol) Uses distributed Bellman-Ford algorithm. Updates (in a RIP packet) are sent every 30 seconds. No authentication in RIP ver. 1; password in ver. 2 Originally in BSD UNIX. OSPF (Open SPF) Link-state updates (LSU) sent (using reliable flooding) as and when required. Every router runs Dijkstra’s algorithm. Authenticated updates. Autonomous system may be partitioned into “areas”. Allows multiple paths with the same cost to a destination
31
Interior Routing Protocols
Authentication of LSU packets To prevent, e.g., forged advertisement of zero cost Early OSPF uses 8-byte password Strong cryptography in newer versions “Areas” as a further hierarchy layer An AS can be partitioned into “areas” Adds scalability to the OSPF alg A router knows only how to reach the “areas” – not to all networks
32
Exterior Routing Protocols
Problems: Topology: The Internet is a complex mesh of different AS’s with very little structure. Autonomy of AS’s: Each AS defines link costs in different ways, so not possible to find lowest cost paths. Trust: Some AS’s can’t trust others to advertise good routes (e.g. two competing backbone providers), or to protect the privacy of their traffic (e.g. two warring nations). Policies: Different AS’s have different objectives (e.g. route over fewest hops; use one provider rather than another).
33
Border Gateway Protocol (BGP-4)
Replaces the earlier EGP (Exterior Gateway Protocol) BGP is not a link-state nor distance-vector routing protocol. BGP advertises complete paths (a list of AS’s). Example of path advertisement: “The network /16 can be reached via the path {AS1, AS5, S13}”. Paths with loops are detected locally and ignored. Local policies pick the preferred path among options. When a link/router fails, the path is “withdrawn” AS numbers (ASN) in messages are unique On critical link/node failure, BGP routers advertise “withdrawn routes” Uses TCP protocol to exchange messages and copes with CIDR
34
Multicast Routing Outline Applications that need multicast.
Trees, addressing and forwarding. Multicast routing Distance Vector (DVMRP) Protocol Independent Multicast (PIM) Some interesting questions…
35
Applications that need multicast
One way, single sender: “one-to-many” TV Non-interactive learning Database update Information dispersal (e.g., CEO addressing an org) Two way, interactive, multiple sender: “many-to-many” Teleconference Interactive learning
36
Multicast Routing Outline Applications that need multicast.
Trees, addressing and forwarding. Multicast routing Distance Vector (DVMRP) Protocol Independent Multicast (PIM) Some interesting questions…
37
Multicast Trees - Example
38
Multicast Routing A multicast tree is a spanning tree with the sender at the root, spanning all the members of the group.
39
Multicast Trees e.g., a teleconference
Sender/Speaker Multicast Group (S1,G) S1 Class D S1 R
40
Multicast Trees and Addressing
All members of the group share the same “Class D” Group Address. An end station may be a member of multiple groups. An end-station “joins” a multicast group by (periodically) telling its nearest router that it wishes to join (uses IGMP – Internet Group Management Protocol). Routers maintain “soft-state” indicating which end-stations have subscribed to which groups.
41
Multicast Trees e.g., a teleconference
Class D S2 R S2 Sender/Speaker Multicast Group (S2,G)
42
Multicast Forwarding is Source-specific
Group Address Src Address Src Interface Dst Interface G S1 1 2,3 S2 2 1,3 R forwards packet to all interfaces 2 S1 G 1 3 1 S2 G 2 forwards packet to all interfaces 3
43
Multicast Routing Outline Applications that need multicast.
Trees, addressing and forwarding. Multicast routing Distance Vector (DVMRP) Protocol Independent Multicast (PIM) Some interesting questions…
44
Distance-vector Multicast RPB: Reverse-Path Broadcast
Uses existing unicast shortest path routing table. If packet arrived through interface that is the shortest path to the packet’s SA, then forward packet to all interfaces. Else drop packet.
45
Distance-vector Multicast RPB: Reverse-Path Broadcast
Sender/Speaker Multicast Group (S1,G) Address Port Unicast DV Routing Table S1 S1 1 1 3 LAN 2 Shortest Path to Source Q: Is it shortest path from source?
46
Distance-vector Multicast RPB: Reverse-Path Broadcast
Sender/Speaker Multicast Group (S1,G) S1 Designated Parent Router: One parent router picked per LAN (one “closest” to source). LAN
47
Distance-vector Multicast RPM: Reverse-Path Multicast
RPM = RPB + Prune (“not interested”) RPB used when a source starts to send to a new group address. Routers that are not interested in a group, send prune messages up the tree towards source. Prunes sent implicitly by not indicating interest in a group. DVMRP works this way.
48
Protocol Independent Multicast (PIM)
PIM-DM (Dense Mode) uses RPM. PIM-SM (Sparse Mode) designed to be more efficient than DVMRP. Routers explicitly join multicast tree by sending unicast Join and Prune messages. Routers join a multicast tree via a RP (Rendezvous Point) for each group. Several RPs per domain (picked in a complex way). Provides either: Shared tree for all senders (default). Source-specific tree.
49
PIM-SM Example Unicast to R3: (S,G) Unicast to RP: (*, G) RP
Source knows to send all G packets to RP. Source “tunnels” mcast-in-ucast packets to RP. RP unwraps mcast pkt and forwards to local tree. Unicast to RP: (*, G) RP knows R1 has joined R2 learns to send (*,G) packets to R1 RP R2 S IGMP Join R1 Sender/Source
50
PIM-SM Example Optional Source-specific join to bypass RP router:
Routers along the way learn new path for (S,G). RP R2 S R1 Sender/Source
51
Multicast Routing Outline Applications that need multicast.
Trees, addressing and forwarding. Multicast routing Distance Vector (DVMRP) Protocol Independent Multicast (PIM) Some interesting questions…
52
Multicast: Interesting Questions
How to make multicast reliable? How to implement flow-control? How to support/provide different rates for different end users? How to secure a multicast conversation? Will multicast become widespread?
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.