Presentation is loading. Please wait.

Presentation is loading. Please wait.

Slide 1 2008/2009COMM3380 Brief Review of Last Lecture Routing Algorithms –Distance vector e.g. RIP –Link State / Shortest Path First e.g. OSPF.

Similar presentations


Presentation on theme: "Slide 1 2008/2009COMM3380 Brief Review of Last Lecture Routing Algorithms –Distance vector e.g. RIP –Link State / Shortest Path First e.g. OSPF."— Presentation transcript:

1 Slide 1 2008/2009COMM3380 Brief Review of Last Lecture Routing Algorithms –Distance vector e.g. RIP –Link State / Shortest Path First e.g. OSPF

2 Slide 2 2008/2009COMM3380 Routing Algorithms Distance Vector Routing Each node knows the distance (=cost) to its directly connected neighbours A node sends periodically a list of routing updates to its neighbours. If all nodes update their distances, the routing tables eventually converge New nodes advertise themselves to their neighbours Link State Routing Each node knows the distance to its neighbours The distance information (=link state) is broadcast to all nodes in the network Each node calculates the routing tables independently

3 Slide 3 2008/2009COMM3380 Bellman-Ford Algorithm Hopsd A (B) Vector (Next Hop) d A (C) Vector (Next Hop) d A (D) Vector (Next Hop) d A (E) Vector (Next Hop) d A (F) Vector (Next Hop) 0∞ -- 12 B5 C1 D∞ -- 22 B4 D1 D2 D10C 32 B3 D1 D2 D4 D 42 B3D3D1 D2 D4 D A B DE C F 2 5 3 23 1 1 2 5 1 d x (y) = min { c(x,v) + d v (y) }

4 Slide 4 2008/2009COMM3380 Dijsktra’s Algorithm A B DE StepN’D(B), pathD(C), pathD(D), pathD(E), pathD(F), path 0A2, A-B5, A-C1, A-D∞ -- 1A,D2, A-B4, A-D-C1, A-D2, A-D-E∞ -- 2A,B,D2, A-B4, A-D-C1, A-D2, A-D-E∞ -- 3A,B,D,E2, A-B3, A-D-E-C1, A-D2, A-D-E4, A-D-E-F 4A,B,C,D,E2, A-B3, A-D-E-C1, A-D2, A-D-E4, A-D-E-F 5A,B,C,D,E,F2, A-B3, A-D-E-C1, A-D2, A-D-E4, A-D-E-F C F 2 5 3 23 1 1 2 5 1 D(v) = min{ D(v), D(w) + c(w,v) } Shortest Path First (SPF)

5 Slide 5 2008/2009COMM3380 Node A’s View of Network A B D E C F 1 1 1 2 2 DestCostNext Hop B2B C3D D1D E2D F4D Routing Table Node A

6 Slide 6 2008/2009COMM3380 Network 192.168.19.0 Node A Router3 ( Node E ) Router2 ( Node C ) [192.168.14.10] Router1 ( Node B ) [192.168.14.1] Serial1 192.168.15.2 FE0/0 [192.168.18.1] Serial0 192.168.17.2 FE0/1 192.168.19.1 FE0/1 192.168.19.2 FE0/ 0 Serial0 192.168.15.1 FE0/1 192.168.16.1 Serial0 192.168.17.1 Network 192.168.14. 0 Node F Network 192.168.18. 0 [192.168.18.30] Network 192.168.15. 0 Network 192.168.17. 0 Network 192.168.16. 0 Hub [192.168.16.101] Node D

7 Slide 7 2008/2009COMM3380 Network Graph AD BE 1 1 C 1 F 1 1 1 DestCostNext Hop B1B C2B D3B E2B F3B Routing Table Node A DestCostNext Hop A1A C1C D2C E1E F2E Routing Table Node B

8 Slide 8 2008/2009COMM3380 Network Graph AD BE 1 1 C 1 F ∞ 1 1 DestCostNext Hop B1B C2B D3B E3B F4B Routing Table Node A DestCostNext Hop A1A C1C D2C E2C F3C Routing Table Node B

9 Slide 9 2008/2009COMM3380 Configure RIP on Cisco Router Router1#configure terminal Router1(config)#interface fastethernet0/0 Router1(config-if)#ip address 192.168.14.1 255.255.255.0 Router1(config-if)#no shutdown Router1(config-if)#interface fastethernet0/1 Router1(config-if)#ip address 192.168.15.1 255.255.255.0 Router1(config-if)#no shutdown Router1(config-if)#interface serial0/1/0 Router1(config-if)#ip address 192.168.19.1 255.255.255.0 Router1(config-if)#no shutdown Router1(config-if)#router rip Router1(config-router)#network 192.168.14.0 Router1(config-router)#network 192.168.15.0 Router1(config-router)#network 192.168.19.0

10 Slide 10 2008/2009COMM3380 RIP Example – Router 1 C 192.168.14.0/24 is directly connected, FE0/0 C 192.168.15.0/24 is directly connected, S0 C 192.168.19.0/24 is directly connected, FE0/1 R 192.168.16.0/24 via 192.168.15.2, S0 R 192.168.17.0/24 via 192.168.19.2, FE0/1 via 192.168.15.2, S0 R 192.168.18.0/24 via 192.168.19.2, FE0/1 Network 192.168.19.0 Node A Router3 ( Node E ) Router2 ( Node C ) [192.168.14.10] Router1 ( Node B ) [192.168.14.1] Serial1 192.168.15.2 FE0/0 [192.168.18.1] Serial0 192.168.17.2 FE0/1 192.168.19.1 FE0/1 192.168.19.2 FE0/0 Serial0 192.168.15.1 FE0/1 192.168.16.1 Serial0 192.168.17.1 Network 192.168.14.0 Node F Network 192.168.18.0 [192.168.18.30] Network 192.168.15.0 Network 192.168.17.0 Network 192.168.16.0 Hub [192.168.16.101] Node D

11 Slide 11 2008/2009COMM3380 Distance Vector Protocol Example Routing Information Protocol (RIP)

12 Slide 12 2008/2009COMM3380 Routing Information Protocol (RIP) RIP is an IGP for use within an autonomous system Designed for small networks with same speed links Uses UDP port 520 Request and Response messages - requests update and responds with update Broadcasts request out every RIP configured interface on start up of routing protocol. Upon receipt of response message, routes are checked in current routing table, if absent, routes are added, if existing, route only updated if it has a lower hop count

13 Slide 13 2008/2009COMM3380 RIP broadcast from a neighbouring router If the destination is not in the table, then create a new table entry for it. If the destination is already in the table via a different route but the received list gives a shorter distance to it, then change the table entry. If the destination is already in the table via the same route, but the received list gives a distance that is different then change the table entry. Otherwise do nothing with this destination/distance pair of values.

14 Slide 14 2008/2009COMM3380 RIP : Count to infinity problem B – X -> distance = 0 A – X -> distance = 1 If connection from B to X fails -> B – X marked unreachable A broadcasts DV list B sees A-X at distance 1 -> thinks link B-A-X exists with distance 2 -> updates table -> routing loop between A and B for traffic destined for X

15 Slide 15 2008/2009COMM3380 RIP : Count to infinity problem Now B broadcast its DV list with X reachable via A at distance = 2 A sees distance B-X has changed from distance 0 to 2 - > A updates A-X to distance = 3 A broadcasts -> B see A-X with distance=3 -> B updates entry B-X to distance=4 Continues until distance = 16 reached -> unreachable

16 Slide 16 2008/2009COMM3380 Split Horizon Solves trivial count-to-infinity problem Routers never advertise the cost of a destination back to its next hop, i.e. where it learned it from Poison Reverse -> advertise back infinity

17 Slide 17 2008/2009COMM3380 Routing Loop Avoidance Routing loops can still occur in any network due to router configuration errors. To prevent -> IP packet has a time to live (TTL) value in its header-> decremented by each router as it receives the packet. If the TTL of a packet becomes zero, the router discards it.

18 Slide 18 2008/2009COMM3380 One RIP message can have up to 25 route entries 1: request 2: response 2: for IP 0…0: request full rou- ting table Address of destination Cost (measured in hops) 1: RIPv1 RIPv1 Packet Format Ref: Leibeherr

19 Slide 19 2008/2009COMM3380 RIPv2 Packet Format Ref: Leibeherr Used to carry information from other routing protocols (e.g., autonomous system number) Identifies a better next-hop address on the same subnet than the advertising router, if one exists (otherwise 0….0) 2: RIPv2 Subnet mask for IP address

20 Slide 20 2008/2009COMM3380 RIP Version 2 Changes Classless routing and subnet masks in routing updates Routing update authentication Next-hop addresses for each route External route tags Multicast route updates, instead of broadcast Same procedures, timers & functions of v1

21 Slide 21 2008/2009COMM3380 RIP v1 & v2 Metric of hop count only allowable of 1-15. At 16, destination is considered unreachable, to prevent routing loops. This limits the depth of a network to run RIP. Timers –Update timer - Router sends gratuitous Response message out each interface every 30 seconds with full routing table. –Expiration timer - initialized to 180 seconds for a new route and reset upon update of that route. If timer expires, hop count set to 16, unreachable, but still advertised. –Flush timer - set to 240 seconds upon initialization, once expired, route is removed from routing table and no longer advertise. –Holddown timer - Cisco only - set for 180 seconds when updated route has a higher hop count than previous advertisement.

22 Slide 22 2008/2009COMM3380 Link State Protocol Example Open Shortest Path First (OSPF)

23 Slide 23 2008/2009COMM3380 Open Shortest Path First (OSPF) Interior Gateway Protocol (IGP) Most widely used Link State protocol –Link State packet dissemination –Topology map at each router –Route computation using Shortest Path First (SPF) algorithm (Dijkstra’ algorithm) Link state information flooded to all nodes Fast convergence OSPF messages sent directly over IP

24 Slide 24 2008/2009COMM3380 OSPF Router Operation Link State -> status of link between two routers, relationship to neighbour router Cost - metric assigned to link ( cisco -> based on media speed (10^8/ link bandwidth)) LSA - Link-State Advertisements - includes interfaces, associated cost and network information. Link-State Database (Topology Database) –listing of link-state entries from all other routers in area, –same database for each router in an area, generated from LSAs received Received LSAs IP Routing Table Dijkstra’s Algorithm Link State Database LSAs are flooded to other interfaces Ref: Leibeherr

25 Slide 25 2008/2009COMM3380 OSPF Operation 1.OSPF enabled routers send hello packets out all OSPF enabled interfaces 2.Some neighbours form adjacencies based on matching hello packet parameters. 3.Routers send Link State Advertisements (LSA) over its adjacencies., LSA = (link id, state of the link, cost, neighbours of the link) 4.Routers receives other LSAs and records it in its Link State Database. Then it forwards the LSA out its enabled interfaces. 5.LSAs flood the OSPF area and each router has same LSA database. 6.Router uses SPF Algorithm to build a SPF tree describing the shortest path to every destination. 7.Router uses the SPF tree to build its routing table.. Ref: Leibeherr

26 Slide 26 2008/2009COMM3380 Hierarchical OSPF ASBR: Autonomous System Border Router ABR:Area Border Router IA:Intra-area Router (ASBR) (ABR) (IA) Ref: Kurose Ref: Leibeherr

27 Slide 27 2008/2009COMM3380 Cisco Router Example Single-Area OSPF Configuration

28 Slide 28 2008/2009COMM3380 Configuring the OSPF Routing Process Ref: CISCO

29 Slide 29 2008/2009COMM3380 Configuring OSPF Loopback Address and Router Priority Ref: CISCO

30 Slide 30 2008/2009COMM3380 Configuring Router Priority The priorities can be set to any value from 0 to 255. A value of 0 prevents that router from being elected. A router with the highest OSPF priority will win the election for DR. Ref: CISCO

31 Slide 31 2008/2009COMM3380 Modifying OSPF Cost Metric Ref: CISCO

32 Slide 32 2008/2009COMM3380 Verifying OSPF Configuration show ip protocol show ip route show ip ospf interface shop ip ospf show ip ospf neighbour detail show ip ospf database

33 Slide 33 2008/2009COMM3380 Autonomous System (AS) R R RR R R R R R R R AS AS – Autonomous System R - Router Interior Gateway Protocols Exterior Gateway Protocols Interior Gateway Protocols

34 Slide 34 2008/2009COMM3380

35 Slide 35 2008/2009COMM3380 BGP BGP = Border Gateway Protocol Currently in version 4 Interdomain routing protocol for routing between autonomous systems Uses TCP to send routing messages BGP is neither a link state, nor a distance vector protocol – often called path-vector protocol as BGP routing message contain complete AS-paths. Network administrators can specify routing policies

36 Slide 36 2008/2009COMM3380 Internet inter-AS routing: BGP BGP provides each AS a means to: 1.Obtain subnet reachability information from neighbouring ASs. 2.Propagate the reachability information to all routers internal to the AS. 3.Determine “good” routes to subnets based on reachability information and policy. Allows a subnet to advertise its existence to rest of the Internet: “I am here” BGP’s goal is to find any path (not an optimal one). Since the internals of the AS are never revealed, finding an optimal path is not feasible.

37 Slide 37 2008/2009COMM3380 BGP basics Pairs of routers (BGP peers) exchange routing info over semi- permanent TCP connections: BGP sessions When AS2 advertises a network prefix to AS1, AS2 is “promising” it will forward any datagrams destined to that prefix towards the prefix. When advertising a prefix, advert includes BGP attributes. –prefix + attributes = “route” Two important attributes: –AS-PATH: contains the ASs through which the advert for the prefix passed: AS 67 AS 17 –NEXT-HOP: Indicates the specific internal-AS router to next-hop AS. (There may be multiple links from current AS to next-hop-AS.) When gateway router receives route advert, uses import policy to accept/decline.

38 Slide 38 2008/2009COMM3380 BGP route selection Router may learn about more than 1 route to same prefix. Router must select route. Elimination rules: 1.Local preference value attribute: policy decision 2.Shortest AS-PATH 3.Closest NEXT-HOP router: hot potato routing 4.Additional criteria

39 Slide 39 2008/2009COMM3380 BGP Messages BGP uses a 16-byte marker format to delimit BGP messages. –Length field contains the length of the entire BGP message, including the common message header –Type field specifies the type of BGP message.

40 Slide 40 2008/2009COMM3380 BGP messages BGP messages exchanged using TCP. BGP messages: –OPEN: opens TCP connection to peer and authenticates sender –UPDATE: advertises new path (or withdraws old) –KEEPALIVE keeps connection alive in absence of UPDATES; also ACKs OPEN request –NOTIFICATION: reports errors in previous msg; also used to close connection –ROUTE-REFRESH request messages

41 Slide 41 2008/2009COMM3380 TCP/IP Protocol Suite Network Layer IP –addressing conventions –datagram format –packet handling conventions ICMP –error reporting –router “signaling” Routing protocols –path selection –RIP, OSPF, BGP ARP Hardware Interface RARP TCPUDP PINGFTPtracertBOOTP Physical Media TelnetDNSTFTPSMTP Application Layer Transport Layer Link Layer ICMP IP IGMP Network Layer Routing Protocols e.g. RIP, OSPF, BGP routing table

42 Slide 42 2008/2009COMM3380 TCP/IP Protocol Suite Network Layer –IP, ICMP Routing protocols RIP, OSPF, BGP Transport Layer –UDP, TCP ARP Hardware Interface RARP ICMP IP IGMP TCPUDP PINGFTPtracertBOOTP Physical Media Transport Layer Network Layer Link Layer Application Layer TelnetDNSTFTPSMTP

43 Slide 43 2008/2009COMM3380 TCP/IP – Transport Layer Responsible for end-to-end delivery of entire message –Port Numbers –Segmentation and Reassemble –Connection Control –End-to-End Flow Control –End-to-End Error Control

44 Slide 44 2008/2009COMM3380 Transport Layer Protocols User Datagram Protocol (UDP) –Connectionless unreliable service Transmission Control Protocol (TCP) –Connection-oriented reliable stream service ARP Hardware Interface RARP ICMP IP IGMP TCPUDP PINGFTPtracertBOOTP Physical Media Transport Layer Network Layer Link Layer Application Layer TelnetDNSTFTPSMTP TCP/IP Protocol Suite


Download ppt "Slide 1 2008/2009COMM3380 Brief Review of Last Lecture Routing Algorithms –Distance vector e.g. RIP –Link State / Shortest Path First e.g. OSPF."

Similar presentations


Ads by Google