DON'T WANT TO MISS A THING?

Certification Exam Passing Tips

Latest exam news and discount info

Curated and up-to-date by our experts

Yes, send me the newsletter

CCIE Study Guide-Core Routing Protocol OSPF


  •     Spoto
  • |
  •   Posted on: 2019-04-14
  • |
  •   Views: 834
  • |
  •   Category:
  • CCIE Lab

3.1 OSPFv2 theoretical basis

The Open Shortest Path First (OSPF) protocol is a routing protocol developed by the Internet Engineering Task Force (IETF). The OSPF protocol is a link state protocol. As its naming year describes, OSPF uses Dijkstra's Shortest Path First (SPF) algorithm to be open and not owned by any vendor or organization. The development of OSPF has gone through several RFCs. OSPFv2 is the OSPF used by current IPv4 networks and is described in RFC2328.

Like all link state protocols, the main difference between OSPF and distance vector protocols is its fast convergence, which allows OSPF to support larger networks. Other features of the OSPF protocol are:

The concept of the area is used, which can effectively reduce the CPU and memory usage of the routing protocol by the routing protocol; the partitioning area can also reduce the number of OSPF packets on the link, which enables OSPF to construct a hierarchical network topology;

? Full support for classless addresses, eliminating routing problems such as discontinuous subnets. You can use VLSM to effectively manage IP addresses, and also support supernet technology;

Support for metrics of any size;

Support for equivalent load balancing of multiple paths;

Use multicast address communication to reduce the impact on non-OSPF devices;

Support for more secure (ciphertext) authentication;

• External routes can be tagged.

3.1.1 Basic Principles of OSPF

From a general point of view, the implementation of the OSPF protocol is well explained:

1. A router running OSPF sends Hello packets from all OSPF-enabled interfaces. Directly connected OSPF routers compare certain parameters specified in their respective Hello data. If they match, they become neighbors (Neighbor).

2. Start to establish an adjacency relationship. The OSPF protocol defines the adjacency relationship between some network types and some router types.

3. After the adjacency relationship is established, the router starts to send a Link State Advertisement (LSA) for synchronizing the Link State Database (LSDB).

4. After the LSDB synchronization of each area is completed, each router takes itself as the root and uses the SPF algorithm to calculate a loop-free topology map, which is used to describe the shortest path of each destination network that it knows (the smallest cost).

5. Finally, the optimal path obtained by the SPF algorithm is written into the routing table. At this point, all OSPF routers in the network have calculated their respective paths, sending Hello packets to each other to maintain neighbor relationships, and resending all LSAs every 30 minutes.

3.2 OSPFv2 Network Type and Designated Router

3.2.1 OSPFv2 Network Type

The OSPF protocol defines the following five network types.

1. Point-to-point network

2. Broadcast network (Broadcast)

3. Non-broadcast multiple access (NBMA)

4. Point-to-multipoint network

5. Virtual links

Point-to-point network

Point-to-point network, the default network type of the T1 link (serial link), there are only two devices on a link. In a point-to-point network, valid OSPF neighbors form adjacencies. The OSPF packets on the network are transmitted in multicast form. The destination address is the class D multicast address 224.0.0.5. This multicast address is called All OSPF Routers.

Broadcast network (Broadcast)

Broadcast network, the default network type of Ethernet, can also be defined as broadcast multi-access to distinguish between NBMA networks. In a broadcast network, more than two devices can be connected. It is also because of the broadcast network that the data sent by one router can be received by all the devices on the network. In order to facilitate the "management", the designated router (DR, main room) and backup designated router (BDR) need to be elected in the broadcast network. , partial housing). In a broadcast network, Hello packets of all OSPF routers are sent to the multicast address 224.0.0.5, and link state advertisements of non-designated routers are sent to the designated router and backup designation through the multicast address 224.0.0.6 (All DR Routers). The router is sent by the designated router to other OSPF routers through the multicast address 224.0.0.5.

Non-broadcast multiple access network (NBMA)

The default network type of NBMA network, X.25, Frame Relay and ATM, can connect more than two routers, but they do not have the ability to broadcast data packets. By default, packets sent by routers cannot be received by other routers, so routers on these networks must add configuration to establish their neighbors. An OSPF router in an NBMA network needs to elect DR and BDR, and all OSPF packets are unicast.

Point-to-multipoint (Point-to-multipoint)

A point-to-multipoint network is a special configuration of the NBMA network and can be seen as a collection of a group of point-to-point links. OSPF routers in such networks do not need to elect DR and BDR, and OSPF packets are sent to each known neighbor in unicast mode.

Virtual links

The virtual link will be explained later, and it can be considered by the router to be a special point-to-point network. OSPF packets are sent unicast on the virtual link.

3.2.2 Specifying a Router and Backing Up a Specified Router

For the OSPF protocol, there are two problems in the flooding and diffusion of LSAs on the multi-access network:

When creating adjacencies between routers, many unnecessary LSAs are created. Assuming there are n routers on a multi-access network, that would constitute an nn-1/2 adjacency, as shown in Figure 3-1. Each router will advertise n-1 LSA information to other neighboring routers, plus a network LSA. The final result of this calculation is that n2 LSA advertisements will be generated on this network.

The flooding of the multi-access network itself appears to be confusing. A router sends LSAs to all its neighboring routers. Similarly, these neighboring routers send this LSA to all its neighboring routers, which will create many identical LSA copies on the same network.

 

From a general point of view, the implementation of the OSPF protocol is well explained:

1. A router running OSPF sends Hello packets from all OSPF-enabled interfaces. Directly connected OSPF routers compare certain parameters specified in their respective Hello data. If they match, they become neighbors (Neighbor).

2. Start to establish an adjacency relationship. The OSPF protocol defines the adjacency relationship between some network types and some router types.

3. After the adjacency relationship is established, the router starts to send a Link State Advertisement (LSA) for synchronizing the Link State Database (LSDB).

4. After the LSDB synchronization of each area is completed, each router takes itself as the root and uses the SPF algorithm to calculate a loop-free topology map, which is used to describe the shortest path of each destination network that it knows (the smallest cost).

5. Finally, the optimal path obtained by the SPF algorithm is written into the routing table. At this point, all OSPF routers in the network have calculated their respective paths, sending Hello packets to each other to maintain neighbor relationships, and resending all LSAs every 30 minutes.

3.2 OSPFv2 Network Type and Designated Router

3.2.1 OSPFv2 Network Type

The OSPF protocol defines the following five network types.

1. Point-to-point network

2. Broadcast network (Broadcast)

3. Non-broadcast multiple access (NBMA)

4. Point-to-multipoint network

5. Virtual links

Point-to-point network

Point-to-point network, the default network type of the T1 link (serial link), there are only two devices on a link. In a point-to-point network, valid OSPF neighbors form adjacencies. The OSPF packets on the network are transmitted in multicast form. The destination address is the class D multicast address 224.0.0.5. This multicast address is called All OSPF Routers.

Broadcast network (Broadcast)

Broadcast network, the default network type of Ethernet, can also be defined as broadcast multi-access to distinguish between NBMA networks. In a broadcast network, more than two devices can be connected. It is also because of the broadcast network that the data sent by one router can be received by all the devices on the network. In order to facilitate the "management", the designated router (DR, main room) and backup designated router (BDR) need to be elected in the broadcast network. , partial housing). In a broadcast network, Hello packets of all OSPF routers are sent to the multicast address 224.0.0.5, and link state advertisements of non-designated routers are sent to the designated router and backup designation through the multicast address 224.0.0.6 (All DR Routers). The router is sent by the designated router to other OSPF routers through the multicast address 224.0.0.5.

Non-broadcast multiple access network (NBMA)

The default network type of NBMA network, X.25, Frame Relay and ATM, can connect more than two routers, but they do not have the ability to broadcast data packets. By default, packets sent by routers cannot be received by other routers, so routers on these networks must add configuration to establish their neighbors. An OSPF router in an NBMA network needs to elect DR and BDR, and all OSPF packets are unicast.

Point-to-multipoint (Point-to-multipoint)

A point-to-multipoint network is a special configuration of the NBMA network and can be seen as a collection of a group of point-to-point links. OSPF routers in such networks do not need to elect DR and BDR, and OSPF packets are sent to each known neighbor in unicast mode.

Virtual links

The virtual link will be explained later, and it can be considered by the router to be a special point-to-point network. OSPF packets are sent unicast on the virtual link.

3.2.2 Specifying a Router and Backing Up a Specified Router

For the OSPF protocol, there are two problems in the flooding and diffusion of LSAs on the multi-access network:

When creating adjacencies between routers, many unnecessary LSAs are created. Assuming there are n routers on a multi-access network, that would constitute an nn-1/2 adjacency, as shown in Figure 3-1. Each router will advertise n-1 LSA information to other neighboring routers, plus a network LSA. The final result of this calculation is that n2 LSA advertisements will be generated on this network.

The flooding of the multi-access network itself appears to be confusing. A router sends LSAs to all its neighboring routers. Similarly, these neighboring routers send this LSA to all its neighboring routers, which will create many identical LSA copies on the same network.

 

In order to avoid these problems in a multi-access network, a designated router (power) can be elected on the multi-access network. This router will do the following:

Describe the routers in this multi-access network and connected to it within the OSPF area;

Manage the flooding process on this multi-access network.

Each router in the network forms an adjacency with the DR. Figure 3-2 shows the schematic diagram of OSPF after designating a designated router (DR). Remember that DR is a feature of the router interface, not the characteristics of the entire network. In other words, an interface of a router becomes the DR in the current multi-access network.

 

As far as the current location is concerned, it can be seen that the designated router is a very important role. Once the designated router fails, a new designated router must be elected. At the same time, all routers on the network must also establish new adjacencies with the re-elected designated routers and synchronize their link state databases. When the above process occurs, the network will not be able to efficiently transmit packets.

In order to avoid this problem, in addition to electing the designated router on the network, it is necessary to elect a backup designated router (BDR, spare tire). In this way, all routers and designated routers on the network form an adjacency relationship with the backup designated router. The DR and the BDR also form an adjacency relationship with each other. At this time, if the DR fails, the BDR will become the new DR. Since other routers have formed adjacencies with the BDR, the impact of undeliverable data can be minimized.

3.2.3 Election of designated routers and backup designated routers

The designated router relies on the router priority (Router Priority) and router ID (Router ID) fields in the Hello packet for election.

l Each multi-access interface of each router has a router priority, represented by an 8-bit binary unsigned integer, ranging from 0-255. In Cisco devices, the default priority is 1. It can be modified by the command (ip ospf priority) under the interface. A router interface with a priority of 0 will not participate in the election (cannot be a DR or BDR).

l After the neighbor relationship is established, if the network type needs to be elected, the election will start. Otherwise, the election process will be skipped.

During the election, the interface with the highest priority will be elected as the DR and the next highest priority interface will be elected as the BDR. If the priorities are the same, the router ID is compared, the highest is DR, and the second highest is BDR. If only one interface has a priority greater than 0, then there are only DRs and no BDRs in the network.

Comments:


Start the discussion...


To Leave a Comment or reply to posts please log in