Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Internet standard routing protocols


Published on

Click Here

Online Educational Website For You

Published in: Education, Technology
  • Be the first to comment

Internet standard routing protocols

  2. 2. What is Routing ?• Routing is the process for forwarding a packet between the source and destination networks (or subnets)• Routing devices perform two main tasks – Routing – • Topology discovery • Path (or route) discovery – Switching • Process of forwarding the packet between the inbound and outbound interface • Finding path to the destination• In IP the switching is done on the per packet basis (L3 forwarding) – Connectionless mode: routers forward traffic on the basis of the address contained in the packet header • Each packet is switched independently from others 2
  3. 3. Routing Information• Each router maintains routing table that contains the routing information necessary to find path to the destination• Routing table contains paths to all known destination in the network R [120/4] via 00:00:20 Serial0• R How the route was learned e.g. From RIP• Destination network or subnet• [120 Administrative distance of the routing protocol• 4] Metric i.e. hop count in case of RIP• via Next-hop router address• 00:00:20 Age of routing information• Serial0 Outbound interface 3
  4. 4. Administrative Distance Values• Administrative distance defines the preference of routes learned via different protocols (which route can be trusted more over the others)• Defined values – Connected interface 0 – Static route out of the interface 0 – Static route to a next hop router 1 – EIGRP summary route 5 – External BGP 20 – Internal EIGRP 90 – IGRP 100 – OSPF 110 – IS-IS 115 – RIP 120 – EGP 140 – External EIGRP 170 – Internal BGP 200 – Unknown 255 4
  5. 5. Routing in the Internet• The Internet is organized as a set of independent Autonomous Systems (AS)• The AS is a collection of networks under single technical administration• The AS appears to the outside world to have coherent routing plan and presents unique view what destination are reachable through it• The AS can use many different routing protocols – The routing protocols used inside the AS are called the Interior Routing Protocols (IGP)• A separate protocol is used to transfer information between ASs – The routing protocol used between the ASs is called the Exterior Routing Protocol (EGP) 5
  6. 6. AS Network Model• The AS is modelled as a collection of routers, hosts and networks – The network can be point to point or multipoint link that interconnect hosts and routers e.g. Ethernet, Token Ring or serial link (we distinguish broadcast or non broadcast networks) – Host can be connected to many networks – Only Routers can transfer packets between networks• The network denotes the IP subnet (in IP addressing scheme) Cost 1 Router A Cost 1 Router B Cost 1 Router C Cost 1 Network Network Network Network A B C DHost A Host B Network Network E F 6 Cost 1 Router D Cost 1
  7. 7. Routing Protocols for IP NetworksProtocol Type Scalability Metric IP classesRIP-1 Distance Small Hop count Classful vectorRIP-2 Distance Small Hop count Classless vectorOSPF-2 Link state Large Cost ClasslessIS-IS Link state Very large Cost ClasslessIGRP Distance Medium Bandwidth, Classful vector delay, load, MTU, reliabilityEIGRP Dual Bandwidth, Classless Large delay, load, MTU, reliabilityBGP Distance Large Vector of attributes Classless vector 7
  8. 8. Classful Routing• In the classful routing the network mask is not propagated throughout the network – If the path is on the directly connected network the the router assumes the same mask as the advertising device – If the path is not on the directly connected network the default mask is assumed • the paths are summarised at the network boundary• All interfaces on the subneted network must use the same mask – Address space is used inefficiently e.g. in case of point-to- point links 8
  9. 9. Classless Routing• In the classless routing the subnet’s masks are propagated together with the subnet’s addresses• More detailed information about network topology is possible – Subnets may not be continuous• Efficient use of address space – e.g. Only two addresses can be used on point-to-point links• Route summarisation possible at any bit position (VLSM) – Small routing tables• CIDR - Classless Interdomain Routing 9
  10. 10. Routing Information Protocol (RIP) 10
  11. 11. Routing Information Protocol (RIP)• RIP is an IGP protocol based on the Bellman-Ford (or distance vector) algorithm – Distances between networks are exchange between routers – The information is exchange only between adjacent routers• RIP was first developed for the Xerox Network Systems (XNS) architecture• In 1969 RIP was adopted for ARPANET (with modification for IP addressing support) – The RIP is intended to be used within IP-based Internet• RIP is developed for medium-size networks (AS) and have the following limitations – The longest path is limited to 15 hops – Counting to infinity for loop resolution 11 – Fixed (hop) metrics
  12. 12. Routing Information Protocol (RIP)• Each router or host that participates in the routing protocol maintains routing table• Routing entry – Standard routing information • Destination network address • Next hop router address • Interface • Metrics – Protocol specific information • Timers – the amount of time since the entry was last updated • Flags (new route, withdrawn route etc.) 12
  13. 13. Routing Information Protocol (RIP)• The destination on the same network can be represented by single entry that describes routing to the given network – The details of routing within a given network are not visible to the IP layer• The routers/hosts exchange information about known paths in periodical fashion• The routers/hosts are initialised with the networks directly connected to them• Each router/host builds its routing table from information provided from its neighbours Routing information Routing information 13
  14. 14. Handling Topology Changes• There is a need to detect crashed routers or routers that were disconnected from the rest of the network• The above is done by timing out the routing tables entry – When the update for particular destination is not seen for some time the destination is declared to be unreachable – The update is supposed to come from the same router as the previous one – The default timeout is 180 seconds• If the given network is detected to be lost it is indicated as unreachable by the router(s) that are directly connected to it by setting the cost for it to infinity – The infinity is the cost of 16 – This is done by normal update procedure 14
  15. 15. Counting to Infinity B 1 Routes form all routers to the target network 1 1 10 1 Target network D: directly connected, metric 1 1 C D B: via D, metric 2 A C: via B, metric 3 A: via B, metric 3• Link B-D goes downB notice that the link B-D is gone:D: dir 1 dir 1 dir 1 .... dir 1 dir 1B: unreach C4 C5 .... C 11 C 12C: B 3 A4 A5 .... A 11 D 11A: B 3 C4 C5 .... C 11 C 12 • The value for infinity is tradeoff between the network size and the speed of convergence 15
  16. 16. Split Horizon• The „counting to infinity” problem arises when the router sends back the reachability information to the B router that generated the original path• To prevent this the router do not send back the routing information about path learn from given neighbour to this neighbour – split horizon Path to X Path to X A B C 16
  17. 17. Split horizon with poisoned reverse• Split horizon with poisoned reverse assumes that such routes are included in the message with the cost of infinity – Breaks the loop between two adjacent routers – Increases the size of routing messages• In case of broadcast network router claims network unreachablility to every router on that network (if it learn the path from one of them) Split horizon D Path to X X unreachable Path to X Path to X A B C Split horizon with X unreachable 17 poisoned reverse
  18. 18. Triggered Updates• Split horizon with poisoned reverse do not prevent from all loops e.g. three routers can still establish a loop pointing at each other in a circle – Such loop will be resolve by counting to infinity, however this takes some time• In triggered update when the router changes the metrics for given path it sends update message immediately• The triggered updates for deleted routes are mandatory Triggered update Ignored A Accepted Ignored 18
  19. 19. Addressing• Each router knows the IP address and subnet mask for directly connected networks• The router sends outside given network only the IP address of this network – The routers not directly connected to the network know nothing about its subnetting – Without subnet mask it is not possible to distinguish the address of subnet from the address of node in that subnet – All addresses that are not network address are treated as node addresses• The subnet/host addresses are sent only to the routers that are directly connected to given network C2, C3 A A, B, C – regular networks C1 C1, C2, C3 – subnets in networks C B C2 C C3 19
  20. 20. Routing Table• The RIP routing table can contain the following information: – Addresses of directly connected network – Addresses learnt from neighbours – Addresses configured statically – Addresses learnt from other protocol either EGP or IGP – Default route (• The creation of default routes in RIP is implementation specific – For example the BGP routers (the gateways to other AS) can generate default route • The outside traffic will be sent to the closest border router 20
  21. 21. Timers• Update timer - every 30 seconds the RIP process sends response message to its neighbours – To prevent from message synchronisation (especially on broadcast networks) the timer must be independent of the system load or small offset +-5 seconds used• Timeout timer – the timeout is initialised when the route is established, the route timeout is 180 seconds• Garbage collection timer – after the route is declared to be deleted it is kept in the routing table and included in the update messages for 120 second – If new update for the deleted route comes before the garbage timer expires the route is updated and the timer is cancelled 21
  22. 22. Request Message• A request message is used to obtain whole or part of the routing table of the router• Normally this message is sent by new router that boot up and need to fill its routing table• The request message can be sent by other entity than RIP router (for monitoring purposes) – In this case the request message is sent from other port than the RIP port, the answer is sent back to this port• If the request message contains one RIP entry with AFI field zero and metric 16 it is treated as the request for the whole routing table – Split horizon is done• In other case the RIP entry are evaluated one by one and interpreted as an update request for the specific address (given in the address field) – Split horizon is not done 22
  23. 23. Response Message• The response message is sent in the following cases – Response to the specific query – Normal update – Triggered update• Message validation – Response was sent from the RIP port – The source IP address must be checked against valid neighbour and it must be in the directly connected network – The message must be check if it was not generated by itself (on broadcast network router can receive its own messages)• RIP entry validation – Correct destination address – Correct metric (between 1 and 16) 23
  24. 24. Open Shortest Path First (OSPF) 24
  25. 25. Open Shortest Path First• OSPF is an IGP protocol based on the Dijnkstra algorithm – Link state information LSA (Link State Advertisement) is exchanged between routers – The LSA are exchange only when the link state changes• OSPF addresses the scalability issues of traditional distance vector protocols like RIP – Fast convergence – Reduced routing traffic – Support for large networks• OSPF uses IP as its transport protocol – OSPF is protocol number 89 25
  26. 26. Open Shortest Path First• Link state routing protocols – Each router maintains the topology database derived from other routers – The routing table is build from the topological database • The router runs SPF algorithm to construct tree of shortest paths to all destination with itself as root – Only changes in network topology are advertised between routers• OSPF main characteristics – Hierarchical routing - area definition – VLSM support (subnet and mask propagation) – No network topological limits – Single value metrics - link cost • Links costs are usually set in proportion to the bandwidth 26 – Load balancing over equal cost paths (up to 6 paths)
  27. 27. OSPF Terminology• Interface – the connection between router and the network (represented as link in the topology database)• LSA – data describing the status of the router links and networks• Cost – weight assigned to the link• Area – a collection of routers that have the same are identification• Neighbour – two routers on the same network• Adjacency - relationship between neighbour routers established for the purpose of exchanging routing information• Designated router - the router that generates LSA for given broadcast or NBMA network• Hello protocol - protocol used to detect neighbours 27
  28. 28. OSPF Topology Database• All routers and network are represented as vertices• All interfaces are represented as edges• Point to point links are represented as edges Net- Net- work work Net- Net- Net- work work work Net- work Net- work Net- work Net- 28 work
  29. 29. OSPF Topologies• Types of topologies – Broadcast multi-access networks • Ethernet • Token Ring – Point-to-point links • Serial lines – Non-broadcast Multi-access Networks (NBMA) • X.25 • Frame Relay • ATM 29
  30. 30. Hello Protocol• Hello protocol is used for establishing neighbour relationship on broadcast network – Designated Router (DR) and Backup Designated Router (BDR) are elected on broadcast networks – Adjacency between routers is established• Hello protocol is used for keep alive procedure – Hello packets are periodically send out from each router interface with the broadcast IP address (allOSPFRouters) – typically the hello packets are sent every 10 seconds• Hello protocol is used to discover changes in the network topology – Link failures/deletion – Link addition 30
  31. 31. Hello Packet• Hello packets contain the following information – Router ID - the highest IP number on the active interface – Hello and dead intervals - the time between consecutive hello messages and the timeout value for detecting link or neighbour failure – Neighbours - the list of routers IDs with which the bi-directional relation was established – Area ID - the router must be on the same subnet and in the same are to communicate – Router priority - 8 bit number denoting router priority in the DR and BDR designation process – DR and BDR router addresses – Authentication password – Stub are flags 31
  32. 32. Designated Router• DR router represents the network to other routers – Routers on broadcast network must elect the DR and BDR routers during the hello procedure – The router with the highest priority becomes DR router – The router with the second priority in order becomes the BDR router• The BDR router becomes active when the DR router goes out of service• Each router on the network establishes adjacency with the DR router• Only the DR router sends LSA for given network – This decreases the routing traffic 32
  33. 33. Hello protocol• Exchange process is performed at router startup – Newly started router sends out hello packets on all interfaces – All routers that received the hello packets add the new router to neighbour list – The routers send unicast replay to the new router • Including their IDs – The new router updates its neighbour list (when it sees its ID in the received relay) - the routers establishes bi-directional communication• The routers on the network determined who the DR and BDR is (exstart state)• After the exchange process routers periodically exchange hello packets 33
  34. 34. Hello Protocol A E0 E1 B Down state I am router ID and I see no one Init state Router B Neighbour list int E1 I am router ID and I see ANeighbour list172.16.5.2/24 int E0 Two way state 34
  35. 35. Exchange Protocol• Exchange Protocol is used to synchronise the neighbour routers databases• After the DR and BDR election, routers that are not DR or BDR establishes the adjacency with the DR and BDR routers – The master-slave relationship is established – The router with the higher ID becomes the master• The adjacent routers exchange the DBD packets – When the slave router receives DBD it send ack to the master router with its own LSAs – Next each router compares the received LSA sequence numbers with these it has, if some LSAs in the router are older it sends the LSR (Link State Request) packet for these LSAs – The other router responses with the LSU (Link State Update) packet that contains full LSAs information – The router acks the LSU packet• 35 After the exchange protocol each router pre-computes its routing table entries
  36. 36. Exchange Protocol A E0 E1 B exstart state I will start exchange because I have router ID Hello No I will start exchange because I have higher router ID Hello exchange state Here is the summary of my link-state database DBD Here is the summary of my link-state database DBD AckLSAack LSAack 36
  37. 37. Exchange Protocol A E0 loading state E1 B I need information for LSR Here is the information for LSU AckLSAack full state Data transfer possible 37
  38. 38. Maintaining Routing Table• Each LSA is associated with some timer usually 30 minutes• When the LSA timer expires the router that originates the LSA sends LSU to verify that the link is still active• When a router receives the LSU packets it does the following – it checks if the LSA is in its database if so it compares the sequence numbers if are the same the LSU is ignored – if the LSA is not in the database the database is updated and the flooding process is started – if the sequence number higher start flooding process if not propagate the LSU – after the flooding process pre-compute new routing table 38
  39. 39. Solution - OSPF Areas• In OSPF large network can be split into many areas• OSPF areas allow to implement hierarchical routing thus the following benefits can be achieved – individual LSA updates are not propagated out of the are thus the change in one area does not incur routing table recalculation out side this area – smaller routing tables - the detailed routing information is kept within area, the route summarisation can be done for the routes that are send out of the area, with proper addressing even only one route can be propagated out of the area – reduce routing traffic in the network - more bandwidth available to data packets 39
  40. 40. OSPF Multi-area Terminology• Routers types – Internal - routers with all interface in the same area – backbone routers - routers with at least one interface in the backbone area 0 – Area border router(ABR) - routers that have interfaces attached to many areas, maintain link state database for each area, do LSA summarisation before sending information to other areas – Autonomous system boundary router (ASBR) - routers that have at least one interface into external network• Routers can be of more than one type 40
  41. 41. OSPF Multi-area Terminology• LSA types – type 1 - router link entry - generated by each router for each area it belongs to, describe the sate of the routers links to given area, flooded only within area – type 2 - network link entry - generated by the DR for multiaccess networks, describe the set of routers attached to the network, flooded only within area – type 3/4 - summary link entry - generated by ABR, describe the ABR link state and the routers internal to the area, flooded via backbone to other areas, type 3 describe routes o the network, type 4 describe routes to ASBR – type 5 - external link entry - generated by ASBR, describe routes o the destination outside the AS, flooded to backbone and normal areas 41
  42. 42. OSPF Multi-area Terminology• Area types – standard area - accept link updates and route summaries – backbone area - special area that interconnects other areas, behaves as standard area – stub area - area that do not accept the external LSA, the routers in this area use the default route when they need to send traffic out of the AS – totally stub areas - do not accept external LSA or internal LSA from other areas, the routers in this area use default route when they need to send traffic out of the area• Data traffic sent for destination within the area is sent through this area only• Data traffic sent for destination outside the area always crosses the backbone area – packet leaves the originating area via its ABR – packet enters the destination area via its ABR 42
  43. 43. Border Gateway Protocol (BGP) 43
  44. 44. BGP-4 Basics• BGP is Inter-Autonomous System routing protocol (EGP) – The BGP is used to route traffic between different AS systems – BGP is used to interconnect ISP networks or connect Enterprise networks to ISPs• BGP is based on the EGP protocol (RFC 904)• BGP uses TCP on port 179 as its transport protocol – BGP assumes reliable transmission protocol – Periodic keep alive to verify TCP connectivity 44
  45. 45. BGP-4 Basics• BGP is a distance vector routing protocol – Exchanges complicated path attributes (vector of attributes) – Hierarchical topology is not required – Incremental triggered updates• Support for classless routing (CIDR) – Support for supernetting• Route aggregation• Policy routing – Only rules conformant to hop-by-hop routing scheme possible• Only routes used in the AS can be advertised to other ASs 45
  46. 46. When to Use BGP?• When the BGP is needed? – An AS allows to pass packets between different Ass – An AS has multiply connection to other AS – The AS wants to manipulate the flows of traffic leaving or entering this AS• BGP is CPU and memory consuming – Typically BGP routing table has over route 70000 entries from over 6000 ASs 46