cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
288
Views
0
Helpful
1
Replies

Received Network Breakdown in Routing Table

O_A_H
Level 1
Level 1

I have a network 192.168.1.0/24 that is received from two BGP neighbors. Is there someway to break it down in the routing table to specify high/low metric for specific IPs in this network?

I need to give 192.168.1.10 a low metric on link1 and 192.168.1.20 low metric on link2 so that i make sure i control the routing to 10 via link 1 and 20 via link 2 while the remaining subnet can be via any of the two links.

I tried normal ACL/route-map to match on these specific IPs and set high or low metric but it didn't work. I tried prefix-list also but the same. Any suggestion?

1 Reply 1

Martin Hruby
Level 1
Level 1

Hello Omar

First of all, you somehow need to learn about the two specific prefixes 192.168.1.10/32 and 192.168.1.20/32. From what you wrote I understand that you are only receiving 192.168.1.0/24 via BGP. Try adding two static routes for the specific prefixes on your BGP peer pointing to the Null0 interface (remember IP prefixes must be present in the routing table for BGP to be able to advertise them) and then advertise them via BGP like this:


ip route 192.168.1.10 255.255.255.255 Null0
ip route 192.168.1.20 255.255.255.255 Null0

router bgp 65001
  network 192.168.1.10 mask 255.255.255.255
  network 192.168.1.20 mask 255.255.255.255

On the other side then you will receive two specific /32 prefixes and you can determine which path (link) to use to get to these prefixes by setting e.g. the local preference in a route-map for prefixes received inbound from your BGP peers, for example:

ip prefix-list NET1 permit 192.168.1.10/32
ip prefix-list NET2 permit 192.168.1.20/32

route-map PREFER_LINK1
match ip address prefix-list NET1
set local-pref 110

route-map PREFER_LINK2
match ip address prefix-list NET2
set local-pref 110

router bgp 65002
  neighbor 1.2.3.4 description Over Link 1
  neighbor 1.2.3.4 route-map PREFER_LINK1 in
  neighbor 2.3.4.5 description Over Link 2
  neighbor 2.3.4.5 route-map PREFER_LINK2 in


Best regards,
Martin