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.
No comments:
Post a Comment