-
一个最基本的
MPLS/VPN
1.
拓扑说明:
7
台路由器,两台
CE
,两台
p>
PE
,
三台
P
p>
路由器,
RX
连接使用
XX.0.0.0/8,
分别配置一个
L0
:
X.X.X.X/24
2.
配置说明:
R1R2
之间使用
RIP
、
R6R7
之间使用静态路由作为
PE-CE<
/p>
路由,
ISP
内部的
IGP
使用
EIGRP
3.
具体配置:
R1:
R1-CE1#sh run
Building configuration...
Current configuration : 1088 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1-CE1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip
domain lookup
!
!
!
multilink bundle-name
authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface
Loopback0
ip address 1.1.1.1
255.255.255.255
!
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 12.0.0.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 rip
version 2
network 1.0.0.0
network
12.0.0.0
no auto-summary
!
ip http server
no ip http
secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line
aux 0
line vty 0 4
!
!
end
R1-CE1#
R2:
R2-PE1#sh run
Building
configuration...
*Mar 1 01:12:26.743:
%SYS-5-CONFIG_I: Configured from console by
console
Current configuration : 1774
bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2-PE1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip
domain lookup
!
!
ip vrf vpn1
rd 100:1
route-target export 100:1
route-target import 100:1
!
!
multilink bundle-name
authenticated
mpls label range 200 299
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
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 vpn1
ip
address 12.0.0.2 255.255.255.0
serial
restart-delay 0
!
interface
Serial1/1
ip address 23.0.0.2
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 100
network 2.0.0.0
network
23.0.0.0
no auto-summary
!
router rip
version 2
no auto-summary
!
address-family ipv4 vrf vpn1
redistribute bgp 100 metric 1
network 12.0.0.0
no auto-
summary
version 2
exit-
address-family
!
router bgp
100
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 6.6.6.6 remote-as 100
neighbor 6.6.6.6 update-source Loopback0
!
address-family vpnv4
neighbor 6.6.6.6 activate
neighbor 6.6.6.6 send-community both
exit-address-family
!
address-family ipv4 vrf vpn1
redistribute connected
redistribute
rip
no synchronization
exit-address-family
!
ip
http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line
con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
R3:
R3-P1#sh
run
Building configuration...
*Mar 1 01:00:46.379: %SYS-5-CONFIG_I:
Configured from console by console
Current configuration : 1117 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3-P1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip
domain lookup
!
!
!
multilink bundle-name
authenticated
mpls label range 300 399
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface
Loopback0
ip address 3.3.3.3
255.255.255.255
!
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.0.0.3 255.255.255.0
mpls ip
serial restart-delay 0
!
interface Serial1/1
ip
address 23.0.0.3 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 100
network 0.0.0.0
no auto-
summary
!
ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
R4:
R4-P2#sh run
Building configuration...
*Mar 1 01:13:16.019: %SYS-5-CONFIG_I:
Configured from console by console
Current configuration : 1117 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R4-P2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5