I have a requirement where we have a device plugged into a nexus switch on a /30 .
Sometimes that device may need to be moved to another nexus on the same /30.
We have a router that peers with both of these devices via BGP.
How can I get it so the Nexus only redistributes the /30 to the peer router when the end device is connected?
Is, If we move the device, the route follows it.
We were thinking some kind of redistribution rule based on an IPSLA or something like that..
ANyone else got any ideas?
Not sure I follow.
If it is a /30 then when you move the device the subnet should be removed from the IP routing table so it won't be redistributed into BGP.
This should happen whether it is a L3 routed port on the switches or whether it is a L2 access port with a L3 SVI as long as there is only one port in that vlan.
The /30 is on a port that will aloways be up ( So it always shows in the routing table as connected )
even though the end host may of vanished in this case.
Does it have to be up though ie. if the only thing on the other end is that one host what is it's purpose if the host has been moved to another switch ?
ip sla 10
icmp-echo x.x.x.x source-IP x.x.x.x
ip sla schedule 10 life forever start-time now
track 1 rtr 10 reachability
ip prefix-list BGP seq 5 permit 126.96.36.199/30
route-map BGP permit 10
match ip address prefix-list BGP
event manager applet PEER-DOWN
event track 1 state down
action 5.0 cli command "enable"
action 5.1 cli command "conf t"
action 5.2 cli command "router bgp xx"
action 5.3 cli command "no redistribute connected route-map BGP"
action 5.4 cli command "end"
event manager applet PEER-UP
event track 1 state up
action 5.5 cli command "enable"
action 5.6 cli command "conf t"
action 5.7 cli command "router bgp xx"
action 5.8 cli command "redistribute connected route-map BGP"
action 5.9 cli command "end"