This post you’ll find an explanation on BGP Default Routing and three ways on how a Cisco router or switch can generate a default route to its neighbors.
Table of Contents
default-information originate
When the redistribute command for a specific routing protocol is configured under the BGP process, that command injects all existing routes in the routing table for that specific routing protocol into the BGP table EXCEPT for the default route. The default-information originate command allows for the redistribution of the default route into the BGP table to further advertise to other BGP neighbors.
In the diagram above, notice that R2 is receiving four EIGRP routes, including a default route, from R1.
R2#show ip route eigrp 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.12.0.1 to network 0.0.0.0 D* 0.0.0.0/0 [90/2816] via 10.12.0.1, 00:26:03, GigabitEthernet0/0 45.0.0.0/32 is subnetted, 1 subnets D 45.0.0.1 [90/130816] via 10.12.0.1, 00:27:47, GigabitEthernet0/0 60.0.0.0/32 is subnetted, 1 subnets D 60.0.0.1 [90/130816] via 10.12.0.1, 00:27:47, GigabitEthernet0/0 93.0.0.0/32 is subnetted, 1 subnets D 93.0.0.1 [90/130816] via 10.12.0.1, 00:27:47, GigabitEthernet0/0 R2#
On R2, let’s redistribute EIGRP routes into BGP.
R2#show runn | sec r b router bgp 65000 bgp log-neighbor-changes redistribute eigrp 100 neighbor 10.23.0.3 remote-as 65000 neighbor 10.23.0.3 next-hop-self R2#
After you redistribute EIGRP into BGP on R2, R3 receives the following routes in the in its BGP table.
R3#show ip bgp BGP table version is 5, local router ID is 10.23.0.3 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *>i 10.12.0.0/29 10.23.0.2 0 100 0 ? *>i 45.0.0.1/32 10.23.0.2 130816 100 0 ? *>i 60.0.0.1/32 10.23.0.2 130816 100 0 ? *>i 93.0.0.1/32 10.23.0.2 130816 100 0 ? R3#
And also R3 installs them in its routing table (RIB).
R3#show ip route bgp 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 10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks B 10.12.0.0/29 [200/0] via 10.23.0.2, 00:00:02 45.0.0.0/32 is subnetted, 1 subnets B 45.0.0.1 [200/130816] via 10.23.0.2, 00:00:02 60.0.0.0/32 is subnetted, 1 subnets B 60.0.0.1 [200/130816] via 10.23.0.2, 00:00:02 93.0.0.0/32 is subnetted, 1 subnets B 93.0.0.1 [200/130816] via 10.23.0.2, 00:00:02 R3#
Notice that the EIGRP default route is not there. Only the 45.0.0.1/32, 60.0.0.1/32, and 93.0.0.1/32 routes are there in addition to 10.12.0.0/29, the IP subnet of the link between R1 and R2 since R2’s G0/0 interface has EIGRP enabled.
Let’s now allow R2 to redistribute the EIGRP default route received from R1 into BGP with the default-information originate command
R2# R2#config term Enter configuration commands, one per line. End with CNTL/Z. R2(config)#router bgp 65000 R2(config-router)#default-information originate R2(config-router)#end R2# *Feb 13 13:48:59.644: %SYS-5-CONFIG_I: Configured from console by console R2#show runn | sec r b router bgp 65000 bgp log-neighbor-changes redistribute eigrp 100 neighbor 10.23.0.3 remote-as 65000 neighbor 10.23.0.3 next-hop-self default-information originate R2#
Let’s take a look at R3’s BGP and routing tables now.
R3#show ip bgp BGP table version is 6, local router ID is 10.23.0.3 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *>i 0.0.0.0 10.23.0.2 2816 100 0 ? *>i 10.12.0.0/29 10.23.0.2 0 100 0 ? *>i 45.0.0.1/32 10.23.0.2 130816 100 0 ? *>i 60.0.0.1/32 10.23.0.2 130816 100 0 ? *>i 93.0.0.1/32 10.23.0.2 130816 100 0 ? R3# R3#show ip route bgp 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.23.0.2 to network 0.0.0.0 B* 0.0.0.0/0 [200/2816] via 10.23.0.2, 00:01:31 10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks B 10.12.0.0/29 [200/0] via 10.23.0.2, 00:10:26 45.0.0.0/32 is subnetted, 1 subnets B 45.0.0.1 [200/130816] via 10.23.0.2, 00:10:26 60.0.0.0/32 is subnetted, 1 subnets B 60.0.0.1 [200/130816] via 10.23.0.2, 00:10:26 93.0.0.0/32 is subnetted, 1 subnets B 93.0.0.1 [200/130816] via 10.23.0.2, 00:10:26 R3#
There you have it. The default route is there now! R2 successfully redistributed all EIGRP routes (received and connected interface) including the EIGRP default route with the following commands.
R2#show runn | sec r b router bgp 65000 bgp log-neighbor-changes redistribute eigrp 100 neighbor 10.23.0.3 remote-as 65000 neighbor 10.23.0.3 next-hop-self default-information originate R2#
network 0.0.0.0
The network 0.0.0.0/0 command under the router BGP process, signals BGP to look for the default route in the routing table and if found, inject it into the BGP table (aka BGP RIP for Routing Information Base). This command requires a default route in the routing table sourced from any routing protocol such as OSPF, RIP, or EIGRP, or configured manually with a static route. The point is that BGP will look in the routing table for a default route, and if found, it will install that default route in the BGP table.
In this case scenario, R2 is receiving a default route from R1 via EIGRP. R3 and R4 are not receiving it.
Let’s look at R2’s BGP and routing tables.
R2#show ip bgp R2# R2# R2# 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 a - application route + - replicated route, % - next hop override, p - overrides from PfR Gateway of last resort is 10.12.0.1 to network 0.0.0.0 D* 0.0.0.0/0 [90/2816] via 10.12.0.1, 00:14:37, GigabitEthernet0/0 10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks C 10.12.0.0/29 is directly connected, GigabitEthernet0/0 L 10.12.0.2/32 is directly connected, GigabitEthernet0/0 C 10.23.0.0/29 is directly connected, GigabitEthernet0/1 L 10.23.0.2/32 is directly connected, GigabitEthernet0/1 C 10.24.0.0/29 is directly connected, GigabitEthernet0/2 L 10.24.0.2/32 is directly connected, GigabitEthernet0/2 45.0.0.0/32 is subnetted, 1 subnets D 45.0.0.1 [90/130816] via 10.12.0.1, 00:14:37, GigabitEthernet0/0 60.0.0.0/32 is subnetted, 1 subnets D 60.0.0.1 [90/130816] via 10.12.0.1, 00:14:37, GigabitEthernet0/0 93.0.0.0/32 is subnetted, 1 subnets D 93.0.0.1 [90/130816] via 10.12.0.1, 00:14:37, GigabitEthernet0/0 R2#
There is nothing on the BGP table. But, there’s a default route received via EIGRP from R1.
Let’s check R3’s and R4’s BGP tables.
R3#show ip bgp R3# R4#show ip bgp R4#
R3’s and R4’s BGP tables are empty.
Let’s configure R2 to inject the EIGRP default route into BGP with the network 0.0.0.0 command.
R2#config term Enter configuration commands, one per line. End with CNTL/Z. R2(config)#router bgp 65000 R2(config-router)#network 0.0.0.0 R2(config-router)#end R2#
Let’s look at R2’s BGP table now. Remember it was empty before.
R2#show ip bgp BGP table version is 2, local router ID is 10.23.0.2 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *> 0.0.0.0 10.12.0.1 2816 32768 i R2#
The default route is in R2’s BGP table now, and it is also selected as “best route.” See the > on the left of the route. That means that the route will be sent to BGP neighbors. Let’s see R3’s and R4’s BGP tables.
R3#show ip bgp BGP table version is 12, local router ID is 10.23.0.3 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *>i 0.0.0.0 10.23.0.2 2816 100 0 i R3# R4#show ip bgp BGP table version is 2, local router ID is 10.24.0.4 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *> 0.0.0.0 10.24.0.2 2816 0 65000 i R4#
What the network 0.0.0.0 BGP command does is that it looks for a matching route of 0.0.0.0 (default route) in the routing table and if it finds one, the BGP process injects it into its BGP table. And, if selected as “best route,” BGP advertises it to its neighbors.
neighbor default-originate
The neighbor default-originate command is configured on a per-neighbor basis and artificially generates and advertises a default route to the neighbor. This command does not require the presence of a default route in the routing table of the advertising router.
On the network below, R2 will generate a default route to R3 and R4 in spite of not having one in its BGP table.
Let’s look at R2’s BGP and routing tables.
R2#show ip bgp R2# 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 a - application route + - replicated route, % - next hop override, p - overrides from PfR Gateway of last resort is not set 10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks C 10.12.0.0/29 is directly connected, GigabitEthernet0/0 L 10.12.0.2/32 is directly connected, GigabitEthernet0/0 C 10.23.0.0/29 is directly connected, GigabitEthernet0/1 L 10.23.0.2/32 is directly connected, GigabitEthernet0/1 C 10.24.0.0/29 is directly connected, GigabitEthernet0/2 L 10.24.0.2/32 is directly connected, GigabitEthernet0/2 45.0.0.0/32 is subnetted, 1 subnets D 45.0.0.1 [90/130816] via 10.12.0.1, 00:03:03, GigabitEthernet0/0 60.0.0.0/32 is subnetted, 1 subnets D 60.0.0.1 [90/130816] via 10.12.0.1, 00:03:03, GigabitEthernet0/0 93.0.0.0/32 is subnetted, 1 subnets D 93.0.0.1 [90/130816] via 10.12.0.1, 00:03:03, GigabitEthernet0/0 R2#
As you can see, R2 has no default route installed in either its BGP nor routing table.
Let’s look at R3’s and R4’s BGP tables.
R3#show ip bgp R3# R4#show ip bgp R4#
They’re empty. Now, let’s have R2 generate a default route to R3 and R4 with the neighbor default-originate command.
R2#show runn | sec router bgp router bgp 65000 bgp log-neighbor-changes neighbor 10.23.0.3 remote-as 65000 neighbor 10.23.0.3 next-hop-self neighbor 10.24.0.4 remote-as 65100 R2# R2#config term Enter configuration commands, one per line. End with CNTL/Z. R2(config)#router bgp 65000 R2(config-router)#neighbor 10.23.0.3 default-originate R2(config-router)#neighbor 10.24.0.4 default-originate R2(config-router)#end R2# R2#show ip bgp BGP table version is 4, local router ID is 10.24.0.2 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path 0.0.0.0 0.0.0.0 0 i R2# R2#show ip bgp neighbors 10.23.0.3 advertised-routes BGP table version is 4, local router ID is 10.24.0.2 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Originating default network 0.0.0.0 Network Next Hop Metric LocPrf Weight Path Total number of prefixes 0 R2# R2#show ip bgp neighbors 10.24.0.4 advertised-routes BGP table version is 4, local router ID is 10.24.0.2 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Originating default network 0.0.0.0 Network Next Hop Metric LocPrf Weight Path Total number of prefixes 0 R2#
Remember that R3’s and R4’s BGP tables were empty. Let’s take a look at them now.
R3#show ip bgp BGP table version is 4, local router ID is 10.23.0.3 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *>i 0.0.0.0 10.23.0.2 0 100 0 i R3# R4#show ip bgp BGP table version is 4, local router ID is 10.24.0.4 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *> 0.0.0.0 10.24.0.2 0 65000 i R4#
R3 and R4 are receiving an artificially generated default route from R2 after the neighbor default-originate command was configured.
Now, when the neighbor default-originate command is used in conjunction with a route map, the default route is sent if two conditions are met:
- The route map includes a match ip address clause
- There is a route that matches the IP access list referenced under the match ip address clause
Let’s configure R2 to conditionally send a default route to R3 if the 45.0.0.1/32 route exists in the routing table.
R2(config)#do show runn | sec router bgp router bgp 65000 bgp log-neighbor-changes neighbor 10.23.0.3 remote-as 65000 neighbor 10.23.0.3 next-hop-self neighbor 10.23.0.3 default-originate neighbor 10.24.0.4 remote-as 65100 neighbor 10.24.0.4 default-originate R2(config)# R2(config)#ip access-list standard MATCHING_ROUTE R2(config-std-nacl)#permit host 45.0.0.1 R2(config-std-nacl)#exit R2(config)#route-map DEFAULT_CONDITIONAL R2(config-route-map)#match ip address MATCHING_ROUTE R2(config-route-map)#exit R2(config)#exit 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 a - application route + - replicated route, % - next hop override, p - overrides from PfR Gateway of last resort is not set 10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks C 10.12.0.0/29 is directly connected, GigabitEthernet0/0 L 10.12.0.2/32 is directly connected, GigabitEthernet0/0 C 10.23.0.0/29 is directly connected, GigabitEthernet0/1 L 10.23.0.2/32 is directly connected, GigabitEthernet0/1 C 10.24.0.0/29 is directly connected, GigabitEthernet0/2 L 10.24.0.2/32 is directly connected, GigabitEthernet0/2 45.0.0.0/32 is subnetted, 1 subnets D 45.0.0.1 [90/130816] via 10.12.0.1, 00:21:33, GigabitEthernet0/0 60.0.0.0/32 is subnetted, 1 subnets D 60.0.0.1 [90/130816] via 10.12.0.1, 00:21:33, GigabitEthernet0/0 93.0.0.0/32 is subnetted, 1 subnets D 93.0.0.1 [90/130816] via 10.12.0.1, 00:21:33, GigabitEthernet0/0 R2#
Let’s take a look R3’s BGP table.
R3#show ip bgp BGP table version is 4, local router ID is 10.23.0.3 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *>i 0.0.0.0 10.23.0.2 0 100 0 i R3#
So, yes, the default route is still there. Let’s have R1 stop sending the 45.0.0.1/32 route to R2.
R2#show ip route eigrp 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 60.0.0.0/32 is subnetted, 1 subnets D 60.0.0.1 [90/130816] via 10.12.0.1, 00:27:14, GigabitEthernet0/0 93.0.0.0/32 is subnetted, 1 subnets D 93.0.0.1 [90/130816] via 10.12.0.1, 00:27:14, GigabitEthernet0/0 R2# R2#show ip bgp neighbors 10.23.0.3 advertised-routes Total number of prefixes 0 R2#
R2 does not have the 45.0.0.1/32 in its routing table and it’s not sending a default route to R3. Let’s look at R3’s BGP table now.
R3#show ip bgp R3#
R3 is not receiving a default route anymore. Let’s look at R4’s BGP table.
R4#show ip bgp BGP table version is 4, local router ID is 10.24.0.4 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *> 0.0.0.0 10.24.0.2 0 65000 i R4#
R4’s default route is still there. Let’s get R1 to resume sending its 45.0.0.1/32 route to R2.
R2#show ip route eigrp 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 45.0.0.0/32 is subnetted, 1 subnets D 45.0.0.1 [90/130816] via 10.12.0.1, 00:00:03, GigabitEthernet0/0 60.0.0.0/32 is subnetted, 1 subnets D 60.0.0.1 [90/130816] via 10.12.0.1, 00:35:20, GigabitEthernet0/0 93.0.0.0/32 is subnetted, 1 subnets D 93.0.0.1 [90/130816] via 10.12.0.1, 00:35:20, GigabitEthernet0/0 R2# R2#show ip bgp neighbors 10.23.0.3 advertised-routes BGP table version is 6, local router ID is 10.24.0.2 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Originating default network 0.0.0.0 Network Next Hop Metric LocPrf Weight Path Total number of prefixes 0 R2#
Notice that the 45.0.0.1/32 is back in R2’s routing table and that R2 is resending a default route to R3. Let’s verify whether R3 is receiving it.
R3#show ip bgp BGP table version is 6, local router ID is 10.23.0.3 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *>i 0.0.0.0 10.23.0.2 0 100 0 i R3#
And there you have it. R3 is now receiving a default route again via the neighbor default-originate command with a route-map that monitors the presence of a route in R2’s routing table.
Summary
In this post, you learned three ways to send a default route in BGP:
- Via the default-information originate command.
- Via the network 0.0.0.0 command.
- Via the neighbor default-originate command with a route-map for conditional advertisement.
I hope this post was informative for you. Please, leave any questions you may have below.
Very interesting article. Thank you for writing it, Alirio! 🙂
Thank you, Petru!
Very useful when you want to forward default route to a especifico neighbor
Thank you, Dario.