OSPF Ref en
OSPF Ref en
Configuration Example
hostname R1
!
interface Loopback 0
ip address 10.10.254.1 255.255.255.255
!
interface FastEthernet0/0
ip address 10.10.1.1 255.255.255.0
! Enable OSPF on this interface
ip ospf 100 area 0
! Authenticate adjacencies with MD5
ip ospf authentication message-digest
! Configure secret key for MD5 authentication
ip ospf authentication-key N$RC
!
! Start OSPF process (100 is process ID)
router ospf 100
log adjacency-changes
! Allow adjacencies only on F0/0
passive-interface default
no passive-interface FastEthernet0/0
! Announce ISP link prefix and Loopback
redistribute connected subnets
! Announce default route in OSPF domain
default-information originate metric 100
!
! Default static route towards ISP
ip route 0.0.0.0 0.0.0.0 10.1.1.1
hostname R2
!
Troubleshooting OSPF Adjacencies
interface Loopback 0 ● Can you ping the neighbour?
ip address 10.10.254.2 255.255.255.255
!
● Is OSPF enabled on the interface?
interface FastEthernet0/0 ● If you have `passive-interface default`, do you also
ip address 10.10.1.2 255.255.255.0 have `no passive-interface` for that interface?
ip ospf 100 area 0 ● Do the netmask, hello interval, and router dead
ip ospf authentication message-digest interval match?
ip ospf authentication-key N$RC
● Do the authentication parameters match?
!
router ospf 100 ● Do the routers have different OSPF router ids?
passive-interface default
no passive-interface FastEthernet0/0
! Announce customer p2p prefixes and Loopback
redistribute connected subnets
! Announce customer prefixes
redistribute static subnets
!
! Static routes towards customers
ip route 10.10.101.0 255.255.255.0 10.10.100.2
ip route 10.10.102.0 255.255.255.0 10.10.100.6