BGP Advertised Routes two Peering
Dear all
I have issue with BGP behaviour. I have two BGP peering; from both I receive default route, but one of them,
AS 65472 is primary so I setup local preference in 200; it is because I want to use AS 65472 as internet
provider. The another one, AS 65472 is used as secundary internet access, but for internal network (private) is
used as primary. The issue is when try ping from LAN, can not reach internal network, seems to be that
becuase Local preference is setup within AS65472 and the packet try to go thru AS 65472 because local prefeence 200,
but I need that internal network go thru AS 65471.
I am sure that I am advertising network as I expect, but when is running BGP for both peering, it fails.
Here are go output for this situation:
7204VXR-SCT#sh ip bgp neighbors 172.16.40.37 received-routes
Network Next Hop Metric LocPrf Weight Path
* i0.0.0.0 172.16.40.37 0 100 0 i
Total number of prefixes 1
7204VXR-SCT#sh ip bgp neighbors 172.16.40.37 advertised-routes
Network Next Hop Metric LocPrf Weight Path
*> 10.10.200.0/30 0.0.0.0 0 32768 i
*> 10.30.24.0/21 172.16.40.4 0 32768 i
*> 172.16.17.0/24 172.16.40.5 0 32768 i
*> 172.16.211.0/24 0.0.0.0 0 32768 i
*> 172.18.56.16/29 0.0.0.0 0 32768 i
*> 172.30.100.18/32 0.0.0.0 0 32768 i
*> 172.31.0.20/30 0.0.0.0 0 32768 i
7204VXR-SCT#sh ip bgp neighbors 190.97.254.241 received-routes
Network Next Hop Metric LocPrf Weight Path
* 0.0.0.0 190.97.254.241 0 65472 i
Total number of prefixes 1
Network Next Hop Metric LocPrf Weight Path
*> 190.153.116.0/22 172.16.40.4 0 32768 i
*> 190.153.120.0/22 172.16.40.4 0 32768 i
*> 190.153.124.0/24 172.16.40.37 10 32768 i
router bgp 65471
bgp log-neighbor-changes
neighbor externalBGP peer-group
neighbor externalBGP remote-as 65472
neighbor externalBGP version 4
neighbor internalBGP-SCT peer-group
neighbor internalBGP-SCT remote-as 65471
neighbor internalBGP-SCT version 4
neighbor 172.16.40.37 peer-group internalBGP-SCT
neighbor 190.97.254.241 peer-group viginet
address-family ipv4
neighbor externalBGPsoft-reconfiguration inbound
neighbor externalBGProute-map viginet-in in
neighbor externalBGProute-map viginet-out out
neighbor internalBGP-SCT soft-reconfiguration inbound
neighbor internalBGP-SCT route-map internalBGP-SCT-out out
neighbor 172.16.40.37 activate
neighbor 190.97.254.241 activate
no auto-summary
no synchronization
network 10.10.200.0 mask 255.255.255.252
network 10.30.24.0 mask 255.255.248.0
network 172.16.17.0 mask 255.255.255.0
network 172.16.40.0 mask 255.255.255.0
network 172.16.211.0 mask 255.255.255.0
network 172.18.56.16 mask 255.255.255.248
network 172.30.100.18 mask 255.255.255.255
network 172.31.0.20 mask 255.255.255.252
network 190.153.116.0 mask 255.255.252.0
network 190.153.120.0 mask 255.255.252.0
network 190.153.124.0 mask 255.255.255.0
exit-address-family
ip route 172.16.40.36 255.255.255.252 Null0 250
ip route 190.153.116.0 255.255.252.0 172.16.40.4
ip route 190.153.120.0 255.255.252.0 172.16.40.4
ip prefix-list invalidas seq 10 permit 172.16.40.0/24
ip prefix-list invalidas seq 15 permit 10.30.24.0/21
ip prefix-list invalidas seq 20 permit 172.16.211.0/24
ip prefix-list invalidas seq 25 permit 172.18.56.16/29
ip prefix-list invalidas seq 30 permit 172.30.100.18/32
ip prefix-list invalidas seq 35 permit 10.10.200.0/30
ip prefix-list invalidas seq 40 permit 172.16.17.0/24
ip prefix-list invalidas seq 45 permit 172.31.0.20/30
ip access-list standard viginet-100
permit 190.153.116.0 0.0.3.255
permit 190.153.120.0 0.0.3.255
permit 190.153.124.0 0.0.0.255
route-map externalBGP-out permit 10
match ip address viginet-100
route-map externalBGP-in permit 10
set local-preference 200
route-map internalBGP-SCT-out permit 10
match ip address prefix-list invalidas
Hello.
If you want your internal network to go through peer 65471 (to 0.0.0.0/0), then why do you need AS 65472?
Could you please provide "show ip bgp 0.0.0.0/0"?
Similar Messages
-
Hi All,
Is it possible to find since how long a route being advertised to BGP neighbor?
To elaborate, if EBGP neighbors are up since 24 hours and among 10 routes advertised, at receiving router, 5 routes show the uptime as 12 hours, whereas other 5 routes show the uptime as 24 hours.
All 10 routes were present in advertising router's routing table for more than 24 hours.
Regards,
NagabhushanHi,
when you issue on the advertising router
sh ip route x.x.x.x
for one particular prefix among those showing the uptime as 12 hours on the other router, do you see any " Last update from ... xxx ago"?
That should show you the last time the routing was changed on the advertising router (and BGP should have advertised the change that time).
Best regards,
Milan -
TOC-BP-SWa#sh ip bgp neighbors 10.14.0.3 advertised-routes
BGP table version is 1674320, local router ID is 10.14.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.14.0.1/32 0.0.0.0 0 32768 i
*> 147.249.37.0/24 172.20.18.1 120 0 2001 65015 65016 64823 7381 64681 i
*> 147.249.38.0/24 172.20.18.1 120 0 2001 65015 65016 64823 7381 64681 i
*> 147.249.46.0/24 172.20.18.1 120 0 2001 65015 65016 64823 7381 12159 12159 i
*> 147.249.196.0/24 172.20.18.1 120 0 2001 65015 65016 64823 64870 65124 i
*> 147.249.237.0/24 172.20.18.1 120 0 2001 65015 65016 64823 7381 64681 i
TOC-BP-SWa#sh ip bgp neighbors 10.14.0.3 received-r
Total number of prefixes 0
TOC-BP-SWa#sh ip bgp neighbors 10.14.0.2 received-r
BGP table version is 1674320, local router ID is 10.14.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*>i10.14.0.2/32 10.14.0.2 0 100 0 i
* i147.249.37.0/24 10.14.0.2 0 120 0 2001 65015 65016 64823 7381 64681 i
* i147.249.38.0/24 10.14.0.2 0 120 0 2001 65015 65016 64823 7381 64681 i
* i147.249.46.0/24 10.14.0.2 0 120 0 2001 65015 65016 64823 7381 12159 12159 i
* i147.249.196.0/24 10.14.0.2 0 120 0 2001 65015 65016 64823 64870 65124 i
* i147.249.237.0/24 10.14.0.2 0 120 0 2001 65015 65016 64823 7381 64681 i
Can this output be duplicated with an OSPF command?Not really because OSPF does not advertise routes it sends LSAs to it's peers.
So you need to look at the OSPF database ie. -
"sh ip ospf database"
which will show you all the LSAs the router is aware of.
In terms of all the LSAs the router has received it will show all of those but it will also show you LSAs that were generated by the router itself although the advertising router IP will point to that being the case.
In terms of all the LSAs the router advertises again it depends on the area and how that has been configured.
So for example an ABR might well have external LSAs (which aren't tied to any area in the OSPF database) but that doesn't necessarily mean it is advertising them to peers within an area as it could have been configured not to.
So it gives you a good idea but you need to also work out a few things for yourself as well.
Jon -
Sh bgp: received & advertised routes
Dear all:
In reference at the commands:
- sh bgp neighbor A.B.C.D
- sh bgp neighbor A.B.C.D received routes
- sh bgp neighbor A.B.C.D advertised-routes
For example:
ROUTER#sh bgp neighbor A.B.C.D
Policy for incoming advertisements is PEERING-IN
Policy for outgoing advertisements is PEERING-OUT
1 accepted prefixes, 0 are bestpaths
Cumulative no. of prefixes denied: 8974070.
No policy: 0, Failed RT match: 0
By ORF policy: 0, By policy: 8974070
Prefix advertised 77, suppressed 0, withdrawn 2
In output this command we have # Prefixes:
1 accepted & 0 are bestpaths (after policy)
advertised 77, suppressed 0, withdrawn 2 (after policy)
8974070 prefix are deny
But, when you execute the next command:
ROUTER#sh bgp neighbor A.B.C.D received routes
Processed 503233 prefixes, 503233 paths
In output this command we have# Prefixes = 503233
And when you execute the next command:
ROUTER#sh bgp neighbor A.B.C.D advertised-routes
Processed 73 prefixes, 73 paths
In output this command we have:
73 prefixes advertised at peer
The question is:
What's the different between counter 8974070 and 503233 (prefix received before apply policy)?
What's the different between counter 77 (or 75 = 77 - 2 withdrawn) and 73 (prefix advertised before apply policy)?
Exist only one command that help at see total prefix received/advertised (different a sh bgp neighbor A.B.C.D received routes) ?
Thanks.Not really because OSPF does not advertise routes it sends LSAs to it's peers.
So you need to look at the OSPF database ie. -
"sh ip ospf database"
which will show you all the LSAs the router is aware of.
In terms of all the LSAs the router has received it will show all of those but it will also show you LSAs that were generated by the router itself although the advertising router IP will point to that being the case.
In terms of all the LSAs the router advertises again it depends on the area and how that has been configured.
So for example an ABR might well have external LSAs (which aren't tied to any area in the OSPF database) but that doesn't necessarily mean it is advertising them to peers within an area as it could have been configured not to.
So it gives you a good idea but you need to also work out a few things for yourself as well.
Jon -
I have two routers with BGP configured:
C2921:
router bgp 65014
bgp router-id 192.168.54.190
bgp log-neighbor-change
neighbor 192.168.54.150 remote-as 65011
neighbor 192.168.54.150 description Loud backup
neighbor 192.168.54.150 route-map Backup out
C1841:
router bgp 65011
no synchronization
bgp router-id 10.10.35.1
bgp log-neighbor-changes
neighbor 192.168.54.149 remote-as 65014
neighbor 192.168.54.149 description Cubus backup
neighbor 192.168.54.149 prefix-list Loudenia out
neighbor 192.168.54.149 route-map Backup out
ip prefix-list Loudenia seq 5 permit 10.10.35.0/24 le 32
ip prefix-list Loudenia seq 10 permit 192.168.111.0/24 le 32
ip prefix-list Loudenia seq 15 permit 10.25.15.0/24 le 32
ip prefix-list Loudenia seq 20 permit 192.168.44.0/24 le 32
ip prefix-list Loudenia seq 25 permit 192.168.45.0/24 le 32
ip prefix-list Loudenia seq 30 permit 192.168.46.0/28 le 32
ip prefix-list Loudenia seq 35 permit 192.168.49.196/30 le 32
ip prefix-list Loudenia seq 40 permit 192.168.49.225/32
ip prefix-list Loudenia seq 45 permit 192.168.49.229/32
route-map Backup permit 10
set as-path prepend 65011 65011
I have added:
ip prefix-list Loudenia seq 50 permit 192.168.48.225/32
made:
clear ip bgp 192.168.54.149 soft
but nothing changed route to 192.168.48.225 not advertised:
C1841-Loudenia#show ip bgp neighbors 192.168.54.149 advertised-routes
BGP table version is 137998, local router ID is 10.10.35.1
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.35.0/24 0.0.0.0 0 32768 i
*> 10.25.15.0/24 192.168.111.10 0 32768 i
*> 192.168.44.0 192.168.49.26 0 65005 i
*> 192.168.45.0 192.168.49.26 0 65005 i
*> 192.168.46.0/28 192.168.49.26 0 65005 i
*> 192.168.49.196/30
192.168.49.26 0 65005 i
*> 192.168.49.225/32
192.168.49.26 0 0 65005 i
*> 192.168.49.229/32
192.168.49.26 0 65005 i
*> 192.168.111.0 0.0.0.0 0 32768 i
C1841 knows 192.168.48.225/32 via bgp
* 192.168.48.225/32
192.168.49.58 0 65005 65005 65005 65006 65013 i
*> 192.168.49.26 0 65005 65006 65013 i
I will be grateful for your adviceHello, thanks for reply.
The route is on the route table
C1841-Loudenia#show ip route | i 192.168.48.225
B 192.168.48.225/32 [20/0] via 192.168.49.26, 3w6d
C1841-Loudenia#show ip bgp | i 192.168.48.225
* 192.168.48.225/32
192.168.49.58 0 65005 65005 65005 65006 65013 i
*> 192.168.49.26 0 65005 65006 65013 i -
BGP default route advertisement - change preference
hi guys,
I would appreciate some assistance here. We have a primary head office & a DR site. Routers at both sites connect to our carrier for an IP VPN service using BGP. BGP configs on each router advertise a default route 0.0.0.0.
#sh ip bgp neighbors x.x.x.x advertised-routes
BGP table version is 358, local router ID is x.x.x.x
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Originating default network 0.0.0.0
Issue is, some of our remote sites prefer the DR router path for traffic destined to internet.
We are advertising multiple default routes to our carrier, and based on feedback from carrier, route with lowest MED is preferred.
This brings me to what i need to change from my side. Need to change the route preference so that from our remote offices, only the route to head office is preferred with DR site the least preferred route. I know there are multliple ways of doing this, however keen to get input from the experts out there.
DR site router has this BGP config currently applied:
router bgp XXXXX
bgp log-neighbor-changes
redistribute connected
redistribute ospf 1 match internal external 1 external 2
neighbor x.x.x.x remote-as XXXX
neighbor x.x.x.x default-originate
neighbor x.x.x.x soft-reconfiguration inbound
neighbor x.x.x.x route-map IMPORT-POLICY in
neighbor x.x.x.x route-map OPI-route-advertisement out
default-information originate
Removing the "neighbor x.x.x.x default-originate" is not an option, as we need to have the ability to failover to DR at any point.
Thanks in advance & if you need any further info pls advise.
RamaHi Milan,
Thanks. Answers below:
Does it provide an MPLS backbone to you? YES
Are you using the same AS number on all your sites or different ones? Same AS
Any way, what about advertising the default route from your DR site with the site AS number prepended several times (5 times, e.g.)? That's the thing I am struggling to understand as the route-map OPI-route-advertisement already has it prepended 2 times. Shouldn't that be enough to influence which route is least preferred?
route-map OPI-route-advertisement permit 20
match ip address prefix-list xxx default-route
set as-path prepend XXXXX XXXXX
If your provider would permit that and hasn't configured his routers to ignore the AS_PATH length (as him a question), it should make the default route advertised from your DR less preferred within your backbone. Will ask.
Given this, any other thoughts/questions?
Thanks, Rama -
BGP Outbound Route-Map Question
Hi Experts,
Just need your help again. I was trying to do some lab and I came across this weird behaviour with BGP outbound route-map. The diagram is simple.
Please see attached diagram. Sorry for the very poor illustration. R6 has iBGP peering to both R4 and R1. Both R1 and R4 have eBGP peering to R5. No IGP running on any routers as well to keep things simple. There are 2 things to do.
* Create a static route for 160.1.0.0/16 pointing to Null0 on both R1 and R4 and advertise to BGP via network statement but only R5 should be able to see the 160.1.0.0/16 route. R6 should not receive it.
* Advertise R5's /32 loopback interface to BGP but ensure R6 to have that route in its routing table. Don't use next-hop-self on both R1 and R4. Don't advertise WAN link via network command.
I'll just illustrate R4 and R6 here to keep things straight forward.
R4#sh ip bgp
BGP table version is 5, local router ID is 150.1.4.4
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
*> 150.1.5.5/32 155.1.45.5 0 0 100 i
*> 160.1.0.0 0.0.0.0 0 32768 i
R6#sh ip bgp
BGP table version is 11, local router ID is 150.1.6.6
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
* i150.1.5.5/32 155.1.45.5 0 100 0 100 i
* i 155.1.0.5 0 100 0 100 i
The first task was achieved as the 160.0.0.0/16 route is not present in R6's table. I used these commands in R4.
router bgp 65000
no synchronization
bgp log-neighbor-changes
network 160.1.0.0
neighbor 155.1.45.5 remote-as 100
neighbor 155.1.146.6 remote-as 65000
neighbor 155.1.146.6 route-map R6_OUT out
no auto-summary
route-map R6_OUT deny 5
match ip address prefix-list AGGR
route-map R6_OUT permit 1000
ip prefix-list AGGR seq 5 permit 160.1.0.0/16
So with the configuration above, it is clear that R4 is hitting route-map line 5 to deny 160.1.0.0/16 being advertised to R6. I tried to remove line 5 to validate as well if the /16 route will be advertised to R6 and it did so route-map configuration above is confirmed working.
Next, advertise loopback 0 of R5 to R6 and make sure it is a valid route in BGP table without the use of next-hop-self or WAN advertisement.
I used the following configuration.
ip prefix-list R5_LINK seq 5 permit 155.1.45.5/32
route-map R6_OUT permit 10
match ip route-source R5_LINK
set ip next-hop 155.1.146.4
I inserted line 10 in between route-map 5 and 1000. So R4 would check its route table for routes with 155.1.45.5 as route-source then advertise it to R6 with next-hop address of 155.1.146.4. It worked!
R6#sh ip bgp
BGP table version is 15, local router ID is 150.1.6.6
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
*>i150.1.5.5/32 155.1.146.4 0 100 0 100 i
* i 155.1.0.5 0 100 0 100 i
*>i160.1.0.0 155.1.146.4 0 100 0 i
As you can see above, 150.1.5.5 route is now a valid BGP route but surprisingly, the 160.1.0.0/16 route is there! From what I have seen, BGP skipped line 5 and started at 10. Even if I insert the same rule as line 5 and make it as line 15, it's not working. The /16 route is still being advertised. If I remove the match ip route-source clause in sequence 10 then it will withdraw the 160.1.0.0/16 route again. Looks like "match ip route-source" is not very friendly with direct filtering to BGP neighbors but I saw this being used with BGP inject-map and it worked well.
R4#sh route-map
route-map R6_OUT, deny, sequence 5
Match clauses:
ip address prefix-lists: AGGR
Set clauses:
Policy routing matches: 0 packets, 0 bytes
route-map R6_OUT, permit, sequence 10
Match clauses:
ip route-source (access-lists): R5_LINK
Set clauses:
ip next-hop 155.1.146.4
Policy routing matches: 0 packets, 0 bytes
route-map R6_OUT, permit, sequence 1000
Match clauses:
Set clauses:
Policy routing matches: 0 packets, 0 bytes
Any thoughts why this is happening?
Thanks in advance.Hi John,
I did a small lab to test feature "match ip route-source" and it is working fine. Please check below config and output.
R4 does not have 172.16.16.0/24 and also routes for which next-hop is not 1.1.1.1. In case you still facing issue, please share output of "debug ip bgp updates out"
Topology
R1--ebgp--R3---ibgp---R4
R3#show ip b su | b Nei
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
1.1.1.1 4 100 34 36 29 0 0 00:27:37 7
4.4.4.4 4 300 9 12 29 0 0 00:04:12 0
R3#
R3#sh route-map TO-R4
route-map TO-R4, deny, sequence 10
Match clauses:
ip address prefix-lists: DENY-PREFIX
Set clauses:
Policy routing matches: 0 packets, 0 bytes
route-map TO-R4, permit, sequence 20
Match clauses:
ip route-source (access-lists): 20
Set clauses:
Policy routing matches: 0 packets, 0 bytes
R3#
R3#show ip prefix-list DENY-PREFIX
ip prefix-list DENY-PREFIX: 1 entries
seq 5 permit 172.16.16.0/24
R3#
R3#sh ip access-lists 20
Standard IP access list 20
20 permit 1.1.1.1 (25 matches)
R3#
R3#show ip b
BGP table version is 29, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* 172.16.8.0/22 1.1.1.1 0 0 100 i
*> 172.31.13.1 20 32768 i
*> 172.16.16.0/24 1.1.1.1 0 0 100 i
*> 172.16.17.0/24 1.1.1.1 0 0 100 i
*> 172.16.19.0/24 1.1.1.1 0 0 100 i
*> 172.16.20.0/22 1.1.1.1 0 0 100 i
* 172.16.24.0/30 1.1.1.1 0 0 100 i
*> 172.31.13.1 20 32768 i
*> 172.16.80.0/22 1.1.1.1 0 0 100 i
R3#
R4#show ip b
BGP table version is 53, local router ID is 4.4.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
r>i172.16.17.0/24 1.1.1.1 0 100 0 100 i
r>i172.16.19.0/24 1.1.1.1 0 100 0 100 i
r>i172.16.20.0/22 1.1.1.1 0 100 0 100 i
*>i172.16.80.0/22 1.1.1.1 0 100 0 100 i
R4#
--Pls dont forget to rate helpful posts--
Regards,
Akash -
BGP Community | Route-Map | Local Pref
While labbing today I've ran into some strange behavior with BGP communities/route-map processing. Basically the objective was from R9, send a community for the 172.30.79.0/27 route out to R7 to 65100:90 AND send a community for the 172.30.89.0/27 route out to R8 to 65100:110. Then on R9 match community 65100:90 and set the local-pref to 90 and 65100:110 to local-pref of 110. Should be easy enough but the behavior that i'm seeing is that all is working on R7 but not on R8. The R8 inbound route-map is watching the community but not setting the local-pref for some reason... Any ideas? See below.
Topology
##R9’s BGP/Route-map config setting communities for the two routes out to R7 & R8##
R9#sh run | s bgp|route-map
router bgp 65100
network 172.30.79.0 mask 255.255.255.224
network 172.30.89.0 mask 255.255.255.224
network 192.122.3.9 mask 255.255.255.255
neighbor 172.30.79.7 remote-as 65006
neighbor 172.30.79.7 send-community both
neighbor 172.30.79.7 route-map R7-OUT out
neighbor 172.30.89.8 remote-as 65006
neighbor 172.30.89.8 send-community both
neighbor 172.30.89.8 route-map R8-OUT out
ip bgp-community new-format
route-map R7-OUT permit 10
match ip address prefix-list 172.30.79.0/27
set community 65100:90
route-map R7-OUT permit 20
route-map R8-OUT permit 10
match ip address prefix-list 172.30.89.0/27
set community 65100:110
route-map R8-OUT permit 20
##R7’s config##
R7#sh run | s bgp|route-map
router bgp 65006
address-family ipv4 vrf VPN
neighbor 172.30.79.9 remote-as 65100
neighbor 172.30.79.9 activate
neighbor 172.30.79.9 send-community both
neighbor 172.30.79.9 as-override
neighbor 172.30.79.9 route-map R9-IN in
route-map R9-IN permit 10
match community 65100:90
set local-preference 90
route-map R9-IN permit 20
##R7’s ‘show bgp’##
R7#sh ip bgp vpnv4 vrf VPN | b Network
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 65066:700 (default for vrf VPN)
r> 172.30.79.0/27 172.30.79.9 90 0 65100 i
*> 172.30.89.0/27 172.30.79.9 0 0 65100 i
*> 192.122.3.9/32 172.30.79.9 0 0 65100 i
##R8’s config##
router bgp 65006
address-family ipv4 vrf VPN
neighbor 172.30.89.9 remote-as 65100
neighbor 172.30.89.9 activate
neighbor 172.30.89.9 send-community both
neighbor 172.30.89.9 as-override
neighbor 172.30.89.9 route-map R9-INv2 in
route-map R9-INv2 permit 10
match community 65100:110
set local-preference 110
route-map R9-INv2 permit 20
##R8’s ‘show bgp’##
R8#sh ip bgp vpnv4 vrf VPN | b Network
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 65006:800 (default for vrf VPN)
*> 172.30.79.0/27 172.30.89.9 0 0 65100 i
r> 172.30.89.0/27 172.30.89.9 0 0 65100 i
*> 192.122.3.9/32 172.30.89.9 0 0 65100 i
R8#sh ip bgp vpnv4 vrf VPN community | b Network
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 65006:800 (default for vrf VPN)
r> 172.30.89.0/27 172.30.89.9 0 0 65100 i
R8#sh ip bgp vpnv4 vrf VPN 172.30.89.0/27
BGP routing table entry for 65006:800:172.30.89.0/27, version 77
Paths: (1 available, best #1, table VPN, RIB-failure(17))
Not advertised to any peer
Refresh Epoch 2
65100
172.30.89.9 from 172.30.89.9 (192.122.3.9)
Origin IGP, metric 0, localpref 100, valid, external, best
Community: 65100:110
Extended Community: RT:910:910
mpls labels in/out 45/nolabel
rx pathid: 0, tx pathid: 0x0While labbing today I've ran into some strange behavior with BGP communities/route-map processing. Basically the objective was from R9, send a community for the 172.30.79.0/27 route out to R7 to 65100:90 AND send a community for the 172.30.89.0/27 route out to R8 to 65100:110. Then on R9 match community 65100:90 and set the local-pref to 90 and 65100:110 to local-pref of 110. Should be easy enough but the behavior that i'm seeing is that all is working on R7 but not on R8. The R8 inbound route-map is watching the community but not setting the local-pref for some reason... Any ideas? See below.
Topology
##R9’s BGP/Route-map config setting communities for the two routes out to R7 & R8##
R9#sh run | s bgp|route-map
router bgp 65100
network 172.30.79.0 mask 255.255.255.224
network 172.30.89.0 mask 255.255.255.224
network 192.122.3.9 mask 255.255.255.255
neighbor 172.30.79.7 remote-as 65006
neighbor 172.30.79.7 send-community both
neighbor 172.30.79.7 route-map R7-OUT out
neighbor 172.30.89.8 remote-as 65006
neighbor 172.30.89.8 send-community both
neighbor 172.30.89.8 route-map R8-OUT out
ip bgp-community new-format
route-map R7-OUT permit 10
match ip address prefix-list 172.30.79.0/27
set community 65100:90
route-map R7-OUT permit 20
route-map R8-OUT permit 10
match ip address prefix-list 172.30.89.0/27
set community 65100:110
route-map R8-OUT permit 20
##R7’s config##
R7#sh run | s bgp|route-map
router bgp 65006
address-family ipv4 vrf VPN
neighbor 172.30.79.9 remote-as 65100
neighbor 172.30.79.9 activate
neighbor 172.30.79.9 send-community both
neighbor 172.30.79.9 as-override
neighbor 172.30.79.9 route-map R9-IN in
route-map R9-IN permit 10
match community 65100:90
set local-preference 90
route-map R9-IN permit 20
##R7’s ‘show bgp’##
R7#sh ip bgp vpnv4 vrf VPN | b Network
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 65066:700 (default for vrf VPN)
r> 172.30.79.0/27 172.30.79.9 90 0 65100 i
*> 172.30.89.0/27 172.30.79.9 0 0 65100 i
*> 192.122.3.9/32 172.30.79.9 0 0 65100 i
##R8’s config##
router bgp 65006
address-family ipv4 vrf VPN
neighbor 172.30.89.9 remote-as 65100
neighbor 172.30.89.9 activate
neighbor 172.30.89.9 send-community both
neighbor 172.30.89.9 as-override
neighbor 172.30.89.9 route-map R9-INv2 in
route-map R9-INv2 permit 10
match community 65100:110
set local-preference 110
route-map R9-INv2 permit 20
##R8’s ‘show bgp’##
R8#sh ip bgp vpnv4 vrf VPN | b Network
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 65006:800 (default for vrf VPN)
*> 172.30.79.0/27 172.30.89.9 0 0 65100 i
r> 172.30.89.0/27 172.30.89.9 0 0 65100 i
*> 192.122.3.9/32 172.30.89.9 0 0 65100 i
R8#sh ip bgp vpnv4 vrf VPN community | b Network
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 65006:800 (default for vrf VPN)
r> 172.30.89.0/27 172.30.89.9 0 0 65100 i
R8#sh ip bgp vpnv4 vrf VPN 172.30.89.0/27
BGP routing table entry for 65006:800:172.30.89.0/27, version 77
Paths: (1 available, best #1, table VPN, RIB-failure(17))
Not advertised to any peer
Refresh Epoch 2
65100
172.30.89.9 from 172.30.89.9 (192.122.3.9)
Origin IGP, metric 0, localpref 100, valid, external, best
Community: 65100:110
Extended Community: RT:910:910
mpls labels in/out 45/nolabel
rx pathid: 0, tx pathid: 0x0 -
Bgp default route-target filter
Hi folks,
how that command works, and why it don't need to be configured on an ASBR that is functioning as RR?
Thank you very much for your support
Regards
AndreaBy default, a cisco router will filter out prefixes that contain a route-target that is not use locally on that router.
This check is disabled when you configure a route-reflector-client, since the client may need one of those routes.
On an ASBR that IS already a RR, you don't need to mess with this command because the rt filter check is already turned off.
However, if your ASBR is not a RR ( or doesn't have a particular VPN configured locally) and you need to advertise VPN prefixes to another AS, then you need to turn this check off or the ASBR will filter out the prefixes when they are received from its internal peers, so it will not have them to advertise to another else. In this case, you would do a "no bgp default route-target filter" on the ASBR so the routes are accepted even though they will not be used locally.
HTH
-Rob -
Route two separate networks via RJ45 on the router E900. is it possible?
Good day! I wonder if the E900 router can be used to route two separate networks. Not via wifi, but via RJ45. eg 192.168.0.1 and 192.168.1.1 If possible, I would like to know how? I thank the attention.
You can add Static routes and disable NAT. This model of router isn't designed for that purpose. The LRT224 is the router you want for this purpose if lower cost is required.
Please remember to Kudo those that help you.
Linksys
Communities Technical Support -
Hi All...
I have this topology:
CE2-->PE1-->P--->PE2-->CE2
.............\-->PE3-->CE2
In router "P" I want to configure MP-BGP, but I have many doubts with configurations this router. I need to do route-reflector too.
Anybody can help me?
CLRGomesThanks, look my configuration:
Router P
router bgp 65500
no synchronization
no bgp default route-target filter
bgp log-neighbor-changes
neighbor MPLS peer-group
neighbor MPLS remote-as 65500
neighbor MPLS ebgp-multihop 255
neighbor MPLS update-source Loopback0
neighbor MPLS route-reflector-client
neighbor MPLS allowas-in
neighbor MPLS soft-reconfiguration inbound
neighbor 10.10.10.2 peer-group MPLS
neighbor 10.10.10.3 peer-group MPLS
neighbor 10.10.10.4 peer-group MPLS
no auto-summary
address-family vpnv4
neighbor MPLS route-reflector-client
neighbor MPLS send-community both
neighbor 10.10.10.2 activate
neighbor 10.10.10.3 activate
neighbor 10.10.10.4 activate
exit-address-family
ok...working perfect, I did MP-BGP between PE routers and I configured RDs differents too...
Later I did between PE->CE with OSPF and working too, loadshare working.
Thanks a lot
CLRGomes
CCIE R&S -
BGP Conditional Route Filtering
Hi All,
I have router with 2 Connection.
1) IP Transit from Tier 2 Provider
2) IX - Local Internet Exchange for local peering
I'm receiving full internet route nearly 500k+ entries. I also have few local peering through IX connection to local telco. Now that , Im receiving more specific route from IP Transit link compared to local peering . Eg
Local Peer A( ASN YYYY) send route : a.a.0.0/16
IP Transit send route : a.a.1.0/24
With this , My traffic to a.a.1.0/24 end up routed over IP transit link. But we need the traffic routed via IX Peering, since its direct peering and have low latency and high bandwidth capacity.
Im thinking, to filter AS-PATH YYYY from IP Transit link, so that anyy traffic to ASN YYYY will now routed over local IX Peering. But, this will cause traffic get dropped if My Port to IX or Peering Partner Port to IX is went down. The traffic then should routed over IP transit link if local peering is down. Meaning to say , AS-Path filtering should be removed if local peering to that ASN is down.
Any Idea how to accomplish this ?Hello
You dont say if this is just one router with two perrings or two routers with ibgp between them each with a isp peering?
However i for outbound traffic you can use either Weight or local Prefeance path selection for your local traffic to be go over your selected link.
For inbound As-Path prepending would be apllcable I think
Outbound:
Weight (Is locally significant - Just one router)
access-list 10 permit x.x.x.x y.y.y.y
route-map Weight permit 10
match ip address 1
set weight 400000
route-map Weight permit 99
router bgp xx
neigbour x.x.x.x route-map Weight out (to ebgp perring for your prefered choice path)
or
route-map Local-Pref permit 10 ( for IBGP routers)
match ip address 1
set local-preferance 200
route-map Local-Pref permit 99
router bgp xx
neigbour x.x.x.x route-map Local-Pref in (to ebgp perring for your prefered choice path)
Inbound
AS=PAth prepend
route-map AS-Path permit 10
match ip address 10
set as-path prepend ASN ASN ASN
route-map AS-Path permit 99
router bgp xx
neigbour x.x.x.x route-map AS-Path out ( to the least preffered ISP)
res
Paul -
I have a few questions pertaining to Conditional advertisements in BGP using advertise-map(s).
From the Cisco site the examples I have seen stipulate that the routes you redistribute into BGP are through the means of "network" statements.
The first question is, are you able to redistribute the route(s) you wish to control being advertised to neighboring BGP peers via an advertise-map through the "redistribute" command or must you use "network" statements?
The second question is, are you able to put a condition on more than one route that you may or may not want to advertise based on the condition you have set. In otherwords as an example I want to allow around 30 routes to be advertised towards a BGP peer if a certain route exists in the BGP routing table. For this I will obviously need to use an advertise-map with the exist-map statement. Is it possible to have this condition set on the 30 routes?Advertise-map are only related to what is sent out of the router. They really don't care how the route got into the router. You can use either network statements or the redistribution command to get them into the bgp routing table.
I don't know what the limit is on how many addreses you can put in the route-map used for conditional advertisement but it is much more than 30. It would just be in worse case a access list that had 30 entries.
The conditional advertisement is not really any different than a normal route-map filter. You just build a access list or prefix list that matches any address you want to allow. You do it the same way as if you were building a normal route-map that allow certain routes all the time. The only thing really special is when it is applied not how you create it. -
BGP Advertisement to Specific AS Number
HOw to setup BGP so it will not get advertised to specific AS.
Example:
My BGP AS 1000 and i peer with AS 2000 and 3000. I want to tell BGP AS 2000 not to advertise to AS 100, and 200.
Or i want to advertise my blocks to all internet but i want to make sure AS 100 and 200 wont have my prefix in the BGP table.
thanksHello,
Create a "peer-group" where you will add those two AS to the peer-group. And apply "mhnedirli" solution above...
and use :
neighbor <peer-group-name> route-map BLOCK out -
CSCsm71553 - BGP advertises prefix after network command is removed
Hello,
I got a stack of core switches with the following components :
Switch Ports Model SW Version SW Image
1 52 WS-C3750G-48PS 12.2(52)SE C3750-IPSERVICES-M
* 2 52 WS-C3750V2-48PS 12.2(52)SE C3750-IPSERVICESK9-M
BGP is configured on the stack in order to exchange routes with our WAN operator.
I've been told that with some versions of these IOS, BGP keeps on advertising prefix after network command is removed.
Can you tell me more about it and tell me if my software versions are submitted or not to this bug.
Thanking you;
Best regards;
PascalHi Amit
Thanks a lot for your feedback.
To be noted : I also received an answer from a Cisco engineer writing me the bug was resolved since the 12.2(46)SE version. I will take no risk and prefer taking your answer into account.
Best regards.
Pascal
Maybe you are looking for
-
How to integrate a Smart Form in Web Dynpro and how to view it on portal?
Hi, I have created a Smart Form in ABAP. I need to use it in Web Dynpro. How can this be done? I want to integrate this Smart Form in a Web Dynpro Application and then display this Smart Form on the Portal (when I deploy the Web Dynpro application).
-
Token longer than max allowable length of 258 chars
Hi all, i tried to apply a sql case statement in sql loader control file in " " the load succeed with 258 chars case or decode statement but when i add more cases it return sql loader 350 token longer than max LOAD DATA INFILE 'F:\Vou\vou20110613_102
-
PLEASE HELP: unable to install adobe photoshop elements 11 free trial
Every time I try to install adobe photoshop elements 11 free trial I get this message" the wizard was interrupted before it could be completely installed" I have tryed to install this for days with no success I even disabled my Norton antiviris with
-
Picture (image, logo) in projects
Hello Sun, I am making application, that makes pdf. I need to have a picture (a logo) that will be seen on application itself, and also on pdf. I use com.itextpdf.text.Image image = com.itextpdf.text.Image.getInstance("/home/grom/NetBeansProjects/log
-
Rented a movie on iPod touch says could not load video
Rented a movie on iPod touch says could not load video after a few minutes playing