07-02-2010 03:13 AM - edited 03-04-2019 08:57 AM
Hi expert,
I would like to announce "ip address 10" to ISP B when the interface EF0/0 is down. Grateful if you could advise how to do it. The trace commands are in the configuration file as below.
Thank you
--- configuration ------
track 1 interface FE0/0 line-protocol
! track 2 interface serial1/1 line-protocol
! track 3 interface serial1/2 line-protocol
track 100 list threshold percentage
object 1
! object 2
! object 3
! object 4
threshold percentage up 80
!
interface FE 0/0
description IPS A (AS1)
ip address 10.10.10.2 255.255.255.0
!
interface FE 0/1
description IPS B (AS3)
ip address 10.10.20.2 255.255.255.0
!
router bgp 10
bgp log-neighbor-changes
network 192.168.16.0 255.255.240.0
neighbor 10.10.10.1 remote-as 1
neighbor 10.10.10.1 route-map ROUTES_TO_ISP_A out
!
neighbor 10.10.20.3 remote-as 3
neighbor 10.10.20.3 route-map ROUTES_TO_ISP_B out
neighbor 10.10.20.3 advertise-map ADVERTISE non-exist-map NON-EXIST
!--- Advertises the routes matched in the route-map ADVERTISE (192.168.16, 192.168.24 and 192.168.28)
!--- only if the routes matched in route-map NON-EXIST (192.168.50.0/24)
!--- do not exist in the BGP table.
!
ip route 192.168.16.0 255.255.240.0 Null0
!
! Route Condition
access-list 65 permit 192.168.50.0 0.0.0.255
!
! announce routes to ISP A only
access-list 10 permit 192.168.16.0 0.0.7.255
access-list 10 permit 192.168.24.0 0.0.3.255
access-list 10 permit 192.168.28.0 0.0.1.255
!
! announce routes to ISP B only
access-list 15 permit 192.168.30.0 0.0.1.255
!
ip as-path access-list 400 deny .*
!
route-map NON-EXIST permit 10
match ip address 65
!
route-map ADVERTISE permit 10
match ip address 10
!
route-map ROUTES_TO_ISP_A permit 10
match ip address 10
!
route-map ROUTES_TO_ISP_A permit 20
match as-path 400
!
route-map ROUTES_TO_ISP_B permit 10
match ip address 15
!
route-map ROUTES_TO_ISP_B permit 20
match as-path 400
!
---- end -----
Solved! Go to Solution.
07-02-2010 10:04 AM
Hi Anita
Try this one ........
interface FE 0/0
description ISP A (AS1)
ip address 10.10.10.2 255.255.255.0
!
interface FE 0/1
description ISP B (AS3)
ip address 10.10.20.2 255.255.255.0
router bgp 10
bgp log-neighbor-changes
neighbor 10.10.10.1 remote-as 1
neighbor 10.10.10.1 route-map ROUTES_TO_ISP_A out
!
neighbor 10.10.20.3 remote-as 3
neighbor 10.10.20.3 route-map ROUTES_TO_ISP_B out
neighbor 10.10.20.3 advertise-map ROUTES_TO_ISP_A non-exist-map NO_ROUTE
-----Advertise to ISP A -------
access-list 10 permit 192.168.16.0 0.0.7.255
access-list 10 permit 192.168.24.0 0.0.3.255
access-list 10 permit 192.168.28.0 0.0.1.255
-----Advertise to ISP B -------
access-list 15 permit 192.168.30.0 0.0.1.255
access-list 20 permit 10.10.10.0 0.0.0.255
route-map ROUTES_TO_ISP_A
match address 10
route-map ROUTES_TO_ISP_B
match address 15
route-map NO_ROUTE
match address 20
Regards
Chetan Kumar
07-02-2010 04:39 AM
Hi,
Your configuration should look lik this:
interface FE 0/0
description IPS A (AS1)
ip address 10.10.10.2 255.255.255.0
!
interface FE 0/1
description IPS B (AS3)
ip address 10.10.20.2 255.255.255.0
!
router bgp 10
bgp log-neighbor-changes
network 192.168.16.0 255.255.240.0
network 10.10.20.0 mask 255.255.255.0
neighbor 10.10.10.1 remote-as 1
neighbor 10.10.10.1 route-map ROUTES_TO_ISP_A out
!
neighbor 10.10.20.3 remote-as 3
neighbor 10.10.20.3 route-map ROUTES_TO_ISP_B out
neighbor 10.10.20.3 advertise-map ADVERTISE non-exist-map NON-EXIST
ip prefix-list advertise permit 10.10.20.0/24
Note:
your route-map (ROUTES_TO_ISP_B) should include Network 10.10.2.0
ip perefix-list NON-EXIST permit 10.10.10.2/24
route-map ADVERTISE
match ip address prefix-list ADVERTISE
route-map NON-EXIST
match ip address prefix-list NON-EXIST
Note:
Your route-map (ROUTES_TO_ISP_B) should include Network 10.10.20.0/24 in another sequence number in order for this network not to be filtered when its being advertised to ISP-B by the route-map.
HTH
Mohamed
07-02-2010 09:12 AM
Dear Mohamed,
My preceding email may be vague. Following is the user requirements:
- 192.168.16.0/21, 192.168.24.0/22, 192.168.28/23 are down stream network behind AS 2. They will be announced to ISP A only
- 192.168.30.0/23 is down stream network behind AS 2. They will be announced to ISP B only
- If ISP A down, the routes 192.168.16.0/21, 192.168.24.0/22, 192.168.28/23 will be announced to ISP B. If ISP A is up again, the routes 192.168.16.0/21, 192.168.24.0/22, 192.168.28/23 will be withdrawn from ISP B and announced to ISP A.
I have revised the config for your comments
Thank you
------ config ------
interface FE 0/0
description ISP A (AS1)
ip address 10.10.10.2 255.255.255.0
!
interface FE 0/1
description ISP B (AS3)
ip address 10.10.20.2 255.255.255.0
!
router bgp 10
bgp log-neighbor-changes
network 192.168.16.0 mask 255.255.240.0
network 10.10.20.0 mask 255.255.255.0
neighbor 10.10.10.1 remote-as 1
neighbor 10.10.10.1 route-map ROUTES_TO_ISP_A out
!
neighbor 10.10.20.3 remote-as 3
neighbor 10.10.20.3 route-map ROUTES_TO_ISP_B out
neighbor 10.10.20.3 advertise-map ADVERTISE non-exist-map NON-EXIST
!--- Advertises the routes matched in the route-map ADVERTISE (192.168.16, 192.168.24 and 192.168.28)
!--- only if the routes matched in route-map NON-EXIST (10.10.10.0/24)
!--- do not exist in the BGP table.
!
ip route 192.168.16.0 255.255.240.0 Null0
!
! Route Condition
ip perefix-list NON-EXIST permit 10.10.10.0/24
! ip prefix-list ADVERTISE permit 10.10.20.0/24
!
! announce routes to ISP A only
access-list 10 permit 192.168.16.0 0.0.7.255
access-list 10 permit 192.168.24.0 0.0.3.255
access-list 10 permit 192.168.28.0 0.0.1.255
!
access-list 20 permit 10.10.10.0 0.0.0.255
!
! announce routes to ISP B only
access-list 15 permit 192.168.30.0 0.0.1.255
!
access-list 25 permit 10.10.20.0 0.0.0.255
!
ip as-path access-list 400 deny .*
!
!
route-map ADVERTISE
! match ip address prefix-list ADVERTISE
match ip address 10
!
route-map NON-EXIST
match ip address prefix-list NON-EXIST
!
route-map ROUTES_TO_ISP_A permit 10
match ip address 10 20
!
!
route-map ROUTES_TO_ISP_A permit 20
match as-path 400
!
route-map ROUTES_TO_ISP_B permit 10
match ip address 15 25
!
route-map ROUTES_TO_ISP_B permit 20
match as-path 400
!
---- end -----
07-02-2010 10:04 AM
Hi Anita
Try this one ........
interface FE 0/0
description ISP A (AS1)
ip address 10.10.10.2 255.255.255.0
!
interface FE 0/1
description ISP B (AS3)
ip address 10.10.20.2 255.255.255.0
router bgp 10
bgp log-neighbor-changes
neighbor 10.10.10.1 remote-as 1
neighbor 10.10.10.1 route-map ROUTES_TO_ISP_A out
!
neighbor 10.10.20.3 remote-as 3
neighbor 10.10.20.3 route-map ROUTES_TO_ISP_B out
neighbor 10.10.20.3 advertise-map ROUTES_TO_ISP_A non-exist-map NO_ROUTE
-----Advertise to ISP A -------
access-list 10 permit 192.168.16.0 0.0.7.255
access-list 10 permit 192.168.24.0 0.0.3.255
access-list 10 permit 192.168.28.0 0.0.1.255
-----Advertise to ISP B -------
access-list 15 permit 192.168.30.0 0.0.1.255
access-list 20 permit 10.10.10.0 0.0.0.255
route-map ROUTES_TO_ISP_A
match address 10
route-map ROUTES_TO_ISP_B
match address 15
route-map NO_ROUTE
match address 20
Regards
Chetan Kumar
07-02-2010 08:32 PM
Hi Chetan Kumar,
One more question, if the FE 0/0 is down, the route (direct connect) 10.10.10.0/24 will be withdrawn from the routing table. Is it correct?
rdgs
07-06-2010 11:49 AM
Hi Anita
Yes , If you physical interface goes down then you won't see the route in routing table.
Regards
Chetan Kumar
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: