Is there a way to get the pair of switches for the VRRP protocol using NQE?
Page 1 / 1
Yes. Lookup “FHRP” that is the generic name for First Hop Routing Protocol that encompasses VRRP. It is next to IP address info under the Subintenface, RoutedVlan, and Bridge (think irb).
foreach device in network.devices
foreach interface in device.interfaces
foreach subinterface in interface.subinterfaces
let ipv4 = subinterface.ipv4
let fhrp = ipv4.fhrp
let vrrp = fhrp.vrrp
foreach fhrpGroup in vrrp.fhrpGroups
select {
deviceName: device.name,
interfaceName: interface.name,
subinterfaceName: subinterface.name,
fhrpGroupVirtualRouterId: fhrpGroup.virtualRouterId,
state: fhrpGroup.state,
virtualAddress: fhrpGroup.virtualAddress
}
I thought it actually listed the peer, but I think you match it by either the virtual address or the virtual address plus virtualRouterId. I think that is groupId just kind of named differently.
Reply
Sign up
Already have an account? Login
Welcome to the Forward Networks Community
Select a login option:
Register / Login Forward Employee LoginEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.