Command
Description
show ip ospf interface
Used to display the information about OSPF interface
show ip ospf neighbor
Used to display the information about neighbors and status
with neighbors.
ip ospf cost interface
cost Set the OSFP interface cost.
show ip route ospf Display
the routers in the router table learned by OSPF.
OSPF configuration on Router A
In global configuration mode
Router-A(config) # router ospf 1 (Here 1
indicate the process identification number)
Router-A(config-Router) # network 20.0.0.0
0.255.255.255 area 0 (Here 20.0.0.0 indicate the network ID and
0.225.255.255 wildcard mask with area 0)
Router-A(config-Router) # network 40.0.0.0
0.255.255.255 area 1 (Here 40.0.0.0 indicate the network ID and
0.225.255.255 wildcard mask with area 1)
OSPF configuration on Router B
In global configuration mode
Router-B(config) # router ospf 1 (Here 1
indicate the process identification number)
Router-B(config-Router) # network 20.0.0.0
0.255.255.255 area 0 (Here 20.0.0.0 indicate the network ID and
0.225.255.255 wildcard mask with area 0)
Router-B(config-Router) # network 30.0.0.0
0.255.255.255 area 1 (Here 30.0.0.0 indicate the network ID and
0.225.255.255 wildcard mask with area 1)
Now on both routers each Network will be added
automatically, you can ping to Router A and Router B to check
communication. You can verify this on Router-A or Router-B by using
command Router# ping 40.0.0.10 (ping for Router B) and Router # ping
30.0.0.20 (ping for router A).