ospf default-information originate always default-route example config

Home » Blog » Routing » ospf » ospf design » ospf default-information originate always default-route example config

ospf default-information originate always default-route example config

23.01 2020 | by massimiliano

Quando abbiamo la necessità di inviare una default route con ospf attraverso il comando ospf default-information dobbiamo considerare i seguenti […]


https://www.ingegnerianetworking.com/wp-content/uploads/2020/01/default-information-ospf-example1-863.png

Quando abbiamo la necessità di inviare una default route con ospf attraverso il comando ospf default-information dobbiamo considerare i seguenti aspetti:

 

ARCHITETTURA di RIFERIMENTO:

 

default information ospf example1

 

 

Example Config:

 

CE1#

router ospf 1
router-id 192.168.1.1
redistribute connected subnets

!

 

PE1#

router ospf 1
router-id 1.1.1.1
default-information originate

 

 

Verifica tabella di routing (con il comando default-information originate “senza always”)

 

PE1#show ip route
Gateway of last resort is not set

1.0.0.0/32         is subnetted, 1 subnets
C 1.1.1.1          is directly connected, Loopback0
10.0.0.0/8         is variably subnetted, 3 subnets, 3 masks
C 10.1.1.0/30   is directly connected, GigabitEthernet0/2
L 10.1.1.2/32   is directly connected, GigabitEthernet0/2
O E2 10.10.10.0/24 [110/20] via 10.1.1.1, 00:14:43, GigabitEthernet0/2        # corretto
192.168.1.0/32 is subnetted, 1 subnets
O E2 192.168.1.1 [110/20] via 10.1.1.1, 00:14:43, GigabitEthernet0/2

 

 

CE1#show ip route
Gateway of last resort is not set                                                                  # questo è il risultato “sbagliato”

 

10.0.0.0/8             is variably subnetted, 4 subnets, 3 masks
C 10.1.1.0/30       is directly connected, GigabitEthernet0/2
L 10.1.1.1/32 is    directly connected, GigabitEthernet0/2
C 10.10.10.0/24   is directly connected, GigabitEthernet0/1.10
L 10.10.10.1/32   is directly connected, GigabitEthernet0/1.10
192.168.1.0/32    is subnetted, 1 subnets
C 192.168.1.1     is directly connected, Loopback0

 

 

Per ricevere una default route è necessario che lato PE ci sia una routes di default nella sua tabella RIB affinchè sia possibile annunciarla al CE1.

 

PE1(config)#ip route 0.0.0.0 0.0.0.0 null 0

 

CE1#show ip route

Gateway of last resort is 10.1.1.2 to network 0.0.0.0

O*E2 0.0.0.0/0 [110/1] via 10.1.1.2, 00:00:54, GigabitEthernet0/2

 

10.0.0.0/8             is variably subnetted, 4 subnets, 3 masks
C 10.1.1.0/30       is directly connected, GigabitEthernet0/2
L 10.1.1.1/32       is directly connected, GigabitEthernet0/2
C 10.10.10.0/24  is directly connected, GigabitEthernet0/1.10
L 10.10.10.1/32   is directly connected, GigabitEthernet0/1.10
192.168.1.0/32    is subnetted, 1 subnets
C 192.168.1.1     is directly connected, Loopback0

 

 

Se non vogliamo inserire una static route in null 0, possiamo invece utilizzare il comando ospf default-information originate always:

 

PE1(config)#no ip route 0.0.0.0 0.0.0.0 null 0

!

router ospf 1
router-id 1.1.1.1
default-information originate always
!

 

CE1#show ip route

Gateway of last resort is 10.1.1.2 to network 0.0.0.0

O*E2 0.0.0.0/0 [110/1] via 10.1.1.2, 00:01:14, GigabitEthernet0/2

 

10.0.0.0/8            is variably subnetted, 4 subnets, 3 masks
C 10.1.1.0/30      is directly connected, GigabitEthernet0/2
L 10.1.1.1/32      is directly connected, GigabitEthernet0/2
C 10.10.10.0/24  is directly connected, GigabitEthernet0/1.10
L 10.10.10.1/32   is directly connected, GigabitEthernet0/1.10
192.168.1.0/32   is subnetted, 1 subnets
C 192.168.1.1     is directly connected, Loopback0

 

 

 

 

 

 

 

 

 

 

Torna in alto