OSPF Default Route
Configuring OSPF Default route is not a big problem. We have
couple of options when we want to OSPF default route. Here is an example 
R1(config)#router ospf 1 
R1(config-router)#default-information originate ?
  always       Always advertise default route
  metric       OSPF default metric
  metric-type  OSPF metric type for default routes
  route-map    Route-map reference
  <cr>
We can change numbers of things for example metric or metric
type but most of the people forget about the most important thing is the always
keyword.  If we add the always command this
feature advertises the default route even if we do not have in our routing
table. It will look like that route is installed in routing table.  
Topology :
|  | 
| OSPF default routing | 
TASK:
- configure the topology as per the diagram
- configure IP addresses as our topology
- configure Router 1, 2, 3 and 4 OSPF in area 0
- make sure router 1, 2, 3, and 4 able to reach router 5 internet route using default route.
R1(config)#Interface fastethernet 0/0
R1(config-if)#Ip address 10.1.1.1 255.0.0.0
R1(config-if)#No shutdown
R1(config-if)#No keepalive
R1(config-if)#Exit
R1(config)#Interface serial 3/0
R1(config-if)#Ip address 1.1.1.1 255.0.0.0
R1(config-if)#No shutdown
R1(config-if)#Exit
R2(config)#Interface fastethernet 0/0
R2(config-if)#Ip address 20.1.1.1   255.0.0.0
R2(config-if)#No shutdown
R2(config-if)#No keepalive
R2(config-if)#Exit
R2(config)#Interface serial 3/0
R2(config-if)#Ip address  1.1.1.2 255.0.0.0
R2(config-if)#No shutdown
R2(config-if)#Exit
R2(config)#Interface serial 3/1
R2(config-if)#Ip address  4.4.4.2 255.0.0.0
R2(config-if)#No shutdown
R2(config-if)#Exit
R2(config)#Interface serial 3/2
R2(config-if)#Ip address  3.3.3.2 255.0.0.0
R2(config-if)#No shutdown
R2(config-if)#Exit
R2(config)#interface serial 3/3
R2(config-if)#ip address 5.5.5.2 255.0.0.0
R2(config-if)#no shutdown
R2(config-if)#exit
R3(config)#Interface fastethernet 0/0
R3(config-if)#Ip address 30.1.1.1   255.0.0.0
R3(config-if)#No shutdown
R3(config-if)#No keepalive
R3(config-if)#Exit
R3(config)#Interface serial 3/2
R3(config-if)#Ip address  3.3.3.1 255.0.0.0
R3(config-if)#No shutdown
R3(config-if)#Exit
R4(config)#Interface fastethernet 0/0
R4(config-if)#Ip address 40.1.1.1   255.0.0.0
R4(config-if)#No shutdown
R4(config-if)#No keepalive
R4(config-if)#Exit
R4(config)#Interface serial 3/1
R4(config-if)#Ip address  4.4.4.1 255.0.0.0
R4(config-if)#No shutdown
R4(config-if)#Exit
R5(config)#Interface fastethernet 0/0
R5(config-if)#Ip address 50.1.1.1   255.0.0.0
R5(config-if)#No shutdown
R5(config-if)#No keepalive
R5(config-if)#Exit
R5(config)#Interface serial 3/3
R5(config-if)#Ip address  5.5.5.1 255.0.0.0
R5(config-if)#No shutdown
R5(config-if)#Exit
R5(config)#Interface loopback  1
R5(config-if)#Ip address 15.0.1.1 255.255.255.0
R5(config-if)#Exit
R5(config)#Interface loopback  2
R5(config-if)#Ip address 15.0.2.1 255.255.255.0
R5(config-if)#Exit
R5(config)#Interface loopback 3
R5(config-if)#Ip address 15.0.3.1 255.255.255.0
R5(config-if)#Exit
R1#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        10.1.1.1        YES manual up                    up
Serial3/0                    1.1.1.1         YES manual up                    up
R2#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        20.1.1.1        YES manual up                    up
Serial3/0                    1.1.1.2         YES manual up                    up
Serial3/1                    4.4.4.2         YES manual up                    up
Serial3/2                    3.3.3.2         YES manual up                    up
Serial3/3                    5.5.5.2         YES manual up                    up
R3#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        30.1.1.1        YES manual up                    up
Serial3/2                    3.3.3.1         YES manual up                    up
R4#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        40.1.1.1        YES manual up                    up
Serial3/1                    4.4.4.1         YES manual up                    up
R5#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        50.1.1.1        YES manual up                    up
Serial3/3                    5.5.5.1         YES manual up                   up
Loopback1              15.0.1.1        YES manual up                    up
Loopback2              15.0.2.1        YES manual up                    up
Loopback3              15.0.3.1        YES manual up                    up
R1(config)#router ospf 1
R1(config-router)#network 10.0.0.0 0.255.255.255 area 0
R1(config-router)#network 1.0.0.0 0.255.255.255 area 0
R1(config-router)#exit
R2(config)#router ospf 1
R2(config-router)#network 1.0.0.0 0.255.255.255 area 0
R2(config-router)#network 3.0.0.0 0.255.255.255 area 0
R2(config-router)#network 4.0.0.0 0.255.255.255 area 0
R2(config-router)#network 20.0.0.0 0.255.255.255 area 0
R2(config-router)#exit
*Dec  4 06:18:03.107: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.1.1 on Serial3/0 from LOADING to FULL, Loading Done
*Dec  4 06:18:57.211: %OSPF-5-ADJCHG: Process 1, Nbr 30.1.1.1 on Serial3/2 from LOADING to FULL, Loading Done
*Dec  4 06:19:45.587: %OSPF-5-ADJCHG: Process 1, Nbr 40.1.1.1 on Serial3/1 from LOADING to FULL, Loading Done
R3(config)#router ospf 1
R3(config-router)#network 3.0.0.0 0.255.255.255 area 0
R3(config-router)#network 3.0.0.0 0.255.255.255 area 0
R3(config-router)#network 30.0.0.0 0.255.255.255 area 0
R3(config-router)#exit
*Dec  4 06:18:57.427: %OSPF-5-ADJCHG: Process 1, Nbr 20.1.1.1 on Serial3/2 from LOADING to FULL, Loading Done
R4(config)#router ospf 1
R4(config-router)#network 4.0.0.0 0.255.255.255 area 0
R4(config-router)#network 40.0.0.0 0.255.255.255 area 0
R4(config-router)#exit
*Dec  4 06:19:45.519: %OSPF-5-ADJCHG: Process 1, Nbr 20.1.1.1 on Serial3/1 from LOADING to FULL, Loading Done
R5(config)#ip route 4.0.0.0 255.0.0.0  5.5.5.2
R5(config)#ip route 3.0.0.0 255.0.0.0  5.5.5.2
R5(config)#ip route 20.0.0.0 255.0.0.0  5.5.5.2
R5(config)#ip route 30.0.0.0 255.0.0.0  5.5.5.2
R5(config)#ip route 40.0.0.0 255.0.0.0  5.5.5.2
R5(config)#ip route 10.0.0.0 255.0.0.0  5.5.5.2
R5(config)#ip route 1.0.0.0 255.0.0.0  5.5.5.2
R5(config)#end
R2(config)#ip route 0.0.0.0 0.0.0.0 5.5.5.1
R1#show ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is 1.1.1.2 to network 0.0.0.0
O*E2 0.0.0.0/0 [110/1] via 1.1.1.2, 00:01:58, Serial3/0
O 3.0.0.0/8 [110/128] via 1.1.1.2, 00:01:58, Serial3/0
O 4.0.0.0/8 [110/128] via 1.1.1.2, 00:01:58, Serial3/0
O 20.0.0.0/8 [110/65] via 1.1.1.2, 00:01:58, Serial3/0
O 30.0.0.0/8 [110/129] via 1.1.1.2, 00:01:58, Serial3/0
O 40.0.0.0/8 [110/129] via 1.1.1.2, 00:01:58, Serial3/0
R2(config)#ip route 0.0.0.0 0.0.0.0 5.5.5.1
R2(config)#router ospf 1
R2(config-router)#default-information originate always
R2(config-router)#end
R1#show ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is 1.1.1.2 to network 0.0.0.0
O*E2 0.0.0.0/0 [110/1] via 1.1.1.2, 00:01:58, Serial3/0
O 3.0.0.0/8 [110/128] via 1.1.1.2, 00:01:58, Serial3/0
O 4.0.0.0/8 [110/128] via 1.1.1.2, 00:01:58, Serial3/0
O 20.0.0.0/8 [110/65] via 1.1.1.2, 00:01:58, Serial3/0
O 30.0.0.0/8 [110/129] via 1.1.1.2, 00:01:58, Serial3/0
O 40.0.0.0/8 [110/129] via 1.1.1.2, 00:01:58, Serial3/0
R2#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override
Gateway of last resort is 5.5.5.1 to network 0.0.0.0
S*    0.0.0.0/0 [1/0] via 5.5.5.1
      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.0.0.0/8 is directly connected, Serial3/0
L        1.1.1.2/32 is directly connected, Serial3/0
      3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        3.0.0.0/8 is directly connected, Serial3/2
L        3.3.3.2/32 is directly connected, Serial3/2
      4.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        4.0.0.0/8 is directly connected, Serial3/1
L        4.4.4.2/32 is directly connected, Serial3/1
      5.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        5.0.0.0/8 is directly connected, Serial3/3
L        5.5.5.2/32 is directly connected, Serial3/3
O     10.0.0.0/8 [110/65] via 1.1.1.1, 00:02:20, Serial3/0
      20.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        20.0.0.0/8 is directly connected, FastEthernet0/0
L        20.1.1.1/32 is directly connected, FastEthernet0/0
O     30.0.0.0/8 [110/65] via 3.3.3.1, 00:02:20, Serial3/2
O     40.0.0.0/8 [110/65] via 4.4.4.1, 00:02:20, Serial3/1
R3#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override
Gateway of last resort is 3.3.3.2 to network 0.0.0.0
O*E2  0.0.0.0/0 [110/1] via 3.3.3.2, 00:03:42, Serial3/2
O     1.0.0.0/8 [110/128] via 3.3.3.2, 00:03:42, Serial3/2
      3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        3.0.0.0/8 is directly connected, Serial3/2
L        3.3.3.1/32 is directly connected, Serial3/2
O     4.0.0.0/8 [110/128] via 3.3.3.2, 00:03:42, Serial3/2
O     10.0.0.0/8 [110/129] via 3.3.3.2, 00:03:42, Serial3/2
O     20.0.0.0/8 [110/65] via 3.3.3.2, 00:03:42, Serial3/2
      30.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        30.0.0.0/8 is directly connected, FastEthernet0/0
L        30.1.1.1/32 is directly connected, FastEthernet0/0
O     40.0.0.0/8 [110/129] via 3.3.3.2, 00:03:42, Serial3/2
R4#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override
Gateway of last resort is 4.4.4.2 to network 0.0.0.0
O*E2  0.0.0.0/0 [110/1] via 4.4.4.2, 00:03:58, Serial3/1
O     1.0.0.0/8 [110/128] via 4.4.4.2, 00:03:58, Serial3/1
O     3.0.0.0/8 [110/128] via 4.4.4.2, 00:03:58, Serial3/1
      4.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        4.0.0.0/8 is directly connected, Serial3/1
L        4.4.4.1/32 is directly connected, Serial3/1
O     10.0.0.0/8 [110/129] via 4.4.4.2, 00:03:58, Serial3/1
O     20.0.0.0/8 [110/65] via 4.4.4.2, 00:03:58, Serial3/1
O     30.0.0.0/8 [110/129] via 4.4.4.2, 00:03:58, Serial3/1
      40.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        40.0.0.0/8 is directly connected, FastEthernet0/0
L        40.1.1.1/32 is directly connected, FastEthernet0/0
R5#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override
Gateway of last resort is not set
S     1.0.0.0/8 [1/0] via 5.5.5.2
S     3.0.0.0/8 [1/0] via 5.5.5.2
S     4.0.0.0/8 [1/0] via 5.5.5.2
      5.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        5.0.0.0/8 is directly connected, Serial3/3
L        5.5.5.1/32 is directly connected, Serial3/3
S     10.0.0.0/8 [1/0] via 5.5.5.2
      15.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
C        15.0.1.0/24 is directly connected, Loopback1
L        15.0.1.1/32 is directly connected, Loopback1
C        15.0.2.0/24 is directly connected, Loopback2
L        15.0.2.1/32 is directly connected, Loopback2
C        15.0.3.0/24 is directly connected, Loopback3
L        15.0.3.1/32 is directly connected, Loopback3
S     20.0.0.0/8 [1/0] via 5.5.5.2
S     30.0.0.0/8 [1/0] via 5.5.5.2
S     40.0.0.0/8 [1/0] via 5.5.5.2
      50.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        50.0.0.0/8 is directly connected, FastEthernet0/0
L        50.1.1.1/32 is directly connected, FastEthernet0/0
R1#ping 15.0.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 15.0.1.1, timeout is 2 seconds:
!!!!!
R2#ping 15.0.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 15.0.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/81/120 ms
R3#ping 15.0.3.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 15.0.3.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 68/105/156 ms
R4#ping 50.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 50.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 108/148/168 ms
R5#ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 96/163/200 ms
R5#ping 20.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/69/84 ms
R5#ping 30.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 30.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 112/172/244 ms
R5#ping 40.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 40.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 92/129/164 ms
 


 
 
 
 
No comments:
Post a Comment