Dynamic Routing Lecture Notes PDF
Document Details
Uploaded by Deleted User
2022
Shreen Khalaf
Tags
Summary
These notes cover dynamic routing protocols, including interior gateway protocols (IGPs) like RIP and OSPF, and exterior gateway protocols (EGPs) like BGP, providing a comparison between OSPF and RIP. The lecture also explains classful and classless routing and offers examples on configuring these protocols.
Full Transcript
Dynamic Routing Created By Shreen Khalaf 11/5/2022 Routing Protocol A routing protocol defines the set of rules used by a router when it communicates routing information between neighboring routers. Type of Routing protocols In...
Dynamic Routing Created By Shreen Khalaf 11/5/2022 Routing Protocol A routing protocol defines the set of rules used by a router when it communicates routing information between neighboring routers. Type of Routing protocols Interior gateway protocols (IGPs) Exterior gateway protocols (EGPs) Created By Shreen Khalaf 11/5/2022 Interior gateway protocols IGPs: used to exchange routing information with routers in the same autonomous system (AS) (RIP, OSPF) An AS is either a single network or a collection of networks under a common administrative domain, which basically means that all routers sharing the same routing-table information are in the same AS Created By Shreen Khalaf 11/5/2022 Exterior gateway protocols EGPs are used to communicate between ASs An example of an EGP is Border Gateway Protocol (BGP) Created By Shreen Khalaf 11/5/2022 Interior Routing protocols Class Routing protocols Class Distance vector Link state Advanced distance vector Created By Shreen Khalaf 11/5/2022 Routing Protocols Class Distance vector The distance-vector protocols in use today find the best path to a remote network by judging distance (EX: RIP) Link state In link-state protocols, also called shortest- path-first (SPF) protocols,. OSPF is an IP routing protocol that’s completely link-state. Advanced distance vector Advanced distance-vector protocols use aspects of both distance vector and link- state protocols, and EIGRP is a great example Created By Shreen Khalaf 11/5/2022 Routing Information Protocol (RIP) In RIP routing, the route with the least number of hops to the network will be chosen as the best one. RIP sends the complete routing table out of all active interfaces every 30 seconds. It relies on hop count to determine the best way to a remote network RIP version 1 uses only classful routing, which means that all devices in the network must use the same subnet mask. RIP version 2 provides something called prefix routing and does send subnet mask information with its route updates. This is called classless routing Created By Shreen Khalaf 11/5/2022 RIP PROPERTIES Open standard Classful protocol It is a distance-vector, interior gateway protocol (IGP) used by routers to exchange routing information. RIP uses hop count to determine the best path between two locations. Hop count is the number of routers the packet must go through till it reaches the destination network. The maximum allowable number of hops a packet can traverse in an IP network implementing RIP is 0-15 hops. Its Advertisement Distance is 120. Created By Shreen Khalaf 11/5/2022 VERSIONS OF RIP RIP V1 Classful routing protocol It is a Distance vector routing protocol. It does not support VLSM. Broadcast ip address 255.255.255.255. It does not support authentication. Created By Shreen Khalaf 11/5/2022 VERSIONS OF RIP Cont. RIP V2. Classless routing protocol It is a Distance vector routing protocol. It supports VLSM. It allows periodic updates. Multicast address: 224.0.0.9. It supports authentication. (Plain text, MD5) Created By Shreen Khalaf 11/5/2022 CLASSFUL PROTOCOL Routing Protocol that do not send subnet mask information when a route update is sent out. All devices in the network must use the same subnet mask. E.g.: RIP V1 Created By Shreen Khalaf 11/5/2022 CLASSLESS PROTOCOL Routing that sends subnet mask information in the routing updates. Classless routing allows VLSM (Variable Length Subnet Masking) E.g.: RIP V2, EIGRP, & OSPF. Created By Shreen Khalaf 11/5/2022 SYNTAX FOR CONFIGURING RIP Created By Shreen Khalaf 11/5/2022 SYNTAX FOR CONFIGURING RIP Cont. Created By Shreen Khalaf 11/5/2022 Configuring RIP Routing Turn on the protocol with the router rip command Tell the RIP routing protocol the networks to advertise , enter your directly connected networks using network command. The network command tells the routing protocol which classful network to advertise Created By Shreen Khalaf 11/5/2022 Configuring RIP Routing Corp#config t Corp(config)#router rip Corp(config-router)#network 10.0.0.0 Corp(config-router)#network 172.16.0.0 Corp(config-router)#version 2 Created By Shreen Khalaf 11/5/2022 Lab 1 Created By Shreen Khalaf 11/5/2022 Lab 1 Created By Shreen Khalaf 11/5/2022 Created By Shreen Khalaf 11/5/2022 Router A configuration Lab_A(config)#router rip Lab_A(config-router)#net 172.16.10.0 Lab_A(config-router)#net 172.16.20.0 Router B configuration Lab_B(config)#router rip Lab_B(config-router)#network 172.16.20.0 Lab_B(config-router)#network 172.16.30.0 Lab_B(config-router)#network 172.16.50.0 Created By Shreen Khalaf 11/5/2022 Router C configuration Lab_C(config)#router rip Lab_C(config-router)#network 172.16.30.0 Lab_C(config-router)#network 172.16.40.0 Lab_C(config-router)# Verify that RIP is running at each router by typing the following commands at each router: show ip protocols Created By Shreen Khalaf 11/5/2022 show ip route Created By Shreen Khalaf 11/5/2022 show running-config Created By Shreen Khalaf 11/5/2022 Test connection Created By Shreen Khalaf 11/5/2022 Administrative Distances Created By Shreen Khalaf 11/5/2022 Task configure the network route using RIP Created By Shreen Khalaf 11/5/2022 Link State Routing Protocols Created By Shreen Khalaf 11/11/2022 Open Shortest Path First (OSPF) Standard Protocol Classless Protocol Offers an unlimited hop count (Hierarchical ) Loop Free Symbol in routing table O Administrative distance=110 Metric=cost=10^8/BW Created By Shreen Khalaf 11/11/2022 TABLE 18.1 OSPF and RIP comparison OSPF and RIP comparison Characteristic OSPF RIPv2 RIPv1 Type of protocol Link state Distance vector Distance vector Classless support Yes Yes No Path metric Bandwidth Hops Hops Hop count limit None 15 15 Convergence Fast Slow Slow Hierarchical network Yes (using areas) No (flat only) No (flat only) requirement Created By Shreen Khalaf 11/11/2022 OSPF Terminology Link A link is a network or router interface assigned to any given network Router ID The router ID (RID) is an IP address used to identify the router. Neighbor Neighbors are two or more routers that have an interface on a common network Adjacency An adjacency is a relationship between two OSPF routers that permits the direct exchange of route updates. Designated router A designated router (DR) is elected whenever OSPF routers are connected to the same broadcast network. Created By Shreen Khalaf 11/11/2022 OSPF Terminology Hello protocol provides dynamic neighbor discovery and maintains neighbor relationships. Hello packets and Link State Advertisements (LSAs) build and maintain the topological database. Hello packets are addressed to multicast address 224.0.0.5. Neighborship database is a list of all OSPF routers for which Hello packets have been seen., Including the router ID and state, are maintained on each router in the neighborship database. Topological database contains information from all of the Link State Advertisement packets that have been received for an area. The router uses the information from the topology database as input into the Dijkstra algorithm that computes the shortest path to every network. Created By Shreen Khalaf 11/11/2022 OSPF Terminology Link State Advertisement (LSA) is an OSPF data packet containing link-state and routing information that’s shared among OSPF routers. OSPF areas An OSPF area is a grouping of contiguous networks and routers. All routers in the same area share a common area ID. All of the routers within the same area have the same topology table. An area 0 and that this is typically considered the backbone area. Areas also play a role in establishing a hierarchical network organization. Created By Shreen Khalaf 11/11/2022 OSPF Operation Each Router Will send Hello packet to all its interface to discover its direct connected neighbors Each router will sent LSA to all its neighbors, telling them about its LSA’s Every Router receive LSA packet will take copy of it and send it as it is to its neighbors Each Router Will Form LSDB(Link Stat DB) for all LSA’s Each Router Will draw a link state tree and put itself as the root of the tree Each router will apply SPF algorithm to get the routing table Created By Shreen Khalaf 11/11/2022 OSPF Operation OSPF operation is basically divided into these three categories 1. Neighbor and adjacency initialization 2. LSA flooding 3. SPF tree calculation Created By Shreen Khalaf 11/11/2022 Neighbor and adjacency initialization When OSPF is initialized on a router, the router allocates memory for it, as well as for the maintenance of both neighbor and topology tables. then check to see if they’re active and begin sending Hello packets The Hello protocol is used to discover neighbors, establish adjacencies, and maintain relationships with other OSPF routers Created By Shreen Khalaf 11/11/2022 Link State Advertisement (LSA )flooding LSA is an OSPF data packet containing link-state and routing information that’s shared among OSPF routers. LSA flooding is the method OSPF uses to share routing information LSA information is shared with all OSPF routers within an area The network topology is created from the LSA updates, and flooding is used so that all OSPF routers have the same topology map to make SPF calculations. Once the LSA updates have been flooded throughout the network, each recipient must acknowledge that the flooded update has been received Created By Shreen Khalaf 11/11/2022 LSA update multicast addresses Network Type Multicast Address Description Point-to-point 224.0.0.5 AllSPFRouters Broadcast 224.0.0.6 AllDRouters Point-to-multipoint NA NA Created By Shreen Khalaf 11/11/2022 SPF Tree Calculation Within an area, each router calculates the best/shortest path to every network in that same area. This calculation is based upon the information collected in the topology database and an algorithm called shortest path first (SPF). Each router in an area constructing a tree, where the router is the root and all other networks are arranged along the branches and leaves. This is the shortest-path tree used by the router to insert OSPF routes into the routing table. One of the key criteria is the metric or cost of each potential path to a network Created By Shreen Khalaf 11/11/2022 OSPF Metrics OSPF uses a metric referred to as cost The cost of the entire path is the sum of the costs of the outgoing interfaces along the path. Cost=10^8 / BW Using this rule, a 100 Mbps Fast Ethernet interface would have a default OSPF cost of 1 and a 1,000 Mbps Ethernet interface would have a cost of 1. This value can be overridden with the ip ospf cost command. The value must be changed on the specific interface you want to change the cost on Created By Shreen Khalaf 11/11/2022 Configuring OSPF Enabling OSPF Router(config)#router ospf ? Process ID Process ID: is value in the range from 1 to 65,535 identifies the OSPF. Configuring OSPF Areas Newtork directConnectedNetIP wildCardMask area 0 Wild Card Mask : inverted of subnet mask Wild card Mask=255- subnet mask Created By Shreen Khalaf 11/11/2022 Lab 1 configure the following network using OSPF Created By Shreen Khalaf 11/5/2022 Lab 1 Created By Shreen Khalaf 11/5/2022 Created By Shreen Khalaf 11/5/2022 IP Setting Created By Shreen Khalaf 11/11/2022 Routers configuration Router A config RouterA(config)#router ospf 1 RouterA(config-router)#network 172.16.10.0 0.0.0.255 area 0 RouterA(config-router)#network 172.16.20.0 0.0.0.255 area 0 Router B Config RouterB(config)#router ospf 1 RouterB(config-router)#network 172.16.20.0 0.0.0.255 area 0 RouterB(config-router)#network 172.16.30.0 0.0.0.255 area 0 RouterB(config-router)#network 172.16.50.0 0.0.0.255 area 0 Created By Shreen Khalaf 11/11/2022 Routers configuration Router C Config RouterC(config)#router ospf 1 RouterC(config-router)#network 172.16.30.0 0.0.0.255 area 0 RouterC(config-router)#network 172.16.40.0 0.0.0.255 area 0 RouterC(config-router)#do sh ip route Created By Shreen Khalaf 11/11/2022 Show ip route Router A Router B Created By Shreen Khalaf 11/11/2022 Test connection Created By Shreen Khalaf 11/11/2022 The show ip ospf Command The show ip ospf command is what you’ll need to display OSPF information ( the router ID, area information, SPF statistics, and LSA timer information). Notice the router ID (RID) is the highest IP address configured on the router The show ip ospf database Command Using the show ip ospf database command will give you information about the number of routers in the internetwork (AS) plus the neighboring router’s ID The show ip ospf interface Command The show ip ospf interface sh ip ospf int f0/0 command reveals all interface- related OSPF information. Data is displayed about OSPF information for all OSPF-enabled interfaces or for specified interfaces The show ip ospf interface Command So this command has given us the following information: Interface IP address Area assignment Process ID Router ID Network type Cost Priority DR/BDR election information (if applicable) Hello and Dead timer intervals Adjacent neighbor information Created By Shreen Khalaf 10/31/2024