Unable to configure route redistribution with cross-vCenter NSX 6.4

Written by Sam McGeown
Published on 23/5/2019 - Read in about 1 min (180 words)

I ran into this UI bug the other day when I was trying to enable route redistribution on an Edge in a Secondary site of a cross-vCenter NSX deployment.

The Edge itself was deployed correctly, and configured to peer with a physical northbound router, however when I attempted to configure the route redistribution I was unable to do so.

Fortunately, the solution was simple - use the API.

  • Perform a GET operation to retrieve the current BGP configuration
1
GET https://{{nsxmanager}}/api/4.0/edges/{{edgeId}}/routing/config/bgp
  • Copy and modify the BGP section to include the redistribution settings you require
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
            <bgp>
                <enabled>true</enabled>
                <localAS>65004</localAS>
                <localASNumber>65004</localASNumber>
                <bgpNeighbours>
                    <bgpNeighbour>
                        ...snip...
                    </bgpNeighbour>
                </bgpNeighbours>
                <redistribution>
                    <enabled>true</enabled>
                    <rules>
                        <rule>
                            <id>0</id>
                            <from>
                                <ospf>false</ospf>
                                <bgp>false</bgp>
                                <static>false</static>
                                <connected>true</connected>
                            </from>
                            <action>permit</action>
                        </rule>
                    </rules>
                </redistribution>
                <gracefulRestart>false</gracefulRestart>
                <defaultOriginate>true</defaultOriginate>
            </bgp>
  • PUT the BGP section back to reconfigure the Edge
1
PUT https://{{nsxmanager}}/api/4.0/edges/{{edgeId}}/routing/config/bgp

The UI will still be disabled for route distribution, but the redistribution table will be populated, and BGP redistribution enabled.

Share this post