设为首页收藏本站language 语言切换
查看: 2224|回复: 6
收起左侧

[分享] 部署MPLS VPN

[复制链接]
发表于 2013-2-27 22:31:21 | 显示全部楼层 |阅读模式
实验拓扑:


mpls vpn.png

实验步骤:
R1:

R1#show run
Building configuration...
Current configuration : 1304 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
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
ip domain name lab.local
!         
multilink bundle-name authenticated
!         
!         
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
archive
log config
  hidekeys
!         
!
!
!
!
!
!
!
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial1/0
ip address 13.1.1.1 255.255.255.0
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 1
network 1.1.1.1 0.0.0.0
network 13.1.1.1 0.0.0.0
no auto-summary
eigrp router-id 1.1.1.1
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!         
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
!
!
end


R2:
R2#show run
Building configuration...
Current configuration : 1270 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
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
ip domain name lab.local
!         
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
archive   
log config
  hidekeys
!
!
!
!
!
!
!
!
interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial1/0
ip address 23.1.1.2 255.255.255.0
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 rip
version 2
network 2.0.0.0
network 23.0.0.0
no auto-summary
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!         
!
!
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
!
!
end



R3:
R3#show run
Building configuration...
Current configuration : 2592 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
memory-size iomem 5
ip cef
!
!
!
!
ip vrf a
rd 10:10
route-target export 10:10
route-target export 20:20
route-target import 10:10
route-target import 20:20
!
ip vrf b
rd 20:20
route-target export 20:20
route-target export 10:10
route-target import 20:20
route-target import 10:10
!
no ip domain lookup
ip domain name lab.local
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!         
!
!
!
!
!
!
!
!
!
!
!
!
!
archive
log config
  hidekeys
!
!
!
!
!
!
!         
!
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial1/0
ip vrf forwarding a
ip address 13.1.1.3 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
ip vrf forwarding b
ip address 23.1.1.3 255.255.255.0
serial restart-delay 0
!
interface Serial1/2
ip address 34.1.1.3 255.255.255.0
mpls ip
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
router eigrp 1
no auto-summary
!
address-family ipv4 vrf a
  redistribute bgp 234 metric 10000 100 255 1 1500
  network 13.1.1.3 0.0.0.0
  auto-summary
  autonomous-system 1
  eigrp router-id 3.3.3.3
exit-address-family
!
router eigrp 10
network 3.3.3.3 0.0.0.0
network 34.1.1.3 0.0.0.0
no auto-summary
eigrp router-id 3.3.3.3
!
router rip
version 2
no auto-summary
!
address-family ipv4 vrf b
  redistribute bgp 234 metric transparent
  network 23.0.0.0
  no auto-summary
exit-address-family
!
router bgp 234
no synchronization
bgp router-id 3.3.3.3
bgp log-neighbor-changes
neighbor 5.5.5.5 remote-as 234
neighbor 5.5.5.5 update-source Loopback0
neighbor 5.5.5.5 next-hop-self
no auto-summary
!
address-family vpnv4
  neighbor 5.5.5.5 activate
  neighbor 5.5.5.5 send-community both
exit-address-family
!
address-family ipv4 vrf b
  redistribute rip metric 2
  no synchronization
exit-address-family
!
address-family ipv4 vrf a
  redistribute eigrp 1 metric 2
  no synchronization
exit-address-family
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
mpls ldp router-id Loopback0 force
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
!
!
end



R4:
R4#show run
Building configuration...
Current configuration : 1394 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
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
ip domain name lab.local
!         
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
archive   
log config
  hidekeys
!
!
!
!
!
!
!
!
interface Loopback0
ip address 4.4.4.4 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial1/0
ip address 34.1.1.4 255.255.255.0
mpls ip
serial restart-delay 0
!
interface Serial1/1
ip address 45.1.1.4 255.255.255.0
mpls ip
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 10
network 4.4.4.4 0.0.0.0
network 34.1.1.4 0.0.0.0
network 45.1.1.4 0.0.0.0
no auto-summary
eigrp router-id 4.4.4.4
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
mpls ldp router-id Loopback0 force
!
!
control-plane
!
!
!         
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
!
!
end




R5:
R5#show run
Building configuration...
Current configuration : 2582 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
memory-size iomem 5
ip cef
!
!
!
!
ip vrf a
rd 10:10
route-target export 10:10
route-target import 10:10
!
ip vrf b
rd 20:20
route-target export 20:20
route-target import 20:20
!
no ip domain lookup
ip domain name lab.local
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!         
!
!
!
!
!
!
!
!
!
archive
log config
  hidekeys
!
!
!
!
!
!
!
!
interface Loopback0
ip address 5.5.5.5 255.255.255.0
!         
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial1/0
ip address 45.1.1.5 255.255.255.0
mpls ip
serial restart-delay 0
!
interface Serial1/1
ip vrf forwarding a
ip address 56.1.1.5 255.255.255.0
serial restart-delay 0
!
interface Serial1/2
ip vrf forwarding b
ip address 57.1.1.5 255.255.255.0
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
router eigrp 10
network 5.5.5.5 0.0.0.0
network 45.1.1.5 0.0.0.0
no auto-summary
eigrp router-id 5.5.5.5
!
router eigrp 100
no redistribute eigrp 100
no auto-summary
!
address-family ipv4 vrf b
  redistribute bgp 234 metric 10000 100 255 1 1500
  no redistribute eigrp
  network 57.1.1.5 0.0.0.0
  auto-summary
  autonomous-system 100
  eigrp router-id 5.5.5.5
exit-address-family
!
router ospf 1 vrf a
router-id 5.5.5.5
log-adjacency-changes
redistribute bgp 234 metric 2 subnets
network 56.1.1.5 0.0.0.0 area 0
!
router bgp 234
no synchronization
bgp router-id 5.5.5.5
bgp log-neighbor-changes
neighbor 3.3.3.3 remote-as 234
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 next-hop-self
no auto-summary
!
address-family vpnv4
  neighbor 3.3.3.3 activate
  neighbor 3.3.3.3 send-community both
exit-address-family
!
address-family ipv4 vrf b
  redistribute eigrp 100 metric 2
  redistribute eigrp metric 2
  no synchronization
exit-address-family
!
address-family ipv4 vrf a
  redistribute ospf 1 vrf a metric 2 match internal external 1 external 2
  no synchronization
exit-address-family
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
!
!
!         
mpls ldp router-id Loopback0 force
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
!
!
end




R6:

R6#show run
Building configuration...
Current configuration : 1317 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
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
ip domain name lab.local
!         
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
archive   
log config
  hidekeys
!
!
!
!
!
!
!
!
interface Loopback0
ip address 6.6.6.6 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial1/0
ip address 56.1.1.6 255.255.255.0
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 ospf 1
router-id 6.6.6.6
log-adjacency-changes
network 6.6.6.6 0.0.0.0 area 0
network 56.1.1.6 0.0.0.0 area 0
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!         
!
!
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
!
!
end


R7:
R7#show run
Building configuration...
Current configuration : 1306 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R7
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
ip domain name lab.local
!         
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
archive   
log config
  hidekeys
!
!
!
!
!
!
!
!
interface Loopback0
ip address 7.7.7.7 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial1/0
ip address 57.1.1.7 255.255.255.0
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 100
network 7.7.7.7 0.0.0.0
network 57.1.1.7 0.0.0.0
no auto-summary
eigrp router-id 7.7.7.7
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!         
!
!
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
!
!
end

发表于 2013-2-27 23:00:28 | 显示全部楼层
沙发 2013-2-27 23:00:28 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-2-27 23:15:22 | 显示全部楼层
板凳 2013-2-27 23:15:22 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-2-27 23:26:35 | 显示全部楼层
地板 2013-2-27 23:26:35 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-2-28 08:32:58 | 显示全部楼层
5# 2013-2-28 08:32:58 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-10-16 19:59:40 | 显示全部楼层
enen bucuo
6# 2013-10-16 19:59:40 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2016-3-18 11:04:54 | 显示全部楼层
谢谢共享资料
7# 2016-3-18 11:04:54 回复 收起回复
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-4-27 23:38 , Processed in 0.076929 second(s), 27 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表