MPLS×××
配置思路:在骨干网中运行BGP协议,IGP协议为ISIS。PE与客户端运行OSPF协议。PE与客户端的连接用虚路由方式(VRF)。PE与PE之间配置×××v4,P路由器不需要知道任何客户端的路由。
client1配置
interface Loopback0
ip address 172.16.1.1 255.255.255.0
!
interface FastEthernet0/0
ip address 10.1.12.1 255.255.255.0
!
router ospf 1
log-adjacency-changes
network 10.1.12.0 0.0.0.255 area 0
network 172.16.1.0 0.0.0.255 area 0
client2配置
interface Loopback0
ip address 192.168.1.1 255.255.255.0
!
interface FastEthernet0/1
ip address 10.1.45.2 255.255.255.0
!
router ospf 1
log-adjacency-changes
network 10.1.45.0 0.0.0.255 area 0
network 192.168.1.0 0.0.0.255 area 0
PE1配置
hostname PE1
!
ip vrf MPLS×××
rd 1:2
route-target export 1:1
route-target import 1:1
!
interface Loopback0
ip address 2.2.2.2 255.255.255.0
ip router isis
isis circuit-type level-1
!
interface FastEthernet0/0
ip address 10.1.23.1 255.255.255.0
ip router isis
duplex auto
speed auto
tag-switching ip
isis circuit-type level-1
!
interface FastEthernet0/1
ip vrf forwarding MPLS×××
ip address 10.1.12.2 255.255.255.0
duplex auto
speed auto
!
!
router ospf 1 vrf MPLS×××
log-adjacency-changes
redistribute bgp 1 metric-type 1 subnets
network 10.1.12.0 0.0.0.255 area 0
!
router isis
net 49.0001.0000.0000.0001.00
!
router bgp 1
no synchronization
bgp log-neighbor-changes
neighbor 3.3.3.3 remote-as 1
neighbor 3.3.3.3 update-source Loopback0
neighbor 4.4.4.4 remote-as 1
neighbor 4.4.4.4 update-source Loopback0
no auto-summary
!
address-family ***v4
neighbor 4.4.4.4 activate
neighbor 4.4.4.4 send-community both
exit-address-family
!
address-family ipv4 vrf MPLS×××
redistribute ospf 1
no auto-summary
no synchronization
exit-address-family
PE2配置
hostname PE2
!
ip vrf MPLS×××
rd 1:4
route-target export 1:1
route-target import 1:1
!
!
interface Loopback0
ip address 4.4.4.4 255.255.255.0
ip router isis
isis circuit-type level-1
!
interface FastEthernet0/0
ip vrf forwarding MPLS×××
ip address 10.1.45.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 10.1.34.2 255.255.255.0
ip router isis
duplex auto
speed auto
tag-switching ip
isis circuit-type level-1
!
!
router ospf 1 vrf MPLS×××
log-adjacency-changes
redistribute bgp 1 metric 1 metric-type 1 subnets
network 10.1.45.0 0.0.0.255 area 0
!
router isis
net 49.0001.0000.0000.0003.00
!
router bgp 1
no synchronization
bgp log-neighbor-changes
neighbor IBGP peer-group
neighbor IBGP remote-as 1
neighbor IBGP update-source Loopback0
neighbor 2.2.2.2 peer-group IBGP
neighbor 3.3.3.3 peer-group IBGP
no auto-summary
!
address-family ***v4
neighbor IBGP send-community both
neighbor 2.2.2.2 activate
exit-address-family
!
address-family ipv4 vrf MPLS×××
redistribute ospf 1
no auto-summary
no synchronization
exit-address-family
P配置
hostname P
!
interface Loopback0
ip address 3.3.3.3 255.255.255.0
ip router isis
isis circuit-type level-1
!
interface FastEthernet0/0
ip address 10.1.34.1 255.255.255.0
ip router isis
duplex auto
speed auto
tag-switching ip
isis circuit-type level-1
!
interface FastEthernet0/1
ip address 10.1.23.2 255.255.255.0
ip router isis
duplex auto
speed auto
tag-switching ip
isis circuit-type level-1
!
!
router isis
net 49.0001.0000.0000.0002.00
!
router bgp 1
no synchronization
bgp log-neighbor-changes
neighbor IBGP peer-group
neighbor IBGP remote-as 1
neighbor IBGP update-source Loopback0
neighbor 2.2.2.2 peer-group IBGP
neighbor 4.4.4.4 peer-group IBGP
no auto-summary
转载于:https://blog.51cto.com/houzhiqing/1039969