CCIE SP—MPLS VPN Basic 2

过滤VPNv4的路由

最好设置export来控制,比较直接,更改import是被动的。
以下只是简单说明了过滤的基本用法,具体问题还要具体分析,但方法是一样的

Rack1R3(config)#ip prefix-list per7 permit 10.1.7.0/24
Rack1R3(config)#route-map per7
Rack1R3(config-route-map)#match ip add prefix-list per7
Rack1R3(config-route-map)#set extcommunity rt 1:68
Rack1R3(config-route-map)#set extcommunity rt 1:68 ?
ASN:nn or IP-address:nn  VPN extended community
additive                 Add to the existing extcommunity
<cr>
Rack1R3(config-route-map)#set extcommunity rt 1:68 add 
Rack1R3(config-route-map)#end
Rack1R3#
Rack1R3(config)#ip vrf r5-sw1
Rack1R3(config-vrf)#export map per7
Rack1R3(config-vrf)#end
Rack1R3#clear ip bgp * sof
Rack1R4#sh ip bgp vpn all
BGP table version is 30, local router ID is 10.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
Route Distinguisher: 1:57 (default for vrf r5-sw1)
*>i10.1.7.0/24      150.1.3.3                0    100      0 ?
Route Distinguisher: 1:68 (default for vrf r6-sw2)
*> 10.1.6.6/32      10.1.46.6                0         32768 ?
*>i10.1.7.0/24      150.1.3.3                0    100      0 ?
Rack1R4#
Rack1R4#
Rack1R4#sh ip bgp vpn all 10.1.7.0
BGP routing table entry for 1:57:10.1.7.0/24, version 26
Paths: (1 available, best #1, table r5-sw1)
Not advertised to any peer
Local
150.1.3.3 (metric 130) from 150.1.3.3 (150.1.3.3)
Origin incomplete, metric 0, localpref 100, valid, internal, best
Extended Community: RT:1:57 RT:1:68,
mpls labels in/out nolabel/25
BGP routing table entry for 1:68:10.1.7.0/24, version 27
Paths: (1 available, best #1, table r6-sw2)
Not advertised to any peer
Local, imported path from 1:57:10.1.7.0/24
150.1.3.3 (metric 130) from 150.1.3.3 (150.1.3.3)
Origin incomplete, metric 0, localpref 100, valid, internal, best
Extended Community: RT:1:57 RT:1:68,
mpls labels in/out nolabel/25

CE与PE跑BGP常见问题

CE1(AS 65000)---PE1---(AS 100)---PE2---(AS 65000)CE2

这种情况下,CE2是收不到CE1的路由的,因为AS Path中有重复,所以CE2会拒绝CE1的路由,有2种方法可以解决此问题:

1. 在PE2上用as-override,此命令可以使ISP的AS覆盖用户的AS;命令配在PE2上,默认情况从PE2发出路由时AS Patch是“65000,100”,由于配置了此命令,AS Patch变更为“100,100”。但是此命令需要在ipv4 vrf的地址族下启动。如图所示:

2013-3-31 更新:
由于as-override是对MPLS VPN环境的扩展,所以只有在VPNv4的address-family下才支持as-override,正常IPv4的address-family是不支持这个feature的(可以配置,但不生效)。

2. 用了以上命令破坏了BGP原有的防环机制,有可能会产生环路(双CE单PE时),如图所示:


所以需要Site of Orign, BGP防环属性来弥补这种问题,SOO属于扩展的community,在PE2和PE3的进方向设置SOO,当PE2把路由传给PE3时,发现SOO跟自己的一样,所以忽略此路由,起到了防环作用。配置如下所示:

route-map xxx permit seq
 match conditions
 set extcommunity sso yyy

router(config-router-af)#nei ip-adress route-map xxx in

3. 在hub-spoke情境中,常用allow-AS来修改AS_PATH环路检测,如下图所示:

CE1和CE2需要通过中心互同,PE3与中心有两条link,一条专门收路由,一条专门发路由。在PE3上用allowas-in xxx,此命令是使CE2允许相同AS的路由,后面的参数是有几个相同的AS号。

CE与PE跑RIP常见问题

(config)router rip
(config-router)ver 2
(config-router)add ipv4 vrf XXX
(config-router-af)network classful-net
(config-router-af)no auto
(config-router-af)redistribute bgp AS-Num metric transparent
!---注意把BGP重分布到RIP中时,一定要更改Metric,因为RIP的Metric最大只有16
!---transparent的意思是RIP中的Metric在BGP透明传输,如果一个站点用RIP,另一个站点用OSPF,那么不建议用此参数。
(config-router-af)router bgp XXX
(config-router)add ipv4 vrf XXX
(config-router-af)red rip
!---把RIP重分布到BGP时不需要更改Metric
本文出自 Frank's Blog

版权声明:


本文链接:CCIE SP—MPLS VPN Basic 2
版权声明:本文为原创文章,仅代表个人观点,版权归 Frank Zhao 所有,转载时请注明本文出处及文章链接
你可以留言,或者trackback 从你的网站

留言哦

blonde teen swallows load.xxx videos