- Similar to RIP and RIPv2, RIPng is also a distance vector routing protocol which uses hop counts as a metric to determine the best path to reach to a destination.
- Similar to RIP and RIPv2, RIPng also has a maximum hop count of 15. One thing you need to notice here is RIP and RIPv2 uses IPv4 addressing and RIPng makes use of IPv6 addressing. Hence you would normally see that the hop count to reach a destination network will always be 1 more than what you can see in RIP and RIPv2. That's how IPv6 addressing works folks.
- RIPng also makes use of split horizon, poison reverse and similar techniques to avoid loops in a network
- RIP and RIPv2 uses UDP with port number 520 where as RIPng uses UDP port number 521
- RIPv2 uses the multicast address 229.0.0.9 for sending and receiving routing updates. RIPng uses the IPv6 multicast address FF02::9 for the same.
- RIPng does not support authentication on its own. The IPSec feature of IPv6 can be used to provide authentication for out RIPng packets. More on authentication of RIPng in another article.
- RIPng is supported on Cisco IOS 12.2(2)T and above.
Networking Concepts
Monday, January 26, 2015
RIPng (Routing Information Protocol next generation)
You would have learnt about RIP and RIPv2. RIPng does the same thing as RIP and RIPv2. Well, almost the same thing. With few differences of course. Some of the important points are given below.
Thursday, January 1, 2015
OSPF DR-BDR Election
If a router running OSPF has to exchange routes with another router running OSPF, then a nighborship between the 2 routers is not sufficient. The 2 routers have to form am adjacency.
2 routers forming an adjacency depends on the type of network used.
In case of a BMA or an NBMA network, a DR-BDR election takes place to elect a DR(Designated Router) and a BDR(Backup Designated Router).
All other routers in the network(DROthers) will form full adjacencies with the DR and the BDR.
2 routers forming an adjacency depends on the type of network used.
In case of a BMA or an NBMA network, a DR-BDR election takes place to elect a DR(Designated Router) and a BDR(Backup Designated Router).
All other routers in the network(DROthers) will form full adjacencies with the DR and the BDR.
The topology is an example for a BMA network. Routers R1 through R5 will send and receive Hello Packets and they will form neighborship with each other. Since this is a BMA network, all these routers will not form adjacencies with each other. Routers R1 through R5 will participate in an election to elect the DR and BDR.
The Router with the highest priority will become the DR and the router with the second highest priority will become the BDR. The OSPF priority for all the routers are the same by default. The value is 1. That means R1 through R5 have the same router priority. In this case, the router ID breaks the tie. The router with the highest router ID will become the DR and the router with the second highest router ID will become the BDR.
In the example, considering the priorities to be the default on all the routers, we can come to a conclusion that R5 is the DR and R3 is the BDR.
R1, R2 and R4 will form neighborship with each other and also the DR and BDR but they will form adjacencies only with DR and BDR (R5 and R3). R1, R2 and R4 will exchange their LSDBDs with R5 and R3. R1, R2 and R4 will use the multicast address 224.0.0.6 to send routing updates to DR or BDR. In turn DR and BDR sends these routing updates to all other routers (DROthers) on the multicast address 224.0.0.5.
If the DR goes down, the BDR takes its place. Doing this in a BMA network reduces a lot of network traffic as the DR and BDR are considered to be the central point for update traffic.
A similar thing happens with an NBMA network also.
Sunday, December 14, 2014
OSPF Hello and Dead Timers
A router configured with OSPF sends out Hello Packets every 'x' seconds to maintain connectivity with its neighbors. The time elapsed between 2 hello packets can be manually configured and is called the Hello Interval.
The amount of time elapsed before a neighbor will declare a router 'down', after the neighbor stops hearing Hello Packets is the Dead Interval.
By default the Hello Interval to Dead Interval ratio is set as 1:4 within the protocol itself.
Depending of the type of network being used, the timers vary.
For a Broadcast and Point to Point network, the Hello Interval is 10 seconds and the Dead Interval is 40 seconds.
For other types of networks (Non-Broadcast, Point-to-Multipoint and Point-to-Multipoint Non-Broadcast), the Hello Interval is 30 seconds and the Dead Interval is 120 seconds.
The amount of time elapsed before a neighbor will declare a router 'down', after the neighbor stops hearing Hello Packets is the Dead Interval.
By default the Hello Interval to Dead Interval ratio is set as 1:4 within the protocol itself.
Depending of the type of network being used, the timers vary.
For a Broadcast and Point to Point network, the Hello Interval is 10 seconds and the Dead Interval is 40 seconds.
For other types of networks (Non-Broadcast, Point-to-Multipoint and Point-to-Multipoint Non-Broadcast), the Hello Interval is 30 seconds and the Dead Interval is 120 seconds.
OSPF Router ID
Every router in an OSPF topology will be identified using a Router ID (RID). The RID provides a unique identification for the router in the entire OSPF topology. So, how does a router decide what its RID would be?
There are certain conditions deciding what the RID for a router would be.
- The highest IP address assigned to the physical interfaces of a router will be the RID
- However if the router has been configured with loopback addresses, then the highest IP address assigned to a loopback interface takes priority. The physical IP addresses are ignored
- If the RID is configured manually using the CLI of the router, then the manual RID configured takes the highest precedence. Both the loopback interface and the physical interface is ignored.
Referring to the exhibit, take a guess as to what the RID for the routers will be
RID for R1 will be 192.168.1.1
RID for R2 will be 1.1.3.1
RID for R3 will be 192.168.1.3
Lets say we manually configure the RID for R4 to be 4.4.4.4. This manual configuration will become the RID for R4
RID for R5 will be 172.16.1.1
RID for R1 will be 192.168.1.1
RID for R2 will be 1.1.3.1
RID for R3 will be 192.168.1.3
Lets say we manually configure the RID for R4 to be 4.4.4.4. This manual configuration will become the RID for R4
RID for R5 will be 172.16.1.1
OSPF States
State 1 : Down State
Consider R2. R2 is said to be in the Down state if it has not received a Hello packet from R1. But this does not mean R2 has not sent a Hello Packet to R1. Simply put "A router is said to be in Down State if it has not received any Hello Packet from its neighbor"
State 2 : InIt State
Lets say R1 sent out a Hello Packet on the Multicast Address 224.0.0.5. This hello packet arrived on the s0/0 interface of R2. R2 checks this Hello Packet and finds that the Hello Packet it received does not have its own Router ID in the Neighbor field of the hello packet.
Yes, a Hello Packet contains a neighbor field which has the information of the neighor's Router ID. i.e. When R1 sends out a hello packet to R2, it should include R2's Router ID in the neighbor field. The fact that this has not been included simply means that R1 still does not know about R2 yet.
There is no bi-directional communication happening yet. R2 is now said to be in InIt state.
State 3 : 2-Way State
R1 and R2 have both received a Hello Packet and both the Routers have seen their own Router IDs in the hello packets they have received. This is a 2-way state where bi-directional communication has started.
R1 is now said to be a Neighbor of R2 and vice versa. At this point a neighbor table is created on both R1 and R2. And they will have each others' information in the neighbor table.
However, the exchange of Hello Packets between the routers does not guarantee the exchange of routing tables. The 2 routers have to form an Adjacency to exchange routing information. And the formation of this adjacency depends on the type of connection between the Routers.
Types of OSPF networks
State 4 : ExStart State
Going back to the first classic example, R1 and R2 now have formed an adjacency. Now a decision has to be made as to which router has to start exchanging the routing updates first. At this stage between R1 and R2, a decision, as to who will be the master and who will be the slave, has to be taken. The router with the highest priority will become the master. But by default, all the routers will have the same priority number (1). Therefore, the router with the highest Router ID will become the master and the other router will become the slave. Lets say R1 becomes the master and R2 becomes the slave
State 5 : Exchange State
The master now sends a DBD (DataBase Descriptor) packet to the slave with a LSA(Link State Advertisement). The LSA will contain the summary of all the networks the master knows about. Note that the entire information and the detailed routes to all these networks are not a part of this packet. The master also sequences this LSA packet and the master alone can increment the sequence number. The slave receives this and checks the information against its own database. The slave now sends its own DBD packet to the master. Any network not known to the master or slave is queried through LSRs (Link State Requests).
State 6 : Loading State
In this state, the actual exchange of routes take place through LSUs (Link State Updates). Let's say R2 does not know about a network R1 knows about. R2 requests for the complete information of this network by sending a LSR to R1 and then R1 responds by sending an LSU packet containing all the information of the requested network. Each LSU will be acknowledged. A topology table is build with the complete information of all the routes to all the networks.
State 7 : Full State
The routers are fully adjacent with each other. In other words, both the routers are completely synchronized. The best route to a particular network is taken from the topology table and inserted in the routing table.
Consider R2. R2 is said to be in the Down state if it has not received a Hello packet from R1. But this does not mean R2 has not sent a Hello Packet to R1. Simply put "A router is said to be in Down State if it has not received any Hello Packet from its neighbor"
State 2 : InIt State
Lets say R1 sent out a Hello Packet on the Multicast Address 224.0.0.5. This hello packet arrived on the s0/0 interface of R2. R2 checks this Hello Packet and finds that the Hello Packet it received does not have its own Router ID in the Neighbor field of the hello packet.
Yes, a Hello Packet contains a neighbor field which has the information of the neighor's Router ID. i.e. When R1 sends out a hello packet to R2, it should include R2's Router ID in the neighbor field. The fact that this has not been included simply means that R1 still does not know about R2 yet.
There is no bi-directional communication happening yet. R2 is now said to be in InIt state.
State 3 : 2-Way State
R1 and R2 have both received a Hello Packet and both the Routers have seen their own Router IDs in the hello packets they have received. This is a 2-way state where bi-directional communication has started.
R1 is now said to be a Neighbor of R2 and vice versa. At this point a neighbor table is created on both R1 and R2. And they will have each others' information in the neighbor table.
However, the exchange of Hello Packets between the routers does not guarantee the exchange of routing tables. The 2 routers have to form an Adjacency to exchange routing information. And the formation of this adjacency depends on the type of connection between the Routers.
Types of OSPF networks
- Point to Point networks : In our example, R1 and R2 are connected directly using a serial cable, This is a classic example for a point to point network.
In these type of networks, the adjacency is formed as soon as the neighborship is formed. - Point to Multipoint networks : In these type of networks also, the adjacency is formed as soon as the neighborship is formed.
- Broadcast MultiAccess networks : All the routers which are a part of the network, once the neighborship is formed between them, they participate in an election to elect the DR(Designated Router) and a BDR(Backup Designated Router). The rest of the routers form adjacencies with the DR and the BDR.
Lets say R3 becomes the DR and R5 becomes the BDR. R1 through R5 will form neighborship with the rest of the routers but R1, R2 and R4 will form adjacencies only with the DR and BDR
- Non Broadcast MultiAccess networks : When routers are connected over a frame relay switch, the same DR-BDR election takes place and all other routers form adjacencies with the DR and BDR
State 4 : ExStart State
Going back to the first classic example, R1 and R2 now have formed an adjacency. Now a decision has to be made as to which router has to start exchanging the routing updates first. At this stage between R1 and R2, a decision, as to who will be the master and who will be the slave, has to be taken. The router with the highest priority will become the master. But by default, all the routers will have the same priority number (1). Therefore, the router with the highest Router ID will become the master and the other router will become the slave. Lets say R1 becomes the master and R2 becomes the slave
State 5 : Exchange State
The master now sends a DBD (DataBase Descriptor) packet to the slave with a LSA(Link State Advertisement). The LSA will contain the summary of all the networks the master knows about. Note that the entire information and the detailed routes to all these networks are not a part of this packet. The master also sequences this LSA packet and the master alone can increment the sequence number. The slave receives this and checks the information against its own database. The slave now sends its own DBD packet to the master. Any network not known to the master or slave is queried through LSRs (Link State Requests).
State 6 : Loading State
In this state, the actual exchange of routes take place through LSUs (Link State Updates). Let's say R2 does not know about a network R1 knows about. R2 requests for the complete information of this network by sending a LSR to R1 and then R1 responds by sending an LSU packet containing all the information of the requested network. Each LSU will be acknowledged. A topology table is build with the complete information of all the routes to all the networks.
State 7 : Full State
The routers are fully adjacent with each other. In other words, both the routers are completely synchronized. The best route to a particular network is taken from the topology table and inserted in the routing table.
Subscribe to:
Posts (Atom)