cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
196
Views
0
Helpful
6
Replies
Highlighted
Beginner

Redistribute a /30 connected route into BGP only when the end device is connected?

Hello,

 

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?

 

 

Thanks

L

6 REPLIES 6
Highlighted
Hall of Fame Guru

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.

Jon

Highlighted
Hall of Fame Guru

-

Highlighted

Hi,

Sorry,

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.

 

 

Highlighted

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 ?

Jon

Highlighted
Enthusiast

What about an EEM script that detects the presence of the remote MAC address and creates a BGP network statement in response?

Highlighted
VIP Mentor

Hello

EEM scripting

Example:

ip sla 10
 icmp-echo x.x.x.x source-IP  x.x.x.x
 timeout 200
 frequency 5
ip sla schedule 10 life forever start-time now

 

track 1 rtr 10 reachability

ip prefix-list BGP seq 5 permit 1.1.1.1/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"

 

res

Paul



kind regards
Paul

Please rate and mark posts accordingly if you have found any of the information provided useful.
It will hopefully assist others with similar issues in the future