OSPF Configuration Examples =========================== | WARNING | The addresses in here are EXAMPLES | Substitute with the right ones for your class Single Area ----------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ interface loopback 0 ip address 198.6.30.254 255.255.255.255 ! interface ethernet 0 ip address 192.5.1.1 255.255.255.0 ip ospf message-digest key 1 md5 ! interface ethernet 1 ip address 198.6.30.1 255.255.255.240 ! router ospf 1 log-adjacency-changes passive-interface default no passive-interface ethernet 0 network 192.5.1.0 0.0.0.255 area 0 network 198.6.30.0 0.0.0.15 area 0 network 198.6.30.254 0.0.0.0 area 0 area 0 authentication message-digest ! no logging console ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Single Area with IPv6 --------------------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ interface loopback 0 ip address 198.6.30.254 255.255.255.255 ipv6 address 2001:db8::1/128 ipv6 router ospf 1 area 0 ! interface ethernet 0 ip address 192.5.1.1 255.255.255.0 ip ospf message-digest key 1 md5 ipv6 address 2001:db8:0:1::1/64 ipv6 router ospf 1 area 0 ipv6 ospf authentication ipsec spi 256 md5 ! interface ethernet 1 ip address 198.6.30.1 255.255.255.240 ipv6 address 2001:db8:0:30::1/64 ipv6 router ospf 1 area 0 ! router ospf 1 log-adjacency-changes passive-interface default no passive-interface ethernet 0 network 192.5.1.0 0.0.0.255 area 0 network 198.6.30.0 0.0.0.15 area 0 network 198.6.30.254 0.0.0.0 area 0 area 0 authentication message-digest ! no logging console ! ipv6 router ospf 1 log-adjacency-changes detail passive-interface default no passive-interface ethernet 0 area 0 authentication ipsec spi 256 md5 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Two Areas --------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ interface loopback 0 ip address 198.6.30.254 255.255.255.255 ! interface ethernet 0 ip address 192.5.1.1 255.255.255.0 ip ospf message-digest key 1 md5 ! interface ethernet 1 ip address 198.6.30.1 255.255.255.240 ip ospf message-digest key 1 md5 ! router ospf 1 log-adjacency-changes passive-interface default no passive-interface ethernet 0 no passive-interface ethernet 1 network 192.5.1.0 0.0.0.255 area 0 network 198.6.30.0 0.0.0.15 area 10 network 198.6.30.254 0.0.0.0 area 0 area 0 authentication message-digest area 10 authentication message-digest ! no logging console ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Three Areas ----------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ interface loopback 0 ip address 198.6.30.254 255.255.255.255 ! interface ethernet 0 ip address 192.5.1.1 255.255.255.0 ip ospf message-digest key 1 md5 ! interface ethernet 1 ip address 198.6.30.1 255.255.255.240 ip ospf message-digest key 1 md5 ! interface serial 0 ip address 80.252.10.2 255.255.255.252 ip ospf message-digest key 1 md5 ! router ospf 1 log-adjacency-changes passive-interface default no passive-interface ethernet 0 no passive-interface ethernet 1 no passive-interface serial 0 network 192.5.1.0 0.0.0.255 area 0 network 198.6.30.0 0.0.0.15 area 10 network 198.6.30.254 0.0.0.0 area 0 network 80.252.10.0 0.0.0.3 area 42 area 0 authentication message-digest area 10 authentication message-digest area 42 authentication message-digest ! no logging console ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Single Area + Default Originate ------------------------------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ interface loopback 0 ip address 198.6.30.254 255.255.255.255 ! interface ethernet 0 ip address 192.5.1.1 255.255.255.0 ip ospf message-digest key 1 md5 ! interface ethernet 1 ip address 198.6.30.1 255.255.255.240 ! interface serial 0 description External connection to another ISP ip address 80.240.10.1 255.255.255.252 ! router ospf 1 log-adjacency-changes passive-interface default no passive-interface ethernet 0 default-information originate always network 192.5.1.0 0.0.0.255 area 0 network 198.6.30.0 0.0.0.15 area 0 network 198.6.30.254 0.0.0.0 area 0 network 80.240.10.0 0.0.0.3 area 0 area 0 authentication message-digest ! ip route 0.0.0.0 0.0.0.0 Serial 0 ! no logging console ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~