Reset Search



Unable to use REST API to configure BGP neigbor prefix-list out

« Go Back


TitleUnable to use REST API to configure BGP neigbor prefix-list out
Inbound and Outbound BGP route filtering can be configured with the following cli by use of prefix-list.

Enter the neighbor ip-address prefix-list command and specify the in or out keyword to filter the incoming route updates from a specified BGP neighbor or outbound route updates to a specified BGP neighbor.

device(config-bgp-ipv4u)# neighbor prefix-list myprefixlist in
device(config-bgp-ipv4u)# neighbor prefix-list myprefixlist out

Steps to configure:
sw0# conf t
Entering configuration mode terminal
sw0(config)# rb 1
sw0(config-rbridge-id-1)# router bgp
sw0(config-bgp-router)# address-family ipv4 unicast
sw0(config-bgp-ipv4u)# neighbor prefix-list TEST out
sw0(config-bgp-ipv4u)# neighbor prefix-list TEST in
sw0(config-bgp-ipv4u)# do show run rb 1
router bgp
local-as 64552
confederation identifier 7979
confederation peers 64550
neighbor x.x.x.5 remote-as 64550
neighbor x.x.x.5 next-hop-self
neighbor x.x.x.70 remote-as 64552
neighbor x.x.x.70 next-hop-self
neighbor x.x.x.137 remote-as 35415
neighbor x.x.0.4 remote-as 65533
address-family ipv4 unicast

redistribute connected
redistribute static
neighbor x.x.0.4 activate
neighbor x.x.0.4 prefix-list TEST in
neighbor x.x.0.4 prefix-list TEST out < ----------
neighbor x.x.x.137 activate
neighbor x.x.x.70 activate
address-family ipv6 unicast

This works fine in current code in cli, however, the "prefix-list out" configuration is NOT possible when using REST API though it works for "prefix-list in"
The following error is present when using REST API to configure the same for prefix-list out.

The reason is due to a Defect in the REST framework, which will need to be corrected in future patch.

WorkAround:Configure via CLI until the patch is available.

The error is shown below:

[iuser@brm-up-tso-1 ~]$ curl -i --request PUT --data "<prefix-list><ip-access-number>TEST</ip-access-number><out>true</out>" "http://admin:password@x.x.x.x/rest/config/running
HTTP/1.1 400 Bad Request
Date: Tue, 20 Sep 2016 20:23:09 GMT
Server: NOS WWW
Authentication-Token: eFM9Xz5QaUk4ZlRoYjo4TC9ETEFcTk1eOk9gNnVgb0o=
Cache-control: private, no-cache, must-revalidate, proxy-revalidate
Content-Length: 603
Content-Type: text/plain
Connection: close

mismatched keypaths: /rbridge:rbridge-id[rbridge:rbridge-id="1"]/rbridge:router/bgp:router-bgp/bgp:address-family/bgp:ipv4/bgp:ipv4-unicast/bgp:default-vrf/bgp:neighbor/bgp:af-ipv4-neighbor-address-holder/bgp:af-ipv4-neighbor-address[bgp:af-ipv4-neighbor-address="x.x.0.4"]/bgp:prefix-list/bgp:direction-out , /rbridge:rbridge-id[rbridge:rbridge-id="1"]/rbridge:router/bgp:router-bgp/bgp:address-family/bgp:ipv4/bgp:ipv4-unicast/bgp:default-vrf/bgp:neighbor/bgp:af-ipv4-neighbor-address-holder/bgp:af-ipv4-neighbor-address[bgp:af-ipv4-neighbor-address="x.x.0.4"]/bgp:prefix-list/bgp:direction-in[user@brm-up-tso-1 ~]$
Additional notes



Was this article helpful?



Please tell us how we can make this article more useful.

Characters Remaining: 255