Default-Originate
This scenario demonstrates how to configure a BGP neighbor to advertise a default route using the default-originate command. Tests include unconditional advertisement and conditional advertisement using a route-map to control when the default route is sent.
Test iBGP - Neighbor default-originate
Description
Test to verify that the default-originate command unconditionally advertises a default route (0.0.0.0/0) to the BGP neighbor.
Scenario
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address 10.10.0.100/24 set protocols bgp 20 neighbor peer default-originate set protocols bgp 20 neighbor peer remote-address 10.10.0.200 set protocols bgp 20 neighbor peer remote-as 20 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address 10.10.0.200/24 set protocols bgp 20 neighbor peer remote-address 10.10.0.100 set protocols bgp 20 neighbor peer remote-as 20 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 3: Run the command protocols bgp show ip summary on DUT0 and check whether the output contains the following tokens:
EstablishedShow output
IPv4 Unicast Summary: BGP router identifier 10.10.0.100, local AS number 20 VRF default vrf-id 0 BGP table version 0 RIB entries 0, using 0 bytes of memory Peers 1, using 24 KiB of memory Neighbor LocalAddr V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State PfxRcd PfxSnt Desc 10.10.0.200 10.10.0.100 4 20 3 5 0 0 0 00:00:05 Established 0 1 N/A Total number of neighbors 1
Attention
Verify iBGP session establishes.
Step 4: Run the command protocols bgp show ip summary on DUT0 and check whether the output matches the following regular expressions:
10.10.0.200.*EstablishedShow output
IPv4 Unicast Summary: BGP router identifier 10.10.0.100, local AS number 20 VRF default vrf-id 0 BGP table version 0 RIB entries 0, using 0 bytes of memory Peers 1, using 24 KiB of memory Neighbor LocalAddr V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State PfxRcd PfxSnt Desc 10.10.0.200 10.10.0.100 4 20 3 5 0 0 0 00:00:05 Established 0 1 N/A Total number of neighbors 1
Attention
Verify that DUT1 receives the default route 0.0.0.0/0 from DUT0.
Step 5: Run the command protocols bgp show ip 0.0.0.0/0 on DUT1 and check whether the output contains the following tokens:
10.10.0.100 from 10.10.0.100 (10.10.0.100)Show output
BGP routing table entry for 0.0.0.0/0, version 1 Paths: (1 available, best #1, table default) Not advertised to any peer Local 10.10.0.100 from 10.10.0.100 (10.10.0.100) Origin IGP, metric 0, localpref 100, valid, internal, best (First path received) Last update: Tue May 19 14:40:27 2026
Test iBGP - Neighbor default-originate with route-map
Description
Test to verify that the default-originate command with route-map conditionally advertises a default route (0.0.0.0/0) to the BGP neighbor. DUT0 originates default route only when route 1.1.1.0/24 exists (matched by route-map).
Scenario
Step 1: Set the following configuration in DUT0 :
set interfaces dummy dum0 address 1.1.1.1/24 set interfaces ethernet eth0 address 10.10.0.100/24 set protocols bgp 20 neighbor peer default-originate route-map DEFAULT-MAP set protocols bgp 20 neighbor peer remote-address 10.10.0.200 set protocols bgp 20 neighbor peer remote-as 20 set protocols bgp 20 redistribute connected set protocols ip prefix-list TRACK rule 10 action permit set protocols ip prefix-list TRACK rule 10 prefix 1.1.1.0/24 set protocols route-map DEFAULT-MAP rule 10 action permit set protocols route-map DEFAULT-MAP rule 10 match ip address prefix-list TRACK set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address 10.10.0.200/24 set protocols bgp 20 neighbor peer remote-address 10.10.0.100 set protocols bgp 20 neighbor peer remote-as 20 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 3: Run the command protocols bgp show ip summary on DUT0 and check whether the output contains the following tokens:
EstablishedShow output
IPv4 Unicast Summary: BGP router identifier 10.10.0.100, local AS number 20 VRF default vrf-id 0 BGP table version 3 RIB entries 3, using 456 bytes of memory Peers 1, using 24 KiB of memory Neighbor LocalAddr V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State PfxRcd PfxSnt Desc 10.10.0.200 10.10.0.100 4 20 3 8 3 0 0 00:00:04 Established 0 3 N/A Total number of neighbors 1
Attention
Verify iBGP session establishes.
Step 4: Run the command protocols bgp show ip summary on DUT0 and check whether the output matches the following regular expressions:
10.10.0.200.*EstablishedShow output
IPv4 Unicast Summary: BGP router identifier 10.10.0.100, local AS number 20 VRF default vrf-id 0 BGP table version 3 RIB entries 3, using 456 bytes of memory Peers 1, using 24 KiB of memory Neighbor LocalAddr V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State PfxRcd PfxSnt Desc 10.10.0.200 10.10.0.100 4 20 3 8 3 0 0 00:00:04 Established 0 3 N/A Total number of neighbors 1
Attention
Verify that DUT1 receives the default route 0.0.0.0/0 from DUT0.
Step 5: Run the command protocols bgp show ip 0.0.0.0/0 on DUT1 and check whether the output contains the following tokens:
10.10.0.100 from 10.10.0.100 (10.10.0.100)Show output
BGP routing table entry for 0.0.0.0/0, version 1 Paths: (1 available, best #1, table default) Not advertised to any peer Local 10.10.0.100 from 10.10.0.100 (10.10.0.100) Origin IGP, metric 0, localpref 100, valid, internal, best (First path received) Last update: Tue May 19 14:40:41 2026