Open Godlike-Dodo opened 1 year ago
Example 2
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.
enable configure terminal router ospf 1 network 10.0.0.0 0.255.255.255 area 0 network 20.0.0.0 0.255.255.255 area 0
enable configure terminal router ospf 2 network 20.0.0.0 0.255.255.255 area 0 network 30.0.0.0 0.255.255.255 area 0
We just need to enable OSPF on the routers which then advertise the networks directly connected to each of them.
Go to router 1 show ip ospf neighbor show ip route ospf
Commands op Router 1 router ospf 1 network 10.10.10.0 0.0.0.3 area 0 network 192.168.10.0 0.0.0.255 area 0 router-id 10.10.10.1
Commands op Router 2 router ospf 1 network 10.10.10.0 0.0.0.3 area 0 network 172.40.21.0 0.0.0.255 area 0 router-id 10.10.10.2
use for router-id: ip address of the router.
Test if ospf works show ip ospf neighbor
Test if there is a route show ip route