05-29-2018 11:46 AM - edited 03-05-2019 10:31 AM
Hello community,
I have a little problem while playing with default route redistribution in my Hub and Spoke lab.
Please see topology bellow:
I would like to configure a default route on the London - HUB and this default route should be redistributed to spokes Manchester and Newcastle.
London - HUB config:
hostname LONDON interface Loopback0 ipv4 address 4.4.4.4 255.255.255.255 ! interface GigabitEthernet0/0/0/0 ipv4 address 10.1.4.4 255.255.255.0 ! router ospf 1 router-id 4.4.4.4 default-information originate always area 0 interface Loopback0 passive enable ! interface GigabitEthernet0/0/0/0 network point-to-point ! ! !
PE1 configuration:
vrf definition london rd 65001:1 ! address-family ipv4 route-target export 65001:1 route-target import 65001:3 route-target import 65001:2 exit-address-family ! vrf definition manchester rd 65001:3 ! address-family ipv4 route-target export 65001:3 route-target import 65001:1 exit-address-family ! vrf definition newcastle rd 65001:2 ! address-family ipv4 route-target export 65001:2 route-target import 65001:1 exit-address-family ! interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface GigabitEthernet0/0 vrf forwarding london ip address 10.1.4.1 255.255.255.0 ip ospf network point-to-point ! interface GigabitEthernet0/1 vrf forwarding newcastle ip address 10.1.2.1 255.255.255.0 ip ospf network point-to-point ! interface GigabitEthernet0/2 vrf forwarding manchester ip address 10.1.3.1 255.255.255.0 ip ospf network point-to-point ! router ospf 1 vrf london router-id 1.1.1.1 redistribute bgp 1 subnets network 10.1.4.0 0.0.0.255 area 0 ! router ospf 2 vrf newcastle redistribute bgp 1 subnets network 10.1.2.0 0.0.0.255 area 0 ! router ospf 3 vrf manchester redistribute bgp 1 subnets network 10.1.3.0 0.0.0.255 area 0 ! router bgp 1 bgp log-neighbor-changes ! address-family ipv4 vrf london redistribute connected redistribute ospf 1 match internal external 1 external 2 default-information originate exit-address-family ! address-family ipv4 vrf manchester redistribute connected redistribute ospf 3 match internal external 1 external 2 exit-address-family ! address-family ipv4 vrf newcastle redistribute connected redistribute ospf 2 match internal external 1 external 2 exit-address-family !
Manchester - SPOKE config:
interface Loopback0 ip address 3.3.3.3 255.255.255.255 ip ospf 1 area 0 ! interface GigabitEthernet0/2 ip address 10.1.3.3 255.255.255.0 ip ospf network point-to-point ip ospf 1 area 0 ! router ospf 1 router-id 3.3.3.3 passive-interface Loopback0 !
Newcastle - SPOKE config:
interface Loopback0 ip address 2.2.2.2 255.255.255.255 ip ospf 1 area 0 ! interface GigabitEthernet0/1 ip address 10.1.2.2 255.255.255.0 ip ospf network point-to-point ip ospf 1 area 0 ! router ospf 1 router-id 2.2.2.2 passive-interface Loopback0 !
Now what I did:
1. Advertise the default route from HUB into OSPF and send it to the PE1 neighbor - this is working
PE1#show ip route vrf london Routing Table: london 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 a - application route + - replicated route, % - next hop override, p - overrides from PfR Gateway of last resort is 10.1.4.4 to network 0.0.0.0 O*E2 0.0.0.0/0 [110/1] via 10.1.4.4, 02:35:58, GigabitEthernet0/0 2.0.0.0/32 is subnetted, 1 subnets B 2.2.2.2 [20/2] via 10.1.2.2 (newcastle), 00:17:01, GigabitEthernet0/1 3.0.0.0/32 is subnetted, 1 subnets B 3.3.3.3 [20/2] via 10.1.3.3 (manchester), 00:17:01, GigabitEthernet0/2 4.0.0.0/32 is subnetted, 1 subnets O 4.4.4.4 [110/2] via 10.1.4.4, 02:37:11, GigabitEthernet0/0 10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks B 10.1.2.0/24 is directly connected, 00:17:01, GigabitEthernet0/1 L 10.1.2.1/32 is directly connected, GigabitEthernet0/1 B 10.1.3.0/24 is directly connected, 00:17:01, GigabitEthernet0/2 L 10.1.3.1/32 is directly connected, GigabitEthernet0/2 C 10.1.4.0/24 is directly connected, GigabitEthernet0/0 L 10.1.4.1/32 is directly connected, GigabitEthernet0/0
2. Redistribute this route into BGP and create a VPNv4 prefix (with RT=65001:1) - this is also working:
PE1#show bgp vpnv4 uni vrf london 0.0.0.0 BGP routing table entry for 65001:1:0.0.0.0/0, version 2 Paths: (1 available, best #1, table london) Not advertised to any peer Refresh Epoch 1 Local 10.1.4.4 (via vrf london) from 0.0.0.0 (1.1.1.1) Origin incomplete, metric 1, localpref 100, weight 32768, valid, sourced, best Extended Community: RT:65001:1 OSPF DOMAIN ID:0x0005:0x000000010200 OSPF RT:0.0.0.0:5:1 OSPF ROUTER ID:1.1.1.1:0 rx pathid: 0, tx pathid: 0x0
3. Now import this route into VRF Manchester as well as Newcastle - also working:
PE1#show ip route vrf manchester 0.0.0.0 Routing Table: manchester Routing entry for 0.0.0.0/0, supernet Known via "bgp 1", distance 20, metric 1, candidate default path, type external Redistributing via ospf 3 Last update from 10.1.4.4 on GigabitEthernet0/0, 00:19:34 ago Routing Descriptor Blocks: * 10.1.4.4 (london), from 0.0.0.0, 00:19:34 ago, via GigabitEthernet0/0 Route metric is 1, traffic share count is 1 AS Hops 0 MPLS label: none PE1#show ip route vrf newcastle 0.0.0.0 Routing Table: newcastle Routing entry for 0.0.0.0/0, supernet Known via "bgp 1", distance 20, metric 1, candidate default path, type external Redistributing via ospf 2 Last update from 10.1.4.4 on GigabitEthernet0/0, 00:19:55 ago Routing Descriptor Blocks: * 10.1.4.4 (london), from 0.0.0.0, 00:19:55 ago, via GigabitEthernet0/0 Route metric is 1, traffic share count is 1 AS Hops 0 MPLS label: none
4. Import this default route into the OSPF database and sent it to OSPF peers Manchester and Newcastle - this is not working:
PE1#show ip ospf database OSPF Router with ID (10.1.3.1) (Process ID 3) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count 3.3.3.3 3.3.3.3 1457 0x80000007 0x0001B8 3 10.1.3.1 10.1.3.1 1476 0x80000007 0x00587A 2 Type-5 AS External Link States Link ID ADV Router Age Seq# Checksum Tag 4.4.4.4 10.1.3.1 1266 0x80000001 0x00C37D 3489660929 10.1.4.0 10.1.3.1 1266 0x80000001 0x00B78B 3489660929 OSPF Router with ID (10.1.2.1) (Process ID 2) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count 2.2.2.2 2.2.2.2 1430 0x80000007 0x00C108 3 10.1.2.1 10.1.2.1 1453 0x80000007 0x0026B4 2 Type-5 AS External Link States Link ID ADV Router Age Seq# Checksum Tag 4.4.4.4 10.1.2.1 1266 0x80000001 0x00CA77 3489660929 10.1.4.0 10.1.2.1 1266 0x80000001 0x00BE85 3489660929 OSPF Router with ID (1.1.1.1) (Process ID 1) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count 1.1.1.1 1.1.1.1 1691 0x80000008 0x00855C 2 4.4.4.4 4.4.4.4 1608 0x80000008 0x005959 3 Type-5 AS External Link States Link ID ADV Router Age Seq# Checksum Tag 0.0.0.0 4.4.4.4 1608 0x80000005 0x00BAE3 1 2.2.2.2 1.1.1.1 1266 0x80000001 0x007FD4 3489660929 3.3.3.3 1.1.1.1 1266 0x80000001 0x0051FE 3489660929 10.1.2.0 1.1.1.1 1266 0x80000001 0x002D23 3489660929 10.1.3.0 1.1.1.1 1266 0x80000001 0x00222D 3489660929
Just to confirm there is no OSPF default route in the SPOKEs RIBs:
Routing table on Manchester - no default route:
Manchester#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 a - application route + - replicated route, % - next hop override, p - overrides from PfR Gateway of last resort is not set 3.0.0.0/32 is subnetted, 1 subnets C 3.3.3.3 is directly connected, Loopback0 4.0.0.0/32 is subnetted, 1 subnets O E2 4.4.4.4 [110/2] via 10.1.3.1, 00:22:32, GigabitEthernet0/2 10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks C 10.1.3.0/24 is directly connected, GigabitEthernet0/2 L 10.1.3.3/32 is directly connected, GigabitEthernet0/2 O E2 10.1.4.0/24 [110/1] via 10.1.3.1, 00:22:32, GigabitEthernet0/2
Routing table on Newcastle- no default route:
Necastle#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 a - application route + - replicated route, % - next hop override, p - overrides from PfR Gateway of last resort is not set 2.0.0.0/32 is subnetted, 1 subnets C 2.2.2.2 is directly connected, Loopback0 4.0.0.0/32 is subnetted, 1 subnets O E2 4.4.4.4 [110/2] via 10.1.2.1, 00:22:26, GigabitEthernet0/1 10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks C 10.1.2.0/24 is directly connected, GigabitEthernet0/1 L 10.1.2.2/32 is directly connected, GigabitEthernet0/1 O E2 10.1.4.0/24 [110/1] via 10.1.2.1, 00:22:26, GigabitEthernet0/1
So I have 2 questions:
1 - In order to redistribute the default route from OSPF to BGP, do I really need to create the "redistribute" as well as "default-information originate" statements?
2 - Why there is no default route on spokes :(
Much appreciated your help guys.
Thank you.
Solved! Go to Solution.
05-29-2018 12:33 PM - last edited on 09-12-2022 03:00 AM by Translator
1 - In order to redistribute the default route from OSPF to BGP, do I really need to create the
redistribute
as well as
default-information originate
statements?
Yes, you need the
default-information originate
to allow redistribution of the default route into BGP. Both commands are needed.
2 - Why there is no default route on spokes
You cannot redistribute the default route into OSPF. You need to use the
default-information originate
to achieve that.
Regards,
05-29-2018 12:33 PM - last edited on 09-12-2022 03:00 AM by Translator
1 - In order to redistribute the default route from OSPF to BGP, do I really need to create the
redistribute
as well as
default-information originate
statements?
Yes, you need the
default-information originate
to allow redistribution of the default route into BGP. Both commands are needed.
2 - Why there is no default route on spokes
You cannot redistribute the default route into OSPF. You need to use the
default-information originate
to achieve that.
Regards,
05-29-2018 11:28 PM
Thank you very much Harold, I knew I am missing something simple :)
Have a nice day.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide