sham-link-

sham-link---是在ospf中创建的,所以建立双方的路由必须可达,因为其传递的是vpnv4路由,所以双方建立的地址必须通告进ospf的vpnv4路由中(opsf vrf a中)所以上面把环回接口先关联到vrf空间中,再宣告到bgp的vpnv4中,因为有双向重发布,所以其路由会发布到ospf的vpnv4中-----一定不能这样:关联到vrf空间后,直接宣告到ospf的vpnv4中,***这样会出现问题,只能通过BGP的vpnv4宣告

注:----环回地址配置为 24位,sham-link是down------自己测试

                                      32         sham-link是up

http://blog.sina.com.cn/s/blog_3e15c5360101bovf.html

实验拓扑图

     实验描述:如上图所示,现R2/R3/R4为MPLS 网络,两CE客户需要通过MPLS 骨干网络进行通信,并且CE-R1与CE-R5之间有一条链路作为备份链路,正常情况要,R4至R6的流量通过MPLS 网络走,当MPLS 网络存在故障时,通过R1与R5之间的互联链路走,下面配置OSPF Sham-Link实现上述要求。

1、首先配置MP-BGP,MPLS,VRF,PE与CE的OSPF路由协议

R2的配置:

R2#show run
Building configuration...

Current configuration : 2446 bytes
!
upgrade fpd auto
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
logging message-counter syslog
!
no aaa new-model
ip source-route
no ip icmp rate-limit unreachable
ip cef
!         
no ip domain lookup
ip vrf ccie
 rd 1:1   
 route-target export 1:1
 route-target import 1:1
!         
no ipv6 cef
!         
multilink bundle-name authenticated
mpls label range 100 199
!               
memory-size iomem 0
archive   
 log config
  hidekeys 
!         
ip tcp synwait-time 5    
!         
interface Loopback0
 ip address 2.2.2.2 255.255.255.0
!         
interface Loopback1
 ip vrf forwarding ccie
 ip address 100.1.1.1 255.255.255.255
 ip ospf network point-to-point
!         
interface FastEthernet0/0
 ip vrf forwarding ccie
 ip address 12.1.1.2 255.255.255.0
 ip ospf 1 area 0
 duplex auto
 speed auto
!         
interface FastEthernet0/1
 ip address 23.1.1.1 255.255.255.0
 duplex auto
 speed auto
 mpls ip  
!         
interface Serial1/0
 no ip address
 shutdown 
 serial restart-delay 0
!         
interface Serial1/1
 no ip address
 shutdown 
 serial restart-delay 0
!         
interface Serial1/2
 no ip address
 shutdown 
 serial restart-delay 0
!         
interface Serial1/3
 no ip address
 shutdown 
 serial restart-delay 0
!         
router eigrp 90
 network 2.2.2.2 0.0.0.0
 network 23.1.1.1 0.0.0.0
 no auto-summary
!         
router ospf 1 vrf ccie
 router-id 92.2.2.2
 log-adjacency-changes
 area 0 sham-link 100.1.1.1 100.1.1.2
 redistribute bgp 24 subnets
 network 12.1.1.2 0.0.0.0 area 0
!         
router bgp 24
 bgp router-id 24.2.2.2
 no bgp default ipv4-unicast
 bgp log-neighbor-changes
 neighbor 4.4.4.4 remote-as 24
 neighbor 4.4.4.4 update-source Loopback0
 !        
 address-family ipv4
  neighbor 4.4.4.4 activate
  no auto-summary
  no synchronization
 exit-address-family
 !        
 address-family vpnv4
  neighbor 4.4.4.4 activate
  neighbor 4.4.4.4 send-community both
 exit-address-family
 !        
 address-family ipv4 vrf ccie
  redistribute ospf 1 vrf ccie
  no synchronization
  network 100.1.1.1 mask 255.255.255.255
 exit-address-family

R3配置:

R3#show run
Building configuration...

Current configuration : 1543 bytes
!
upgrade fpd auto
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
logging message-counter syslog
!
no aaa new-model
ip source-route
no ip icmp rate-limit unreachable
ip cef
!         
no ip domain lookup
no ipv6 cef
!         
multilink bundle-name authenticated
mpls label range 200 299
!         
memory-size iomem 0
archive   
 log config
  hidekeys    
!         
ip

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值