Dynamic routing protocols: BGP, OSPF, RIP
U
SER
G
UIDE
220
BGP with two neighbors
It is possible to configure two neighbours in order to manage
redundancy situation
or
load-
balancing
15
scenarios.
In the first case a higher local-preference must be assigned to the master router:
set bgp local-as 3269
set bgp neighbor 88.58.10.246 activate
set bgp neighbor 88.58.10.246 advertisement-interval 5
set bgp neighbor 88.58.10.246 default-originate
set bgp neighbor 88.58.10.246 fall-over bfd
16
set bgp neighbor 88.58.10.246 remote-as 65201
set bgp neighbor 88.58.10.246 route-map From-A in
set bgp neighbor 88.58.10.246 soft-reconfiguration inbound
set bgp neighbor 88.58.10.246 timers 60 180
set bgp neighbor 88.58.10.246 version 4
set bgp neighbor 94.92.113.170 activate
set bgp neighbor 94.92.113.170 advertisement-interval 5
set bgp neighbor 94.92.113.170 default-originate
set bgp neighbor 94.92.113.170 remote-as 65201
set bgp neighbor 94.92.113.170 route-map From-B in
set bgp neighbor 94.92.113.170 soft-reconfiguration inbound
set bgp neighbor 94.92.113.170 timers 60 180
set bgp neighbor 94.92.113.170 version 4
set bgp network 10.10.0.0/16
set bgp network 10.1.10.0/24 route-map LAN-CED
set bgp network 10.8.0.0/24 route-map LAN-CED
set bgp network 7.0.255.1/32 route-map LAN-CED
set bgp network 7.0.255.2/32 route-map LAN-CED
set bgp route-map From-A permit 10 set local-preference 150
set bgp route-map From-B permit 10 set local-preference 140
set bgp route-map LAN-CED permit 10 set as-path prepend 3269 65210
set bgp on
Routes towards remote networks pass through
router A:
:
root@IMOLA>
show ip route bgp
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
I - ISIS, B - BGP, > - selected route, * - FIB route
B>* 10.45.15.192/27 [20/1] via 88.58.10.246, tun0, 00:01:01
B>* 44.44.0.0/16 [20/0] via 88.58.10.246, tun0, 00:01:01
B>* 55.55.0.0/16 [20/0] via 88.58.10.246, tun0, 00:01:01
B>* 172.20.1.219/32 [20/20] via 88.58.10.246, tun0, 00:01:01
15
-
Load Balancing funcionality is available from software version 2.3.0-8.
16
-
Version 2.3.0-8 includes functionality of checking neighbor through BFD protocol (Bidirectional Forwarding Detection)