注册 登录  
 加关注
查看详情
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

欢迎光临shaying110的博客

RSed-ISPing

 
 
 

日志

 
 

MPLS VPN(OSPF)配置  

2010-08-12 18:59:47|  分类: CISCO网络 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
MPLS VPN(OSPF)配置 - shaying110 - 欢迎光临shaying110的博客
 
P配置
ip cef
no ip domain lookup
!
!
mpls label range 100 199
interface Loopback0
 ip address 202.102.1.1 255.255.255.0
 ip ospf network point-to-point
 ip ospf 1 area 0

interface Serial1/0
 ip address 202.102.12.1 255.255.255.0
 mpls ip
 serial restart-delay 0
!
interface Serial1/1
 ip address 202.102.13.1 255.255.255.0
 mpls ip

 router ospf 1
 log-adjacency-changes
 network 0.0.0.0 255.255.255.255 area 0
!

BJ-PE配置:

ip cef
no ip domain lookup
!
!
ip vrf bjvrf
 rd 200:299
 route-target export 24:35
 route-target import 24:35
!
mpls label range 200 299
!

interface Loopback0
 ip address 202.102.2.2 255.255.255.0
 ip ospf network point-to-point
!

interface Serial1/0
 ip vrf forwarding bjvrf
 ip address 202.102.24.2 255.255.255.0
 serial restart-delay 0
!
interface Serial1/1
 ip address 202.102.12.2 255.255.255.0
 mpls ip
 serial restart-delay 0
!
router ospf 24 vrf bjvrf
 log-adjacency-changes
 redistribute bgp 3000 subnets
 network 202.102.24.0 0.0.0.255 area 0
!
router ospf 1
 log-adjacency-changes
 network 202.102.2.0 0.0.0.255 area 0
 network 202.102.12.0 0.0.0.255 area 0
!
router bgp 3000
 no synchronization
 bgp log-neighbor-changes
 neighbor 202.102.3.3 remote-as 3000
 neighbor 202.102.3.3 update-source Loopback0
 no auto-summary
 !
 address-family vpnv4
 neighbor 202.102.3.3 activate
 neighbor 202.102.3.3 send-community both
 exit-address-family
 !
 address-family ipv4 vrf bjvrf
 redistribute ospf 24 vrf bjvrf
 no synchronization
 exit-address-family
!

SH-PE配置:

ip cef
no ip domain lookup
!
ip vrf shvrf
 rd 300:399
 route-target export 24:35
 route-target import 24:35
!
mpls label range 300 399
!
interface Loopback0
 ip address 202.102.3.3 255.255.255.0
 ip ospf network point-to-point
!
interface Serial1/0
 ip vrf forwarding shvrf
 ip address 202.102.35.3 255.255.255.0
 serial restart-delay 0
!
interface Serial1/1
 ip address 202.102.13.3 255.255.255.0
 mpls ip
 serial restart-delay 0
!
router ospf 35 vrf shvrf
 log-adjacency-changes
 redistribute bgp 3000 subnets
 network 202.102.35.0 0.0.0.255 area 0
!
router ospf 1
 log-adjacency-changes
 network 202.102.3.0 0.0.0.255 area 0
 network 202.102.13.0 0.0.0.255 area 0
!
router bgp 3000
 no synchronization
 bgp log-neighbor-changes
 neighbor 202.102.2.2 remote-as 3000
 neighbor 202.102.2.2 update-source Loopback0
 no auto-summary
 !
 address-family vpnv4
 neighbor 202.102.2.2 activate
 neighbor 202.102.2.2 send-community both
 exit-address-family
 !
 address-family ipv4 vrf shvrf
 redistribute ospf 35 vrf shvrf
 no synchronization
 exit-address-family
!

BJ-CE配置:

interface Loopback0
 ip address 202.102.4.4 255.255.255.0
 ip ospf 1 area 0
!
interface Loopback1
 ip address 100.1.1.1 255.255.255.240
!
interface Loopback2
 ip address 61.1.20.1 255.255.255.248
 ip ospf network point-to-point
!

interface Serial1/1
 ip address 202.102.24.4 255.255.255.0
 serial restart-delay 0
router ospf 1
 log-adjacency-changes
 network 0.0.0.0 255.255.255.255 area 0
!

SH-CE配置:

ip cef
no ip domain lookup
!
interface Loopback0
 ip address 202.102.5.5 255.255.255.0
 ip ospf 1 area 0

interface Serial1/1
 ip address 202.102.35.5 255.255.255.0
 serial restart-delay 0
   
router ospf 1
 log-adjacency-changes
 network 0.0.0.0 255.255.255.255 area 0
!

验证:

sh-ce#sh ip route
Gateway of last resort is not set

     100.0.0.0/32 is subnetted, 1 subnets
O E2    100.1.1.1 [110/65] via 202.102.35.3, 00:45:06, Serial1/1
     202.102.4.0/32 is subnetted, 1 subnets
O E2    202.102.4.4 [110/65] via 202.102.35.3, 00:45:06, Serial1/1
C    202.102.5.0/24 is directly connected, Loopback0
C    202.102.35.0/24 is directly connected, Serial1/1
     61.0.0.0/29 is subnetted, 1 subnets
O E2    61.1.20.0 [110/65] via 202.102.35.3, 00:45:06, Serial1/1
O E2 202.102.24.0/24 [110/1] via 202.102.35.3, 00:47:45, Serial1/1
sh-ce#ping 61.1.20.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 61.1.20.1, timeout is 2 seconds:
!!!!!

bj-ce#sh ip route
     100.0.0.0/28 is subnetted, 1 subnets
C       100.1.1.0 is directly connected, Loopback1
C    202.102.4.0/24 is directly connected, Loopback0
     202.102.5.0/32 is subnetted, 1 subnets
O E2    202.102.5.5 [110/65] via 202.102.24.2, 00:46:33, Serial1/1
O E2 202.102.35.0/24 [110/1] via 202.102.24.2, 00:46:33, Serial1/1
     61.0.0.0/29 is subnetted, 1 subnets
C       61.1.20.0 is directly connected, Loopback2
C    202.102.24.0/24 is directly connected, Serial1/1
bj-ce#ping 202.102.5.5

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 202.102.5.5, timeout is 2 seconds:
!!!!!

 sh-pe#
sh-pe#sh ip route
Gateway of last resort is not set

O    202.102.2.0/24 [110/129] via 202.102.13.1, 00:53:04, Serial1/1
C    202.102.3.0/24 is directly connected, Loopback0
O    202.102.1.0/24 [110/65] via 202.102.13.1, 00:53:04, Serial1/1
O    202.102.12.0/24 [110/128] via 202.102.13.1, 00:53:04, Serial1/1
C    202.102.13.0/24 is directly connected, Serial1/1
sh-pe#sh ip route vrf shvrf

Routing Table: shvrf
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     100.0.0.0/32 is subnetted, 1 subnets
B       100.1.1.1 [200/65] via 202.102.2.2, 00:46:56
     202.102.4.0/32 is subnetted, 1 subnets
B       202.102.4.4 [200/65] via 202.102.2.2, 00:46:56
     202.102.5.0/32 is subnetted, 1 subnets
O       202.102.5.5 [110/65] via 202.102.35.5, 00:49:35, Serial1/0
C    202.102.35.0/24 is directly connected, Serial1/0
     61.0.0.0/29 is subnetted, 1 subnets
B       61.1.20.0 [200/65] via 202.102.2.2, 00:46:56
B    202.102.24.0/24 [200/0] via 202.102.2.2, 00:51:11
sh-pe#sh mpl fo
Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop   
tag    tag or VC   or Tunnel Id      switched   interface             
300    Pop tag     202.102.1.0/24    0          Se1/1      point2point 
301    Untagged    202.102.5.5/32[V] 1560       Se1/0      point2point 
302    Aggregate   202.102.35.0/24[V]   \
                                     3120                              
304    Pop tag     202.102.12.0/24   0          Se1/1      point2point 
306    100         202.102.2.0/24    0          Se1/1      point2point 
sh-pe#sh mpl ip bin
  202.102.1.0/24
        in label:     300      
        out label:    imp-null  lsr: 202.102.1.1:0    inuse
  202.102.2.0/24
        in label:     306      
        out label:    100       lsr: 202.102.1.1:0    inuse
  202.102.3.0/24
        in label:     imp-null 
        out label:    103       lsr: 202.102.1.1:0  
  202.102.12.0/24
        in label:     304      
        out label:    imp-null  lsr: 202.102.1.1:0    inuse
  202.102.13.0/24
        in label:     imp-null 
        out label:    imp-null  lsr: 202.102.1.1:0  
sh-pe#

  评论这张
 
阅读(685)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018