OSPF Default Route Advertisement 1
OSPF Default Route Advertisement 1
In general, first step is to assign the basic IP addressing part on the devices.
R-1 & R-2 are running OSPF and on R-2 we have to make sure reachability is there with ISP R-3 using static default-
routes.
R-1
R-1(config)#int gig0/0
R-1(config-if)#ip add 1.1.1.1 255.0.0.0
R-1(config-if)#no shut
R-1(config-if)#exit
R-1(config)#int gig0/1
R-1(config-if)#ip add 10.1.1.1 255.0.0.0
R-1(config-if)#no shut
R-1(config-if)#exit
R-2
Router(config)#hostname R-2
R-2(config)#int gig0/0
R-2(config-if)#ip add 1.1.1.2 255.0.0.0
R-2(config-if)#no shut
R-2(config-if)#exit
R-2(config)#int gig0/1
R-2(config-if)#ip add 2.2.2.1 255.0.0.0
R-2(config-if)#no shut
R-2(config-if)#exit
R-2(config)#int gig0/2
R-2(config-if)#ip add 20.1.1.1 255.0.0.0
R-2(config-if)#no shut
R-2(config-if)#exit
R-3
Router(config)#hostname ISP
ISP(config)#int gig0/0
ISP(config-if)#ip add 2.2.2.2 255.0.0.0
ISP(config-if)#no shut
ISP(config-if)#exit
ISP(config)#int gig0/2
ISP(config-if)#ip add 30.1.1.1 255.0.0.0
ISP(config-if)#no shut
ISP(config-if)#exit
ISP(config)#int loop 1
ISP(config-if)#ip add 13.0.0.1 255.255.255.0
ISP(config-if)#exit
ISP(config)#int loop 2
ISP(config-if)#ip add 13.0.1.1 255.255.255.0
ISP(config-if)#exit
ISP(config)#int loop 3
ISP(config-if)#ip add 13.0.2.1 255.255.255.0
ISP(config-if)#exit
ISP(config)#int loop 4
ISP(config-if)#ip add 13.0.3.1 255.255.255.0
ISP(config-if)#exit
R-2(config)#router ospf 1
R-2(config-router)#network 20.0.0.0 0.255.255.255 area 0
R-2(config-router)#network 1.0.0.0 0.255.255.255 area 0
R-2(config-router)#exit
R-2(config)#
*Mar 1 03:58:55.259: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.1.1 on GigabitEthernet0/0 from
LOADING to FULL, Loading Done
As routing is done and we are able to reach towards Internet routes from R-2!
R-2(config)#do ping 13.0.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 13.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/5/8 ms
But from R-1 we are not able to reach the ISP because there is no default-route entry in the routing table of R-1.
To make it possible we need to run a command on R-2 which is our Head Office –
R-2(config)#router ospf 1
R-2(config-router)#default-information originate
Now you can see the routing table of R-1 that it’s having a default-route external entry and also you can check
by pinging with internet routes.