Show IP route is showing secondary IP address on NSX-v Edge
search cancel

Show IP route is showing secondary IP address on NSX-v Edge

book

Article ID: 327350

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

Symptoms:
When you are configuring an interface on the NSX Edge with the Primary and Secondary IP, the routing table is taking a next-hop through the lowest IP address configured on the interface as a connected route.

For example:

1a) If you configure an Edge interface having a Primary IP as 172.25.255.20 and secondary IP as 172.25.255.21. Here, IP 172.25.255.20 (primary) is the lower IP address.

Primary and Secondary IP Address

1b) Check the routing table on the Edge, it shows the next hop through 172.25.255.20.

Routing Table

2a) Now after changing the IP address where the Primary IP is 172.25.255.20 and the secondary IP 172.25.255.12. Here, IP 172.25.255.12 is the lower IP address.




2b) Check the routing table on the Edge, it show the next hop through 172.25.255.12 although it is a secondary IP address on the interface.



Cause

This issue occurs:
  1. When both "Primary" and "Secondary" IP addresses are configured at the same time, the lower IP is chosen.
  2. If the primary address is configured first and the secondary IP address is added later, the primary IP is used irrespective of whether the secondary IP is lower or higher.

Resolution

This is an expected behavior.

When both "Primary" and "Secondary" IP addresses are configured at the same time, the lower IP address is chosen.
However, If the primary is configured first and the secondary IP address is added later, the primary IP is used irrespective of whether the secondary IP is lower or higher.

Workaround:
To work around this issue, configure the Primary IP address with the lower IP address.

Additional Information

Impact/Risks:
On the routing table, you see a secondary IP address of the Edge instead of the Primary IP address.