1 / 44

Brief Review of Last Lecture

Brief Review of Last Lecture. Routing Algorithms Distance vector e.g. RIP Link State / Shortest Path First e.g. OSPF. Routing Algorithms. Distance Vector Routing Each node knows the distance (=cost) to its directly connected neighbours

Télécharger la présentation

Brief Review of Last Lecture

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. 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 COMM3380

  3. 5 3 B C 5 2 F 2 3 1 A 2 D E 1 1 Bellman-FordAlgorithm dx(y) = min { c(x,v) + dv(y) } COMM3380

  4. 5 Dijsktra’sAlgorithm 3 B C 5 2 F 2 3 1 A 2 • D(v) = min{ D(v), D(w) + c(w,v) } D E 1 1 Shortest Path First (SPF) COMM3380

  5. A 1 2 D B 1 E 2 1 F C Node A’s View of Network Routing Table Node A COMM3380

  6. Network 192.168.19.0 Hub Router1 (Node B ) FE0/1 192.168.19.1 Router3 (Node E ) FE0/1 192.168.19.2 Serial0 192.168.15.1 Serial0 192.168.17.2 Network 192.168.15.0 Network 192.168.17.0 FE0/0 FE0/0 [192.168.18.1] [192.168.14.1] Serial0 192.168.17.1 Router2 (Node C ) Serial1 192.168.15.2 Network 192.168.14.0 Network 192.168.18.0 FE0/1 192.168.16.1 Node A Node F [192.168.14.10] [192.168.18.30] Network 192.168.16.0 [192.168.16.101] Node D COMM3380

  7. Network Graph 1 1 1 B C E 1 1 1 A D F Routing Table Node A Routing Table Node B COMM3380

  8. Network Graph ∞ 1 1 B C E 1 1 1 A D F Routing Table Node A Routing Table Node B COMM3380

  9. 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 COMM3380

  10. Network 192.168.19.0 Hub Router1 (Node B ) FE0/1 192.168.19.1 Router3 (Node E ) FE0/1 192.168.19.2 Serial0 192.168.15.1 Serial0 192.168.17.2 Network 192.168.15.0 Network 192.168.17.0 FE0/0 FE0/0 [192.168.18.1] [192.168.14.1] Serial0 192.168.17.1 Router2 (Node C ) Serial1 192.168.15.2 Network 192.168.14.0 Network 192.168.18.0 FE0/1 192.168.16.1 Node A Node F [192.168.14.10] [192.168.18.30] Network 192.168.16.0 [192.168.16.101] Node D 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 COMM3380

  11. Distance Vector Protocol Example Routing Information Protocol (RIP) COMM3380

  12. 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 COMM3380

  13. 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. COMM3380

  14. 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 COMM3380

  15. 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 RIP : Count to infinity problem COMM3380

  16. 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 COMM3380

  17. 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. COMM3380

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

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

  20. 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 COMM3380

  21. 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. COMM3380

  22. Link State Protocol Example Open Shortest Path First (OSPF) COMM3380

  23. 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 COMM3380

  24. Ref: Leibeherr IP Routing Table Link StateDatabase Dijkstra’s Algorithm ReceivedLSAs LSAs are flooded to other interfaces 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 COMM3380

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

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

  27. Cisco Router Example Single-Area OSPF Configuration COMM3380

  28. Ref: CISCO Configuring the OSPF Routing Process COMM3380

  29. Ref: CISCO Configuring OSPF Loopback Address and Router Priority COMM3380

  30. Ref: CISCO 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. COMM3380

  31. Ref: CISCO Modifying OSPF Cost Metric COMM3380

  32. 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 COMM3380

  33. R R Autonomous System (AS) Interior Gateway Protocols AS R R R Interior Gateway Protocols Exterior Gateway Protocols R R R R AS AS R R AS – Autonomous System R - Router COMM3380

  34. COMM3380

  35. 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 COMM3380

  36. Internet inter-AS routing: BGP • BGP provides each AS a means to: • Obtain subnet reachability information from neighbouring ASs. • Propagate the reachability information to all routers internal to the AS. • 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. COMM3380

  37. 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. COMM3380

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

  39. 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. COMM3380

  40. 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 COMM3380

  41. Network Layer IP addressing conventions datagram format packet handling conventions ICMP error reporting router “signaling” Routing protocols path selection RIP, OSPF, BGP Network Layer Routing Protocols e.g. RIP, OSPF, BGP IGMP IP ICMP routing table TCP/IP Protocol Suite Application Layer PING Telnet FTP SMTP tracert BOOTP DNS TFTP Transport Layer TCP UDP ARP Hardware Interface RARP Link Layer Physical Media COMM3380

  42. PING Telnet FTP SMTP tracert BOOTP DNS TFTP Application Layer TCP UDP Transport Layer ICMP IGMP IP Network Layer ARP RARP Hardware Interface Link Layer Physical Media TCP/IP Protocol Suite • Network Layer • IP, ICMP • Routing protocols RIP, OSPF, BGP • Transport Layer • UDP, TCP COMM3380

  43. 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 COMM3380

  44. TCP/IP Protocol Suite PING Telnet FTP SMTP tracert BOOTP DNS TFTP Application Layer TCP UDP Transport Layer ICMP IGMP IP Network Layer ARP RARP Hardware Interface Link Layer Physical Media Transport Layer Protocols • User Datagram Protocol (UDP) • Connectionless unreliable service • Transmission Control Protocol (TCP) • Connection-oriented reliable stream service COMM3380

More Related