cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
504
Views
0
Helpful
6
Replies

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

vodafonegsmart
Level 1
Level 1

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

Jon Marshall
Hall of Fame
Hall of Fame

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

Jon Marshall
Hall of Fame
Hall of Fame

-

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.

 

 

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

mfurnival
Level 4
Level 4

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

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


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card