01-27-2010 08:27 AM - edited 03-04-2019 07:19 AM
Hello all,
i have a problem with route-map under bgp process.
i have two routers R1 (AS80) and R2(AS100) connected via serial 0/0 192.168.100.1/30
i configured an ebgp peering between the two routers
when i try to advertise some networks from R1 to R2 with route-map to test some BGP features, i have o match in route-map and no effect in the network received by R2
the configuration of R1:
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
no aaa new-model
ip subnet-zero
no ip domain lookup
ip ssh break-string
ip audit notify log
ip audit po max-events 100
no ftp-server write-enable
!
interface Loopback0
ip address 172.17.0.1 255.255.255.255
!
interface Loopback1
ip address 10.10.10.1 255.255.255.0
!
interface Loopback2
ip address 10.10.11.1 255.255.255.0
!
interface Loopback3
ip address 10.10.20.1 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface Serial0/0
ip address 192.168.100.1 255.255.255.252
clockrate 2000000
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial0/1
no ip address
shutdown
clockrate 2000000
!
router bgp 80
no synchronization
bgp router-id 172.17.0.1
bgp log-neighbor-changes
network 10.10.10.0 mask 255.255.255.0 route-map R2-OUT
network 10.10.11.0 mask 255.255.255.0
network 10.10.20.0 mask 255.255.255.0 route-map R2-OUT
neighbor 192.168.100.2 remote-as 100
no auto-summary
!
ip classless
!
ip bgp-community new-format
ip http server
no ip http secure-server
!
!
!
ip prefix-list PL-R2-OUT1 seq 10 permit 10.10.10.0/24
!
ip prefix-list PL-R2-OUT2 seq 10 permit 10.10.20.0/24
!
route-map R2-OUT permit 10
match ip address prefix-list PL-R2-OUT1
set as-path prepend 1000 2000 3000
!
route-map R2-OUT permit 20
match ip address prefix-list PL-R2-OUT2
set as-path prepend 777 888 999
!
route-map R2-OUT permit 1000
!
control-plane
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
R1#sh route-map
route-map R2-OUT, permit, sequence 10
Match clauses:
ip address (access-lists): 10
Set clauses:
as-path prepend 1000 2000 3000
Policy routing matches: 0 packets, 0 bytes
route-map R2-OUT, permit, sequence 20
Match clauses:
ip address prefix-lists: PL-R2-OUT2
Set clauses:
as-path prepend 777 888 999
Policy routing matches: 0 packets, 0 bytes
route-map R2-OUT, permit, sequence 30
Match clauses:
ip address prefix-lists: PL-R2-OUT3
Set clauses:
community 80:300 80:400 additive
Policy routing matches: 0 packets, 0 bytes
route-map R2-OUT, permit, sequence 1000
Match clauses:
Set clauses:
Policy routing matches: 0 packets, 0 bytes
R2#sh ip bgp
BGP table version is 14, local router ID is 172.17.0.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.10.10.0/24 192.168.100.1 0 0 80 i
*> 10.10.11.0/24 192.168.100.1 0 0 80 i
*> 10.10.20.0/24 192.168.100.1 0 0 80 i
it's clear that the route-map doesn't have any effect in the advertisement.
why i have 0 matching in the route-map? is there any issue in the configuration?
Solved! Go to Solution.
01-27-2010 08:54 AM
The route-map must be applied at the neighbor level as the BGP prefix will have its BGP attribute modified as it leaves the router, not during a network advertisement.
Your config should look like:
router bgp 80
no synchronization
bgp router-id 172.17.0.1
bgp log-neighbor-changes
network 10.10.10.0 mask 255.255.255.0
network 10.10.11.0 mask 255.255.255.0
network 10.10.20.0 mask 255.255.255.0
neighbor 192.168.100.2 remote-as 100
neighbor 192.168.100.2 route-map R2-OUT out
no auto-summary
01-27-2010 09:28 AM
A route-map at the network level can be used for anything other than to apply BGP attributes.
For instance, applying a tag to a subnet can be done with a network level route-map.
I rarely use network level route-map because of its limited functionality.
The route-map to use when modifying BGP attributes must be the one at the neighbor level as BGP attributes get modified when entering or exiting the router, not on the router itself.
Regards
Edison.
Please remember to rate helpful posts !
01-27-2010 08:54 AM
The route-map must be applied at the neighbor level as the BGP prefix will have its BGP attribute modified as it leaves the router, not during a network advertisement.
Your config should look like:
router bgp 80
no synchronization
bgp router-id 172.17.0.1
bgp log-neighbor-changes
network 10.10.10.0 mask 255.255.255.0
network 10.10.11.0 mask 255.255.255.0
network 10.10.20.0 mask 255.255.255.0
neighbor 192.168.100.2 remote-as 100
neighbor 192.168.100.2 route-map R2-OUT out
no auto-summary
01-27-2010 09:23 AM
thanks Edison it works
but i would like to know the difference between using route-map at the neighbor level and at the network level and when we use each one?
01-27-2010 09:28 AM
A route-map at the network level can be used for anything other than to apply BGP attributes.
For instance, applying a tag to a subnet can be done with a network level route-map.
I rarely use network level route-map because of its limited functionality.
The route-map to use when modifying BGP attributes must be the one at the neighbor level as BGP attributes get modified when entering or exiting the router, not on the router itself.
Regards
Edison.
Please remember to rate helpful posts !
01-27-2010 09:40 AM
Thanks Edison for the helpful reponse
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