Internet Protocol

Use the CLI to monitor IP (Internet Protocol) addresses, neighbors, and routes.

This information can help you:

  • Determine the IP neighbors for each switch.
  • Calculate the total number of IPv4 and IPv6 addresses and their corresponding interfaces.
  • Identify which routes are owned by which switches.
  • Pinpoint when changes occurred to an IP configuration.

Run netq show ip to display address, neighbor, and route information for your devices:

netq <hostname> show ip addresses [<remote-interface>] [<ipv4>|<ipv4/prefixlen>] [vrf <vrf>] [around <text-time>] [count] [json]
netq [<hostname>] show ip addresses [<remote-interface>] [<ipv4>|<ipv4/prefixlen>] [vrf <vrf>] [around <text-time>] [json]
netq show ip addresses [<remote-interface>] [<ipv4>|<ipv4/prefixlen>] [vrf <vrf>] [subnet|supernet|gateway] [around <text-time>] [json]
netq <hostname> show ip neighbors [<remote-interface>] [<ipv4>|<ipv4> vrf <vrf>|vrf <vrf>] [<mac>] [around <text-time>] [json]
netq [<hostname>] show ip neighbors [<remote-interface>] [<ipv4>|<ipv4> vrf <vrf>|vrf <vrf>] [<mac>] [around <text-time>] [count] [json]
netq <hostname> show ip routes [<ipv4>|<ipv4/prefixlen>] [vrf <vrf>] [origin] [around <text-time>] [count] [json]
netq [<hostname>] show ip routes [<ipv4>|<ipv4/prefixlen>] [vrf <vrf>] [origin] [around <text-time>] [json]
    
netq <hostname> show ipv6 addresses [<remote-interface>] [<ipv6>|<ipv6/prefixlen>] [vrf <vrf>] [around <text-time>] [count] [json]
netq [<hostname>] show ipv6 addresses [<remote-interface>] [<ipv6>|<ipv6/prefixlen>] [vrf <vrf>] [around <text-time>] [json]
netq show ipv6 addresses [<remote-interface>] [<ipv6>|<ipv6/prefixlen>] [vrf <vrf>] [subnet|supernet|gateway] [around <text-time>] [json]
netq <hostname> show ipv6 neighbors [<remote-interface>] [<ipv6>|<ipv6> vrf <vrf>|vrf <vrf>] [<mac>] [around <text-time>] [count] [json]
netq [<hostname>] show ipv6 neighbors [<remote-interface>] [<ipv6>|<ipv6> vrf <vrf>|vrf <vrf>] [<mac>] [around <text-time>] [json]
netq <hostname> show ipv6 routes [<ipv6>|<ipv6/prefixlen>] [vrf <vrf>] [origin] [around <text-time>] [count] [json]
netq [<hostname>] show ipv6 routes [<ipv6>|<ipv6/prefixlen>] [vrf <vrf>] [origin] [around <text-time>] [json]

View IP Address Information

You can view IPv4 and IPv6 address information for all devices, including the interface and VRF for each device.

View IPv4 Address Information for All Devices

To view only IPv4 addresses, run netq show ip addresses.

show ip addresses

View IPv6 Address Information for All Devices

To view only IPv6 addresses, run netq show ipv6 addresses.

show ipv6 addresses

Filter IP Address Information

You can filter IP address information by hostname, interface, or VRF.

show ip addresses eth0
leaf01 show ipv6 addresses

Obtain a Count of IP Addresses Used on a Device

Use the count option to view the number of IP addresses on a device.

show ip addresses count

View IP Neighbor Information

You can view the IPv4 and IPv6 neighbor information for all devices, including the interface port, MAC address, VRF assignment, and whether it learns the MAC address from the peer (remote=yes).

View IP Neighbor Information for All Devices

To view neighbor information for all devices running IPv4 or IPv6, run netq show ip/ipv6 neighbors.

show ip neighbors

Filter IP Neighbor Information

You can filter the list of IP neighbors to show only neighbors for a particular device, interface, address, or VRF assignment.

leaf02 show ipv6 neighbors
show ip neighbors vrf RED
show ipv6 neighbors vlan10

View IP Routes Information

You can view the IPv4 and IPv6 routes for all devices, including the IP address (with or without mask), the destination (by hostname) of the route, next hops available, VRF assignment, and whether a host is the owner of the route or MAC address.

View IP Routes for All Devices

To view all IP routes, run netq show ip routes.

show ip routes
show ipv6 routes

Filter IP Route Information

You can filter the IP route information listing for a particular device, interface address, VRF assignment or route origination.

show ip routes 10.0.0.12
spine01 show ip routes origin

View IP Routes for a Given Device at a Prior Time

As with most NetQ CLI commands, you can view a characteristic for a time in the past. The same is true with IP routes.

spine01 show ip routes around 24h

View the Number of IP Routes

You can view the total number of IP routes on all devices or on a particular device.

leaf01 show ip routes count

View the History of an IP Address

The netq show address-history command displays when an IP address configuration changed for an interface. Add options to the command to show:

  • Changes made between two points in time, using the between option.
  • Only the difference between to points in time, using the diff option.
  • The selected output order, using the listby option.
  • Each change made for the IP address on a particular interface, using the ifname option.
  • Changes listed chronologically.

The syntax of the command is:

netq [<hostname>] show address-history <text-prefix> [ifname <text-ifname>] [vrf <text-vrf>] [diff] [between <text-time> and <text-endtime>] [listby <text-list-by>] [json]
show address-history 10.1.10.2/24
show address-history 10.1.10.2/24 listby hostname
show address-history 10.1.10.2/24 between 2h and now

View the Neighbor History for an IP Address

The netq show neighbor-history command displays when the neighbor configuration changed for an IP address.

The syntax of the command is:

netq [<hostname>] show neighbor-history <text-ipaddress> [ifname <text-ifname>] [diff] [between <text-time> and <text-endtime>] [listby <text-list-by>] [json]
show neighbor-history 10.1.10.2
show neighbor-history 10.1.10.2 listby hostname
show neighbor-history 10.1.10.2 between 2h and now