[Review]OSPF PE-CE Routing

关于OSPF multi-instance  在工程上应用比较广泛,CE间发布路由的平滑过渡, 防止环路等等都有相应的措施可以实现。

大概就这么几点内容

1. domain-ID的使用: PE端配置了相同的domain ID internal lsa 和 External LSA 都能平滑过渡

2. domain-ID 或 默认 CE-PE端的 process ID 不同 发布给对端的 LSA都按照五类来处理

3. DN bit 的设置处理 type 3 LSA 环路问题

4. Route tag 处理 type 5 LSA 环路

5. sham link 处理 CE 间的 back door 链路 问题

 

CE1 配置

R1#show run
Building configuration...

Current configuration : 941 bytes
!
version 12.4
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
!
resource policy
!
ip subnet-zero
ip cef
!
!
no ip dhcp use vrf connected
!
!
no ip ips deny-action ips-interface
!
!
interface Loopback0
 ip address 10.10.10.10 255.255.255.255
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex half
!
interface FastEthernet1/0
 ip address 1.1.1.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
router ospf 10
 log-adjacency-changes
 network 0.0.0.0 255.255.255.255 area 0
!
ip classless
no ip http server
no ip http secure-server!
!
!
control-plane!
!
!
gatekeeper
 shutdown
!
!
line con 0
 timeout login response 300
 stopbits 1
line aux 0
 stopbits 1
line vty 0 4
!
!
end

PE1 配置

R2#show run
Building configuration...

Current configuration : 1740 bytes
!
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
!
!
no aaa new-model
!
resource policy
!
ip subnet-zero
ip cef
!
!
no ip dhcp use vrf connected
!
!
ip vrf vpn1
 rd 1:100
 route-target export 1:100
 route-target import 1:100
!
no ip ips deny-action ips-interface
!
mpls label protocol ldp
mpls ldp router-id Loopback0
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 20.20.20.20 255.255.255.255
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex half
!
interface FastEthernet1/0
 ip vrf forwarding vpn1
 ip address 1.1.1.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface POS2/0
 ip address 2.1.1.1 255.255.255.0
 mpls ip
!
router ospf 101 vrf vpn1
 router-id 20.20.20.20
 log-adjacency-changes
 redistribute bgp 1 subnets
 network 0.0.0.0 255.255.255.255 area 0
!
router ospf 10
 log-adjacency-changes
 network 0.0.0.0 255.255.255.255 area 0
!
router bgp 1
 no synchronization
 bgp log-neighbor-changes
 neighbor 50.50.50.50 remote-as 1
 neighbor 50.50.50.50 update-source Loopback0
 no auto-summary
 !
 address-family vpnv4
 neighbor 50.50.50.50 activate
 neighbor 50.50.50.50 send-community extended
 exit-address-family
 !
 address-family ipv4 vrf vpn1
 redistribute ospf 101 vrf vpn1 match internal external 1 external 2
 no auto-summary
 no synchronization
 exit-address-family
!
ip classless
no ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
gatekeeper
 shutdown
!
!
line con 0
 timeout login response 300
 stopbits 1
line aux 0
 stopbits 1
line vty 0 4
!
!
end

P1配置 

R3>en
R3#show run
Building configuration...

Current configuration : 953 bytes
!
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
!
!
no aaa new-model
!
resource policy
!
ip subnet-zero
ip cef
!
!
no ip dhcp use vrf connected
!
!
no ip ips deny-action ips-interface
!
mpls label protocol ldp
mpls ldp router-id Loopback0
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 30.30.30.30 255.255.255.255
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex half
!
interface POS1/0
 ip address 2.1.1.2 255.255.255.0
 mpls ip
!
interface POS2/0
 ip address 3.1.1.1 255.255.255.0
 mpls ip
!
router ospf 10
 log-adjacency-changes
 network 0.0.0.0 255.255.255.255 area 0
!
ip classless
no ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
gatekeeper
 shutdown
!
!
line con 0
 timeout login response 300
 stopbits 1
line aux 0
 stopbits 1
line vty 0 4
!
!
end

 

P2 配置

R4#show run
Building configuration...

Current configuration : 953 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R4
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
ip subnet-zero
ip cef
!
!
no ip dhcp use vrf connected
!
!
no ip ips deny-action ips-interface
!
mpls label protocol ldp
mpls ldp router-id Loopback0
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 40.40.40.40 255.255.255.255
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex half
!
interface POS1/0
 ip address 3.1.1.2 255.255.255.0
 mpls ip
!
interface POS2/0
 ip address 4.1.1.1 255.255.255.0
 mpls ip
!
router ospf 10
 log-adjacency-changes
 network 0.0.0.0 255.255.255.255 area 0
!
ip classless
no ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
gatekeeper
 shutdown
!
!
line con 0
 timeout login response 300
 stopbits 1
line aux 0
 stopbits 1
line vty 0 4
!
!
end

 

 

PE2 配置

R5#show run
Building configuration...

Current configuration : 1740 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R5
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
ip subnet-zero
ip cef
!
!
no ip dhcp use vrf connected
!
!
ip vrf vpn1
 rd 1:100
 route-target export 1:100
 route-target import 1:100
!
no ip ips deny-action ips-interface
!
mpls label protocol ldp
mpls ldp router-id Loopback0
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 50.50.50.50 255.255.255.255
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex half
!
interface POS1/0
 ip address 4.1.1.2 255.255.255.0
 mpls ip
!
interface FastEthernet2/0
 ip vrf forwarding vpn1
 ip address 5.1.1.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet2/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
router ospf 101 vrf vpn1
 router-id 50.50.50.50
 log-adjacency-changes
 redistribute bgp 1 subnets
 network 0.0.0.0 255.255.255.255 area 0
!
router ospf 10
 log-adjacency-changes
 network 0.0.0.0 255.255.255.255 area 0
!
router bgp 1
 no synchronization
 bgp log-neighbor-changes
 neighbor 20.20.20.20 remote-as 1
 neighbor 20.20.20.20 update-source Loopback0
 no auto-summary
 !
 address-family vpnv4
 neighbor 20.20.20.20 activate
 neighbor 20.20.20.20 send-community extended
 exit-address-family
 !
 address-family ipv4 vrf vpn1
 redistribute ospf 101 vrf vpn1 match internal external 1 external 2
 no auto-summary
 no synchronization
 exit-address-family
!
ip classless
no ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
gatekeeper
 shutdown
!
!
line con 0
 timeout login response 300
 stopbits 1
line aux 0
 stopbits 1
line vty 0 4
!
!
end

 

 

CE2 配置

R6#show run
Building configuration...

Current configuration : 940 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R6
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
ip subnet-zero
ip cef
!
!
no ip dhcp use vrf connected
!
!
no ip ips deny-action ips-interface
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 60.60.60.60 255.255.255.255
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex half
!
interface FastEthernet1/0
 ip address 5.1.1.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
router ospf 1
 log-adjacency-changes
 network 0.0.0.0 255.255.255.255 area 0
!
ip classless
no ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
gatekeeper
 shutdown
!
!
line con 0
 timeout login response 300
 stopbits 1
line aux 0
 stopbits 1
line vty 0 4
!
!
end

 

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值