450 likes | 652 Views
Unicast Routing Protocols: RIP, OSPF, and BGP. An internet is a combination of networks connected by routers. When a datagram goes from a source to a destination, it will probably pass through many routers until it reaches the router attached to the destination network. Autonomous systems.
E N D
Unicast Routing Protocols:RIP, OSPF, and BGP An internet is a combination of networks connected by routers. When a datagram goes from a source to a destination, it will probably pass through many routers until it reaches the router attached to the destination network.
Distance Vector Routing • In distance vector routing, the least cost route between any two nodes is the route with minimum distance. In this protocol each node maintains a vector (table) of minimum distances to every node. • Updates are send to directly connected neighbors only.
RIP • The Routing Information Protocol (RIP) is an intra-domain (interior) routing protocol used inside an autonomous system. It is a very simple protocol based on distance vector routing. RIP implements distance vector routing directly with some considerations.
Periodic timer • It controls the advertising of regular update message (25 ~ 30 sec). • Expiration timer • It governs the validity of a route (180 sec) • The route is considered expired and the hop count of the route is set to 16. • Garbage collection timer • A invalid route is not purged from the routing table until this timer expires (120 sec).
Limitations of RIP V1 overcomed in v2 • Route tag (autonomous system number) able receiving information from inter domain routing protocol. • Support classless addressing and CIDR (classless interdomain routing). • Authentication prevent from unauthorised advertisement.
Note • RIP messages are encapsulated with UDP Datagram. • Port assign to rip in UDP is 520.
Disadvantages of RIP • RIP treat all network as equal. • Periodic timer is of short time. • Not for large network .(infinity at 16).
Link State Routing Link state routing has a different philosophy from that of distance vector routing. In link state routing, if each node in the domain has the entire topology of the domain—the list of nodes and links, how they are connected including the type, cost (metric), and the condition of the links (up or down)—the node can use the Dijkstra algorithm to build a routing table. Updates are send to entire network.ie network have visibility of entire network of that area.
OSPF • The Open Shortest Path First (OSPF) protocol is an intradomain routing protocol based on link state routing. Its domain is also an autonomous system.
Areas • A collection of networks with area ID • Routers inside an area flood the area with routing information • Area border routers summarize the information about the area and send it to other areas • Backbone area and backbone routers • All of the area inside an AS must be connected to the backbone
Metric • Administrator assign cost to each route. • Cost based on types of services.(minimum delay,maximum throughput etc). • 1 router can have many routing tables based on different types of service.
Two routers connect directly (eg routers connected with telephone line)
Hello packetOSPF uses the hello message to create neighborhood relationship and to test the reachability of neighbors. This is the first step in link state routing. Before a router can flood all of the other routers with information about its neighbors, it must first greet it neighbors.
Hello packet • Network mask :defines network mask over which hello message is send. • Hello interval : seconds between hello messages. • E Flag : if set then stub area. • T Flag : if set then router support multiple metric. • Priority : highest priority router chosen as designated router. • Dead interval : seconds must pass before neighbor is consider dead. • Neighbor routing address : Current list of all the neighbours from which the sending router has received the hello message.
Note • OSPF packets encapsulated in IP Datagram.
Differences RIP OSPF • Keeps only track of closest router for each destination address. • It is simpler ,older,easy to configure,uses less CPU . • Only metric used is hope count. • Can be used in small business needs. • Uses tree to keep track of entire paths. • More overhead .Provide more options,better,faster reaction time to faliure (convergence). • Build cost according to router’s services. • Widely used for business enterprises & isp’s.
Problems in DVR and LSR • When the domain of operation becomes large? • Distance vector routing is subject to instability if there is more than a few hops in the domain of operation. • Link state routing needs a huge amount of resources to calculate routing tables. It also creates heavy traffic because of flooding. • Need for a third routing protocol.
Path vector routing • Path vector routing is similar to distance vector routing. There is at least one node, called the speaker node, in each AS that creates a routing table and advertises it to speaker nodes in the neighboring ASs..
Speaker node: a node working on behalf of complete AS.A speaker node advertises the path, not the metric of the nodes, in its AS or other ASs. Initialization : At beginning each speaker node can only the reachability of nodes inside its autonomous system.
Sharing • A speaker in an AS shares its table with immediate neighbors • Updating • Adding the nodes that are not in its routing table and adding its own AS and the AS that sent the table • The routing table shows the path completely
Broder Gateway Protocol • Border Gateway Protocol (BGP) is an interdomain routing protocol using path vector routing. It first appeared in 1989 and has gone through four versions.
Types of autonomous system • Stub AS • Only one connection to another AS (only a source or sink for data traffic) eg small local ISP. • Multihomed AS • More than one connection to other AS, but it is still only a source or sink for data traffic. Eg large corporation connecting regional AS. • Transit AS • Multihomed AS that also allows transient traffic eg national and international isp’s
Path Attribute (help receiving router , to make better decision) • Well Known Mandatory attributes - • ORIGIN • The source of the routing information (RIP, OSPF, etc) • AS_PATH • The list of ASs through which the destination can be reached • NEXT-HOP • The next router to which the data packet should be sent • Optional attribues • Optional transitive • Optional non transitine
BGP packets • Open : to create neighbor relationship (open tcp connection). • Update : it is used by a router to withdraw destination that are previously advertised, announce a route to new destination or both. • Keep alive : regularly send by routers to confirm that they are alive or send in response of open message. • Notification : send when there is error or router want to close the connection.
Note • Once opened the connection update, keepalive and notification messages is continued until cease notification is sent. • BGP uses services of tcp on port 179.