OSPF

 Basic  OSPF configuration.

1. Build the network topology.



2.Configure IP addresses on PCs and router interfaces.

NGAB_OWI

R1(config)#int fa 0/0
R1(config-if)#ip add 80.10.10.1 255.255.255.128
R1(config-if)#no sh
R1(config-if)#
R1(config-if)#int se 3/0
R1(config-if)#ip add 192.10.10.1 255.255.255.252
R1(config-if)#no sh

DPR2

R2(config-if)#int fa0/0
R2(config-if)#ip add 80.30.30.1 255.255.255.128
R2(config-if)#no sh
R2(config-if)#
R2(config-if)#int se 3/0
R2(config-if)#ip address 192.10.10.2 255.255.255.252
R2(config-if)#no sh

Now do IP configurations for the PCs.

PC1  IP add 10.0.0.2  Subnet mask 255.0.0.0   Default gateway  10.0.0.1

PC2 IP add 30.0.0.2  Subnet mask 255.0.0.0    Default gateway   30.0.0.1

3Configure OSPF on the routers.

The configuration is pretty simple and requires only two major steps:

1.  Enable OSPF on a router using the router ospf PROCESS_ID in the global configuration mode.

2.Define on which interfaces OSPF will run and what networks will be advertised using network IP_ADDRESS  WILCARD_MASK  AREA command in the OSPF configuration mode.

Note that the OSPF process ID doesn’t have to be the same on all routers in order for the routers to establish a neighbor relationship, but the area parameter has to be the same on all neighboring routers in order for the routers to become neighbors.

NGAB_OWI

R1(config)#
R1(config)#router ospf 1
R1(config-router)#network 80.10.10.0  0.0.0.127  area 0
R1(config-router)#network 192.10.10.0  0.0.0.3  area 0

DPR2

R2(config)#
R2(config)#router ospf  2
R2(config-router)#network 80.30.30.0  0.0.0.127 area 0
R2(config-router)#network 192.10.10.0  0.0.0.3 area 0

As you can see from the above picture,we just need to enable OSPF on the routers which then advertise the networks directly connected to each of them.

Have in mind: The OSPF process IDs used for the two routers  have been made optionally different but their area  numbers must be the same.

4. Verify OSPF configuration

First, let’s verify that the routers have established a neighbor relationship by typing the command on R1:




Note that the letter O indicates OSPF routes.

Lastly, verify connectivity. Ping PC2 from PC1. Ping should be successful.



Comments

Popular Posts