Skip to content

Commit 725edf5

Browse files
donaldsharpton31337
authored andcommitted
bgpd: Add 'no set as-path prepend last-as X' command
The `set as-path prepend last-as X` command had no, 'no' form of the command. Add this into the cli. Testing: ! route-map BLARBLE permit 10 set as-path prepend last-as 3 ! ! router bgp 9999 neighbor 10.50.12.118 remote-as external neighbor 10.50.12.118 ebgp-multihop 30 ! address-family ipv4 unicast neighbor 10.50.12.118 route-map BLARBLE in ! ! eva# show bgp ipv4 uni 4.4.4.4 BGP routing table entry for 4.4.4.4/32 Paths: (1 available, best #1, table default) Advertised to non peer-group peers: 10.50.12.118 999 999 999 999 10.50.12.118 from 10.50.12.118 (10.50.12.118) Origin incomplete, metric 0, valid, external, best (First path received) Last update: Mon Aug 26 09:47:17 2019 eva# conf eva(config)# route-map BLARBLE permit 10 eva(config-route-map)# no set as-path prepend last-as 3 eva(config-route-map)# end eva# clear bgp ipv4 uni * eva# show bgp ipv4 uni 4.4.4.4 BGP routing table entry for 4.4.4.4/32 Paths: (1 available, best #1, table default) Advertised to non peer-group peers: 10.50.12.118 999 10.50.12.118 from 10.50.12.118 (10.50.12.118) Origin incomplete, metric 0, valid, external, best (First path received) Last update: Mon Aug 26 09:48:31 2019 Signed-off-by: Donald Sharp <[email protected]>
1 parent 1ed807a commit 725edf5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

bgpd/bgp_routemap.c

+13
Original file line numberDiff line numberDiff line change
@@ -4147,6 +4147,18 @@ DEFUN (no_set_aspath_prepend,
41474147
return ret;
41484148
}
41494149

4150+
DEFUN (no_set_aspath_prepend_lastas,
4151+
no_set_aspath_prepend_lastas_cmd,
4152+
"no set as-path prepend last-as [(1-10)]",
4153+
NO_STR
4154+
SET_STR
4155+
"Transform BGP AS_PATH attribute\n"
4156+
"Prepend to the as-path\n"
4157+
"Use the peers AS-number\n"
4158+
"Number of times to insert\n")
4159+
{
4160+
return no_set_aspath_prepend(self, vty, argc, argv);
4161+
}
41504162

41514163
DEFUN (set_aspath_exclude,
41524164
set_aspath_exclude_cmd,
@@ -5112,6 +5124,7 @@ void bgp_route_map_init(void)
51125124
install_element(RMAP_NODE, &set_aspath_prepend_lastas_cmd);
51135125
install_element(RMAP_NODE, &set_aspath_exclude_cmd);
51145126
install_element(RMAP_NODE, &no_set_aspath_prepend_cmd);
5127+
install_element(RMAP_NODE, &no_set_aspath_prepend_lastas_cmd);
51155128
install_element(RMAP_NODE, &no_set_aspath_exclude_cmd);
51165129
install_element(RMAP_NODE, &no_set_aspath_exclude_all_cmd);
51175130
install_element(RMAP_NODE, &set_origin_cmd);

0 commit comments

Comments
 (0)