1MPLS L3VPN典型配置举例Word文档下载推荐.docx
- 文档编号:7432262
- 上传时间:2023-05-08
- 格式:DOCX
- 页数:26
- 大小:53.43KB
1MPLS L3VPN典型配置举例Word文档下载推荐.docx
《1MPLS L3VPN典型配置举例Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《1MPLS L3VPN典型配置举例Word文档下载推荐.docx(26页珍藏版)》请在冰点文库上搜索。
[PE1-LoopBack0]quit
[PE1]vlan2
[PE1-vlan2]portgigabitethernet1/0/2
[PE1-vlan2]quit
[PE1]interfacevlan-interface2
[PE1-Vlan-interface2]ipaddress10.1.1.124
[PE1-Vlan-interface2]quit
[PE1]ospf
[PE1-ospf-1]area0
[PE1-ospf-1-area-0.0.0.0]network10.1.1.00.0.0.255
[PE1-ospf-1-area-0.0.0.0]network1.1.1.90.0.0.0
[PE1-ospf-1-area-0.0.0.0]quit
[PE1-ospf-1]quit
#配置P。
P>
[P]interfaceloopback0
[P-LoopBack0]ipaddress2.2.2.932
[P-LoopBack0]quit
[P]vlan2
[P-vlan2]portgigabitethernet1/0/2
[P-vlan2]quit
[P]vlan5
[P-vlan5]portgigabitethernet1/0/3
[P-vlan5]quit
[P]interfacevlan-interface2
[P-Vlan-interface2]ipaddress10.1.1.224
[P-Vlan-interface2]quit
[P]interfacevlan-interface5
[P-Vlan-interface5]ipaddress10.1.4.124
[P-Vlan-interface5]quit
[P]ospf
[P-ospf-1]area0
[P-ospf-1-area-0.0.0.0]network10.1.1.00.0.0.255
[P-ospf-1-area-0.0.0.0]network10.1.4.00.0.0.255
[P-ospf-1-area-0.0.0.0]network2.2.2.90.0.0.0
[P-ospf-1-area-0.0.0.0]quit
[P-ospf-1]quit
#配置PE2。
PE2>
[PE2]interfaceloopback0
[PE2-LoopBack0]ipaddress3.3.3.932
[PE2-LoopBack0]quit
[PE2]vlan5
[PE2-vlan5]portgigabitethernet1/0/1
[PE2-vlan5]quit
[PE2]interfacevlan-interface5
[PE2-Vlan-interface5]ipaddress10.1.4.224
[PE2-Vlan-interface5]quit
[PE2]ospf
[PE2-ospf-1]area0
[PE2-ospf-1-area-0.0.0.0]network10.1.4.00.0.0.255
[PE2-ospf-1-area-0.0.0.0]network3.3.3.90.0.0.0
[PE2-ospf-1-area-0.0.0.0]quit
[PE2-ospf-1]quit
配置完成后,PE1、P、PE2之间应能建立OSPF邻居,执行displayospfpeer命令可以看到邻居达到FULL状态。
执行displayiprouting-table命令可以看到PE之间学习到对方的Loopback路由。
以PE1为例:
[PE1]displayiprouting-table
RoutingTables:
Public
Destinations:
8Routes:
8
Destination/MaskProtoPreCostNextHopInterface
1.1.1.9/32Direct00127.0.0.1InLoop0
2.2.2.9/32OSPF10110.1.1.2Vlan2
3.3.3.9/32OSPF10210.1.1.2Vlan2
10.1.1.0/24Direct0010.1.1.1Vlan2
10.1.1.1/32Direct00127.0.0.1InLoop0
10.1.4.0/24OSPF10210.1.1.2Vlan2
127.0.0.0/8Direct00127.0.0.1InLoop0
127.0.0.1/32Direct00127.0.0.1InLoop0
[PE1]displayospfpeerverbose
OSPFProcess1withRouterID1.1.1.9
Neighbors
Area0.0.0.0interface10.1.1.1(Vlan-interface2)'
sneighbors
RouterID:
2.2.2.9Address:
10.1.1.2GRState:
Normal
State:
FullMode:
NbrisMasterPriority:
1
DR:
10.1.1.1BDR:
10.1.1.2MTU:
0
Deadtimerduein35sec
Neighborisupfor00:
04:
03
AuthenticationSequence:
[0]
Neighborstatechangecount:
5
(2)在MPLS骨干网上配置MPLS基本能力和MPLSLDP,建立LDPLSP
[PE1]mplslsr-id1.1.1.9
[PE1]mpls
[PE1-mpls]quit
[PE1]mplsldp
[PE1-mpls-ldp]quit
[PE1-Vlan-interface2]mpls
[PE1-Vlan-interface2]mplsldp
[P]mplslsr-id2.2.2.9
[P]mpls
[P-mpls]quit
[P]mplsldp
[P-mpls-ldp]quit
[P-Vlan-interface2]mpls
[P-Vlan-interface2]mplsldp
[P-Vlan-interface5]mpls
[P-Vlan-interface5]mplsldp
[PE2]mplslsr-id3.3.3.9
[PE2]mpls
[PE2-mpls]quit
[PE2]mplsldp
[PE2-mpls-ldp]quit
[PE2-Vlan-interface5]mpls
[PE2-Vlan-interface5]mplsldp
上述配置完成后,PE1、P、PE2之间应能建立LDP会话,执行displaymplsldpsession命令可以看到显示结果中SessionState项为Operational。
执行displaymplsldplsp命令,可以看到LDPLSP的建立情况。
[PE1]displaymplsldpsession
LDPSession(s)inPublicNetwork
Totalnumberofsessions:
2
------------------------------------------------------------------------------
Peer-IDStatusSsnRoleFTMD5KA-Sent/Rcv
2.2.2.9:
0OperationalPassiveOffOff31/31
3.3.3.9:
0OperationalPassiveOffOff25/25
FT:
FaultTolerance
[PE1]displaymplsldplsp
LDPLSPInformation
-------------------------------------------------------------------------------
SNDestAddress/MaskIn/OutLabelNext-HopIn/Out-Interface
11.1.1.9/323/NULL127.0.0.1-------/InLoop0
22.2.2.9/32NULL/310.1.1.2-------/Vlan2
33.3.3.9/32NULL/102810.1.1.2-------/Vlan2
410.1.4.0/24NULL/102610.1.1.2-------/Vlan2
-------------------------------------------------------------------------------
A'
*'
beforeanLSPmeanstheLSPisnotestablished
beforeaLabelmeanstheUSCBorDSCBisstale
>
'
beforeanLSPmeanstheLSPmaybeinactive
(3)在PE设备上配置VPN实例,并配置与之连接的CE
#在PE1上为CustomerA创建VPN实例,名为“customerA”。
[PE1]ipvpn-instancecustomerA
[PE1-vpn-instance-customerA]
#为该实例配置RD为100:
1,用于在公网传输该VPN路由时,能够以VPNv4地址进行交互,从而使对方CE能够正确识别。
(RD必须在MPLS网络中全局唯一)
[PE1-vpn-instance-customerA]route-distinguisher100:
1
#为该VPN实例配置VPNTarget属性,其中接收路由的属性为111:
1,发布路由的属性为222:
1。
(此处为表示接收和发送属性的含义,取值有所不同,为便于管理,用户可以将接收和发送的属性配置为相同的值)
[PE1-vpn-instance-customerA]vpn-target111:
1import-extcommunity
[PE1-vpn-instance-customerA]vpn-target222:
1export-extcommunity
[PE1-vpn-instance-customerA]quit
#按同样方式为CustomerB创建VPN实例,名为“customerB”,并为其配置RD为200:
1,接收和发送的VPNTarget属性分别为333:
1和444:
[PE1]ipvpn-instancecustomerB
[PE1-vpn-instance-customerB]route-distinguisher200:
[PE1-vpn-instance-customerB]vpn-target333:
[PE1-vpn-instance-customerB]vpn-target444:
[PE1-vpn-instance-customerB]quit
#配置Vlan-interface100与VPN实例customerA进行绑定。
[PE1]vlan100
[PE1-vlan100]portgigabitethernet1/0/1
[PE1-vlan100]quit
[PE1]interfacevlan-interface100
[PE1-Vlan-interface100]ipbindingvpn-instancecustomerA
[PE1-Vlan-interface100]ipaddress100.1.1.224
[PE1-Vlan-interface100]quit
#配置Vlan-interface200与VPN实例customerB进行绑定。
[PE1]vlan200
[PE1-vlan200]portgigabitethernet1/0/3
[PE1-vlan200]quit
[PE1]interfacevlan-interface200
[PE1-Vlan-interface200]ipbindingvpn-instancecustomerB
[PE1-Vlan-interface200]ipaddress200.1.1.224
[PE1-Vlan-interface200]quit
#在PE2上为CustomerA创建VPN实例,名为“customerA”。
[PE2]ipvpn-instancecustomerA
[PE2-vpn-instance-customerA]
#为该VPN实例配置RD,建议与PE1上为该实例配置的RD保持一致。
[PE2-vpn-instance-customerA]route-distinguisher100:
#为该VPN实例配置VPNTarget,需要注意的是接收和发送的属性要分别与PE1上配置的发送和接收的属性保持一致。
[PE2-vpn-instance-customerA]vpn-target222:
[PE2-vpn-instance-customerA]vpn-target111:
[PE2-vpn-instance-customerA]quit
#按同样方式配置VPN实例“customerB”,并配置相应的RD和VPNTarget。
[PE2]ipvpn-instancecustomerB
[PE2-vpn-instance-customerB]route-distinguisher200:
[PE2-vpn-instance-customerB]vpn-target444:
[PE2-vpn-instance-customerB]vpn-target333:
#分别将Vlan-interface101和Vlan-interface202与customerA和customerB实例进行绑定。
[PE2-vpn-instance-customerB]quit
[PE2]interfacevlan-interface101
[PE2-Vlan-interface101]ipbindingvpn-instancecustomerA
[PE2-Vlan-interface101]ipaddress101.1.1.124
[PE2-Vlan-interface101]quit
[PE2]interfacevlan-interface202
[PE2-Vlan-interface202]ipbindingvpn-instancecustomerB
[PE2-Vlan-interface202]ipaddress202.1.1.224
[PE2-Vlan-interface202]quit
#按图1配置各CE的接口IP地址,配置过程略。
配置完成后,在PE设备上执行displayipvpn-instance命令可以看到VPN实例的配置情况。
各PE能ping通自己接入的CE。
以PE1和CE1为例:
[PE1]displayipvpn-instance
TotalVPN-Instancesconfigured:
VPN-InstanceNameRDCreatetime
customerA100:
12013/04/2618:
44:
44
customerB200:
45:
12
[PE1]ping-vpn-instancecustomerA100.1.1.1
PING100.1.1.1:
56databytes,pressCTRL_Ctobreak
Replyfrom100.1.1.1:
bytes=56Sequence=0ttl=255time=6ms
bytes=56Sequence=1ttl=255time=2ms
bytes=56Sequence=2ttl=255time=2ms
bytes=56Sequence=3ttl=255time=2ms
bytes=56Sequence=4ttl=255time=3ms
---100.1.1.1pingstatistics---
5packet(s)transmitted
5packet(s)received
0.00%packetloss
round-tripmin/avg/max=2/3/6ms
(4)在PE与CE之间配置路由交换,本例中以使用EBGP为例
#在CE1上创建BGP进程65410,并指定PE1为对等体,对等体自治系统号为100。
CE1>
[CE1]bgp65410
[CE1-bgp]peer100.1.1.2as-number100
#将CE1上连接站点的直连接口路由引入EBGP。
[CE1-bgp]import-routedirect
[CE1-bgp]quit
#在PE1上创建BGP进程100,将VPN实例customerA与IPv4地址族进行关联。
[PE1]bgp100
[PE1-bgp]ipv4-familyvpn-instancecustomerA
#将CE1指定为对等体,并将CE1的直连路由引入到BGP-VPN实例路由表中。
[PE1-bgp-ipv4-customerA]peer100.1.1.1as-number65410
[PE1-bgp-ipv4-customerA]import-routedirect
[PE1-bgp-ipv4-customerA]quit
#在CE2上创建BGP进程65420,并指定PE1为对等体,自治系统号为100。
CE2>
[CE2]bgp65420
[CE2-bgp]peer200.1.1.2as-number100
#将CE2上连接站点的直连接口路由引入EBGP。
[CE2-bgp]import-routedirect
[CE2-bgp]quit
#在PE1上的BGP进程100中,将VPN实例customerB与IPv4地址族进行关联。
[PE1-bgp]ipv4-familyvpn-instancecustomerB
#将CE2指定为对等体,并将CE2的直连路由引入到BGP-VPN实例路由表中。
[PE1-bgp-ipv4-customerB]peer200.1.1.1as-nu
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- MPLS L3VPN典型配置举例 L3VPN 典型 配置 举例