Configuring OSPF 1
OSPF essential design is extremely basic. Much the same as with other routing protocols covered so far (
EIGRP) first you have to empower OSPF on a router. This is finished by utilizing the router
OSPF PROCESS-ID worldwide design direction. Next, you have to characterize on which interfaces OSPF will run and what networks will be advertised. This is finished by utilizing the network
IP_ADDRESS WILDCARD_MASK AREA_ID order from the OSPF configuration mode.
The OSPF procedure number doesn’t need to be the equivalent on all routers with the end goal to build up a neighbor relationship, yet the
Area ID must be the equivalent on every neighboring router with the end goal for routers to end up neighbors.
We should begin with some essential OSPF setup. We will utilize the accompanying network topology:
To start with, we have to empower OSPF on the two routers. At that point, we have to characterize what system will be publicized into OSPF. This should be possible by utilizing the accompanying succession of directions on the two routers:
The network directions entered on the two switches incorporate subnets straightforwardly associated with the two routers. We can check that the routers have progressed toward becoming neighbors by composing the show IP OSPF neighbors order on either router:
To check if the routing updated were exchanged, we can utilize the show IP route command. All courses set apart with the character O are OSPF routes. For example, here is the output of the command on R1:
You can see that R1 has found out about the network 192.168.0.0/24 through OSPF.
Configuring OSPF 2
Albeit fundamental OSPF configuration can be exceptionally straightforward, OSPF gives numerous additional highlights that can get extremely perplexing. In this example, we will arrange a multiarea OSPF network and some other OSPF features.
Consider the accompanying multiarea OSPF network:
In this example, we have two OSPF areas – area 0 and area 1. As you can see from the network topology depicted above, routers R1 and R3 are in area 0 and area 1, respectively. Router 2 associates with the two zones, which makes him an
ABR (Area Border Router). We will probably promote the subnets straightforwardly associated with R1 and R3. To do that, the accompanying setup on R1 will be utilized:
We have utilized the
router-id 220.127.116.11 order to physically indicate the router ID of this router. OSPF process will utilize that RID (
router-id) when speaking with other OSPF neighbors.
Since R1 associates just to R2, we just need to build up a neighbor association with R2 and publicize specifically associated subnet into OSPF.
Design of R3 seems to be comparative, yet with one contrast, specifically territory number. R3 is in the territory 1.
What about R2? Well, because R2 is an ABR, we need to establish a neighbor relationship with both R1 and R3 To do that, we have to determine distinctive territory ID for each neighbor relationship, 0 for R1 and 1 for R2. We can do that utilizing the accompanying grouping of directions:
Presently R2 ought to have a neighbor association with both R1 and R3. We can check that by utilizing the show IP OSPF neighbor direction:
To verify if directly connected subnets are really advertised into the different area, we can use the show IP route OSPF command on both R1 and R3:
Characters IA before the courses show that these routes live in various regions.
Since they live in various territories, R1 and R3 will never set up a neighbor relationship.