其实在PE之间建立隧道通常有LSP和GRE,对于CCC的电路交换,则只能使用LSP,但是其他的×××基本上都可以使用GRE来作为隧道承载,在这个时候GRE的起止位置,恰恰对应了L2×××隧道的起止。
kompella方式的IBGP邻居必须GRE的公网IP所对应的隧道,这样才能让L2×××利用这个隧道。
martni方式则可以直接指派起止的隧道为GRE,就是在CE相关接口处制定
mpls l2vc 目标GRE对段公网IP   VCID
这样做的好处是便于扩展的应用,切记在GRE通道内不要配置IP否则协议会收到影响,还要使能MPLS否则无法解开L2×××的FRAME,导致网络不通最好将CE相关接口的MTU设置为1450,当然V5里有发现MTU的信令这样的话就省事了
闲着无聊于是做了一个LAB,图比较简单大家看了别图
下面是各设备的配置
PE1 :
[PE1-Tunnel1]dis cur
#
sysname PE1
#
cpu-usage cycle 1min
#
mpls lsr-id 11.11.11.11
#
mpls l2***
#
radius scheme system
#
mpls
#
mpls ldp
#
mpls ldp remote-peer 1
remote-ip 33.33.33.33
#
domain system
#
local-user admin
password cipher .]@USE=B,53Q=^Q`MAF4<1!!
service-type telnet terminal
level 3
service-type ftp                         
#
interface Aux0
async mode flow
#
interface Ethernet0/0
mtu 1450
ip address dhcp-alloc
mpls l2vc 33.33.33.33 100
#
interface Ethernet0/1
ip address dhcp-alloc
#
interface Serial0/0
clock DTECLK1
link-protocol ppp
ip address 1.1.1.1 255.255.255.252
mpls
#
interface Tunnel1
source 11.11.11.11
destination 33.33.33.33
keepalive 10 3
mpls
#                                         
interface NULL0
#
interface LoopBack1
ip address 11.11.11.11 255.255.255.255
#
ospf 1
area 0.0.0.0
   network 0.0.0.0 255.255.255.255
#
FTP server enable
#
user-interface con 0
user-interface aux 0
user-interface vty 0 4
authentication-mode scheme
#
--------------------------------------------
P
<P>dis cur
#
sysname P
#
cpu-usage cycle 1min
#
mpls lsr-id 22.22.22.22
#
radius scheme system
#
domain system
#
local-user admin
password cipher .]@USE=B,53Q=^Q`MAF4<1!!
service-type telnet terminal
level 3
service-type ftp
#
interface Aux0
async mode flow
#
interface Ethernet0/0
ip address 1.1.1.5 255.255.255.252
#
interface Ethernet0/1
ip address 192.168.10.1 255.255.255.0    
#
interface Serial0/0
link-protocol ppp
ip address 1.1.1.2 255.255.255.252
#
interface NULL0
#
interface LoopBack1
ip address 22.22.22.22 255.255.255.255
#
ospf 1
area 0.0.0.0
   network 1.1.1.0 0.0.0.255
   network 22.22.22.22 0.0.0.0
#
FTP server enable
#
user-interface con 0
user-interface aux 0
user-interface vty 0 4
authentication-mode scheme
#
return
--------------------------------------------------
PE2
[PE2]dis cur
#
sysname PE2
#
cpu-usage cycle 1min
#
mpls lsr-id 33.33.33.33
#
mpls l2***
#
radius scheme system
#
mpls
#
mpls ldp
#
mpls ldp remote-peer 1
remote-ip 11.11.11.11
#
domain system
#
local-user admin
password cipher .]@USE=B,53Q=^Q`MAF4<1!!
service-type telnet terminal
level 3
service-type ftp                         
#
interface Aux0
async mode flow
#
interface GigabitEthernet0/0/0
ip address 1.1.1.6 255.255.255.252
#
interface GigabitEthernet0/0/1
mtu 1450
ip address dhcp-alloc
mpls l2vc 11.11.11.11 100
#
interface GigabitEthernet0/0/2
ip address dhcp-alloc
#
interface Tunnel0
#
interface Tunnel1
source 33.33.33.33
destination 11.11.11.11
keepalive 10 3
mpls
#
interface NULL0                           
#
interface LoopBack1
ip address 33.33.33.33 255.255.255.255
#
ospf 1
area 0.0.0.0
   network 0.0.0.0 255.255.255.255
#
FTP server enable
#
user-interface con 0
user-interface aux 0
user-interface vty 0 4
authentication-mode scheme
#
return