10-05-2012 12:58 AM - edited 03-04-2019 05:45 PM
Hi All,
I want to go for ISP level redundancy, with Dual internal Internet routers. Public IP range is of /23. I want BGP announcement of my discrete address block (e.g. /24) to their peers, in addition to the entire aggregated prefix (e.g. /23).
However I have only 2800 series routers with RAM of 768 MB (512+256).
Can you please suggest how should I proceed?
Thanks
Jagdev
Solved! Go to Solution.
10-08-2012 07:46 AM
Hello Jagdev,
You need to use a route-map applied outbound to eBGP neighbor to perform AS path prepending in a selective way
The route-map is ISP specific
border router 1:
ip prefix-list SECOND-ROUTE 4.4.5.0/24
route-map toISP1 permit 10
match ip address prefix SECOND-ROUTE
set as-path prepend 100 100 100
route-map toISP1 permit 20
match ip address prefix IP_OUT
router bgp 100
no neigh 1.1.1.1 prefix-list IP_OUT out
neigh 1.1.1.1 route-map toISP2 out
In the same way for border router 2:
ip prefix-list FIRST-ROUTE 4.4.4.0/24
route-map toISP2 permit 10
match ip address prefix FIRST-ROUTE
set as-path prepend 100 100 100
route-map toISP2 permit 20
match ip address prefix IP_OUT
router bgp 100
no neigh 2.2.2.2 prefix-list IP_OUT out
neigh 2.2.2.2 route-map toISP2 out
Hope to help
Giuseppe
10-05-2012 01:16 AM
If you don't need to receive the complete BGP routes from the ISPs, then it is ok. You can request ISPs to advertise only defult-route to your BGP neighbors. Also make sure that you put a filter to accept only default-route from the ISPs
10-08-2012 05:04 AM
Please let know if the below config is good for my requirement
! Router 1:
!
autonomous-system 100
!
!
ip route 4.4.4.0 255.255.254.0 Null0 200
!
ip prefix-list IP_OUT seq 10 permit 4.4.4.0/23
!
ip prefix-list DEFAULT_ROUTE_IN seq 10 permit 0.0.0.0/0
!
router bgp 100
no synchronization
bgp log-neighbor-changes
bgp dampening
network 4.4.4.0 255.255.254.0
! define BGP session with ISP-1
neighbor 1.1.1.1 remote-as 200
neighbor 1.1.1.1 description BGP Transit to ISP-1
neighbor 1.1.1.1 timers 10 30
neighbor 1.1.1.1 version 4
neighbor 1.1.1.1 send-community
neighbor 1.1.1.1 soft-reconfiguration inbound
neighbor 1.1.1.1 prefix-list DEFAULT_ROUTE_IN in
neighbor 1.1.1.1 prefix-list IP_OUT out
neighbor 1.1.1.1 maximum-prefix 10
!
! define iBGP session
neighbor 4.4.4.2 remote-as 100
neighbor 4.4.4.2 description iBGP to Router2
neighbor 4.4.4.2 version 4
neighbor 4.4.4.2 send-community
neighbor 4.4.4.2 soft-reconfiguration inbound
neighbor 4.4.4.2 update-source Loopback0
!
end
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Router 2
!
autonomous-system 100
!
!
ip route 4.4.4.0 255.255.254.0 Null0 200
!
ip prefix-list IP_OUT seq 10 permit 4.4.4.0/23
!
ip prefix-list DEFAULT_ROUTE_IN seq 10 permit 0.0.0.0/0
!
router bgp 100
no synchronization
bgp log-neighbor-changes
bgp dampening
network 4.4.4.0 255.255.254.0
! define BGP session with ISP-2
neighbor 2.2.2.1 remote-as 300
neighbor 2.2.2.1 description BGP Transit to ISP-2
neighbor 1.1.1.1 timers 10 30
neighbor 2.2.2.1 version 4
neighbor 2.2.2.1 send-community
neighbor 2.2.2.1 soft-reconfiguration inbound
neighbor 2.2.2.1 prefix-list DEFAULT_ROUTE_IN in
neighbor 2.2.2.1 prefix-list IP_OUT out
neighbor 2.2.2.1 maximum-prefix 10
!
! define iBGP session
neighbor 4.4.4.1 remote-as 100
neighbor 4.4.4.1 description iBGP to Router1
neighbor 4.4.4.1 version 4
neighbor 4.4.4.1 send-community
neighbor 4.4.4.1 soft-reconfiguration inbound
neighbor 4.4.4.1 update-source Loopback0
!
end
10-08-2012 06:28 AM
Hello Jagdev,
your proposed configuration is fine, but you are only advertising the aggregate /23 and not the two component routes /24.
Also each router will advertise the /23 even if the link to the internal network is broken as you have a static route to null0. This provides stability of the prefix, but the price is that the aggregate is advertised even if the border router is isolated from the internal network. Having two border routers this can be less desirable.
In order to announce component routes and the aggregate you can do the following
router bgp 100
no network 4.4.4.0 255.255.254.0
network 4.4.4.0 255.255.255.0
network 4.4.5.0 255.255.255.0
aggregate-address 4.4.4.0 255.255.254.0
and you need to change the outbound prefix-list
ip prefix-list IP_OUT seq 10 permit 4.4.4.0/23 le 24
Note that if you want later to manipulate BGP path attributes (like doing selective AS path prepending) for each /24 component route it would be better to use a route-map in outbound instead of invoking the prefix-llst directly.
In this way all the changes can be done to the route-map and you can implement whatever policy you need.
Hope to help
Giuseppe
10-08-2012 07:33 AM
Thanks Giuseppe,
I want to publish one network network 4.4.4.0 255.255.255.0 would have primary link over ISP-1 (router1) and other network
4.4.5.0 255.255.255.0 would have primary link over ISP-2 (router2). In case one link goes down my netwrok should be reachable via other. What config changes i need to achive this?
Jagdev
10-08-2012 07:46 AM
Hello Jagdev,
You need to use a route-map applied outbound to eBGP neighbor to perform AS path prepending in a selective way
The route-map is ISP specific
border router 1:
ip prefix-list SECOND-ROUTE 4.4.5.0/24
route-map toISP1 permit 10
match ip address prefix SECOND-ROUTE
set as-path prepend 100 100 100
route-map toISP1 permit 20
match ip address prefix IP_OUT
router bgp 100
no neigh 1.1.1.1 prefix-list IP_OUT out
neigh 1.1.1.1 route-map toISP2 out
In the same way for border router 2:
ip prefix-list FIRST-ROUTE 4.4.4.0/24
route-map toISP2 permit 10
match ip address prefix FIRST-ROUTE
set as-path prepend 100 100 100
route-map toISP2 permit 20
match ip address prefix IP_OUT
router bgp 100
no neigh 2.2.2.2 prefix-list IP_OUT out
neigh 2.2.2.2 route-map toISP2 out
Hope to help
Giuseppe
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide