MPLSVPN实验手册.docx

上传人:b****8 文档编号:29633930 上传时间:2023-07-25 格式:DOCX 页数:72 大小:1.66MB
下载 相关 举报
MPLSVPN实验手册.docx_第1页
第1页 / 共72页
MPLSVPN实验手册.docx_第2页
第2页 / 共72页
MPLSVPN实验手册.docx_第3页
第3页 / 共72页
MPLSVPN实验手册.docx_第4页
第4页 / 共72页
MPLSVPN实验手册.docx_第5页
第5页 / 共72页
点击查看更多>>
下载资源
资源描述

MPLSVPN实验手册.docx

《MPLSVPN实验手册.docx》由会员分享,可在线阅读,更多相关《MPLSVPN实验手册.docx(72页珍藏版)》请在冰豆网上搜索。

MPLSVPN实验手册.docx

MPLSVPN实验手册

MPLSVPN(IGP)

使用的是BGPV4plus(MPBGP)+MPLS+VPN

MPLS_VPN

拓扑图

思路

1先配置接口确保直连能通

2在PE之间跑IGP协议

3在PE之间跑mpls

4在PE之间跑MP-BGP

5在PE上做VRF

6在PE和CE之间跑路由协议

7在VRF的IGP和MP-BGP之间进行重分发

1配置接口地址

该部分略

2PE之间做IGP协议

PE3(config)#routereigrp90

PE3(config-router)#noauto-summary

PE3(config-router)#network3.3.3.00.0.0.255

PE3(config-router)#network34.1.1.00.0.0.255

P4(config)#routereigrp90

P4(config-router)#noauto-summary

P4(config-router)#network34.1.1.00.0.0.255

P4(config-router)#network24.1.1.00.0.0.255

P4(config-router)#network4.4.4.00.0.0.255

P2(config)#routereigrp90

P2(config-router)#noauto-summary

P2(config-router)#network24.1.1.00.0.0.255

P2(config-router)#network25.1.1.00.0.0.255

P2(config-router)#network2.2.2.00.0.0.255

PE5(config)#routereigrp90

PE5(config-router)#noauto-summary

PE5(config-router)#network25.1.1.00.0.0.255

PE5(config-router)#network5.5.5.00.0.0.255

查看路由表

PE5#showiproute

Codes:

C-connected,S-static,R-RIP,M-mobile,B-BGP

D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterarea

N1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2

E1-OSPFexternaltype1,E2-OSPFexternaltype2

i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2

ia-IS-ISinterarea,*-candidatedefault,U-per-userstaticroute

o-ODR,P-periodicdownloadedstaticroute

Gatewayoflastresortisnotset

34.0.0.0/24issubnetted,1subnets

D34.1.1.0[90/332800]via25.1.1.2,00:

00:

12,Ethernet0/1

2.0.0.0/24issubnetted,1subnets

D2.2.2.0[90/409600]via25.1.1.2,00:

00:

12,Ethernet0/1

3.0.0.0/24issubnetted,1subnets

D3.3.3.0[90/460800]via25.1.1.2,00:

00:

12,Ethernet0/1

4.0.0.0/24issubnetted,1subnets

D4.4.4.0[90/435200]via25.1.1.2,00:

00:

12,Ethernet0/1

5.0.0.0/24issubnetted,1subnets

C5.5.5.0isdirectlyconnected,Loopback0

54.0.0.0/24issubnetted,1subnets

C54.1.1.0isdirectlyconnected,Ethernet0/2

53.0.0.0/24issubnetted,1subnets

C53.1.1.0isdirectlyconnected,Ethernet0/0

25.0.0.0/24issubnetted,1subnets

C25.1.1.0isdirectlyconnected,Ethernet0/1

24.0.0.0/24issubnetted,1subnets

D24.1.1.0[90/307200]via25.1.1.2,00:

00:

13,Ethernet0/1

PE5#

Ping测试

PE5#ping3.3.3.3

Typeescapesequencetoabort.

Sending5,100-byteICMPEchosto3.3.3.3,timeoutis2seconds:

!

!

!

!

!

Successrateis100percent(5/5),round-tripmin/avg/max=32/60/96ms

PE5#

PE5#ping4.4.4.4

Typeescapesequencetoabort.

Sending5,100-byteICMPEchosto4.4.4.4,timeoutis2seconds:

!

!

!

!

!

Successrateis100percent(5/5),round-tripmin/avg/max=20/41/68ms

PE5#

PE5#ping2.2.2.2

Typeescapesequencetoabort.

Sending5,100-byteICMPEchosto2.2.2.2,timeoutis2seconds:

!

!

!

!

!

Successrateis100percent(5/5),round-tripmin/avg/max=12/29/56ms

PE5#

3PE之间跑MPLS

PE3

PE3(config)#mplsip//mpls的总开关默认开启的必须是开启状态

PE3(config)#interfacee0/2

PE3(config-if)#mplsip//默认启用的就是ldp协议

PE4

P4(config)#mplsip

P4(config)#interfacee0/2

P4(config-if)#mplsip

P4(config)#interfacee0/0

P4(config-if)#mplsip

PE2

P2(config)#mplsip

P2(config)#interfacee0/0

P2(config-if)#mplsip

P2(config)#interfacee0/1

P2(config-if)#mplsip

PE5

PE5(config)#mplsip

PE5(config)#interfacee0/1

PE5(config-if)#mplsip

测试LDP邻居

PE3ldp邻居

PE3#showmplsldpneighbor

PeerLDPIdent:

4.4.4.4:

0;LocalLDPIdent3.3.3.3:

0

TCPconnection:

4.4.4.4.51518-3.3.3.3.646

State:

Oper;Msgssent/rcvd:

13/11;Downstream

Uptime:

00:

01:

32

LDPdiscoverysources:

Ethernet0/2,SrcIPaddr:

34.1.1.4

AddressesboundtopeerLDPIdent:

24.1.1.434.1.1.44.4.4.4

PE3#

P4的ldp邻居

P4#showmplsldpneighbor

PeerLDPIdent:

3.3.3.3:

0;LocalLDPIdent4.4.4.4:

0

TCPconnection:

3.3.3.3.646-4.4.4.4.51518

State:

Oper;Msgssent/rcvd:

11/13;Downstream

Uptime:

00:

01:

23

LDPdiscoverysources:

Ethernet0/2,SrcIPaddr:

34.1.1.3

AddressesboundtopeerLDPIdent:

13.1.1.323.1.1.334.1.1.33.3.3.3

PeerLDPIdent:

2.2.2.2:

0;LocalLDPIdent4.4.4.4:

0

TCPconnection:

2.2.2.2.646-4.4.4.4.11101

State:

Oper;Msgssent/rcvd:

11/11;Downstream

Uptime:

00:

00:

50

LDPdiscoverysources:

Ethernet0/0,SrcIPaddr:

24.1.1.2

AddressesboundtopeerLDPIdent:

24.1.1.225.1.1.22.2.2.2

P4#

P2的ldp邻居

P2#showmplsldpneighbor

PeerLDPIdent:

4.4.4.4:

0;LocalLDPIdent2.2.2.2:

0

TCPconnection:

4.4.4.4.11101-2.2.2.2.646

State:

Oper;Msgssent/rcvd:

10/10;Downstream

Uptime:

00:

00:

42

LDPdiscoverysources:

Ethernet0/0,SrcIPaddr:

24.1.1.4

AddressesboundtopeerLDPIdent:

24.1.1.434.1.1.44.4.4.4

PeerLDPIdent:

5.5.5.5:

0;LocalLDPIdent2.2.2.2:

0

TCPconnection:

5.5.5.5.33937-2.2.2.2.646

State:

Oper;Msgssent/rcvd:

10/12;Downstream

Uptime:

00:

00:

13

LDPdiscoverysources:

Ethernet0/1,SrcIPaddr:

25.1.1.5

AddressesboundtopeerLDPIdent:

53.1.1.525.1.1.554.1.1.55.5.5.5

P2#

PE5的ldp邻居

PE5#showmplsldpneighbor

PeerLDPIdent:

2.2.2.2:

0;LocalLDPIdent5.5.5.5:

0

TCPconnection:

2.2.2.2.646-5.5.5.5.33937

State:

Oper;Msgssent/rcvd:

12/10;Downstream

Uptime:

00:

00:

05

LDPdiscoverysources:

Ethernet0/1,SrcIPaddr:

25.1.1.2

AddressesboundtopeerLDPIdent:

24.1.1.225.1.1.22.2.2.2

PE5#

PE1#

PE1#configureterminal

PE1(config)#interfacefastethernet0/0

PE1(config-if)#ipaddress12.1.1.2255.255.255.0

PE1(config-if)#noshutdown

PE1(config-if)#interfacefastethernet0/1

PE1(config-if)#ipaddress23.1.1.2255.255.255.0

PE1(config-if)#noshutdown

PE1(config-if)#interfaceloopback0

PE1(config-if)#ipaddress2.2.2.2255.255.255.255

PE1(config-if)#exit

PE1(config)#routerospf110

PE1(config-router)#router-id2.2.2.2

PE1(config-router)#network23.1.1.00.0.0.255area0

PE1(config-router)#network2.2.2.00.0.0.255area0

PE1(config-router)#exit

PE1(config)#routerbgp100

PE1(config)#nobgpdefaultipv4-unicast//关闭后就不会再建立ipv4的单播邻居了而只建立vpnv4的邻居,要想再建立单播的邻居必须在ipv4的地址簇下再建立

PE1(config-router)#noauto-summary

PE1(config-router)#nosynchronization

PE1(config-router)#bgprouter-id2.2.2.2

PE1(config-router)#neighbor4.4.4.4remote-as100//要建立vpnv4的邻居就得用该命令

PE1(config-router)#neighbor4.4.4.4update-sourceloopback0

PE1(config-router)#address-familyvpnv4

PE1(config-router-af)#neighbor4.4.4.4active

PE1(config-router-af)#neighbor4.4.4.4send-communityextended//可以不敲此命令因为该命令neighbor4.4.4.4active敲上后就自动开启了

PE1(config-router-af)#exit

PE1(config-router)#exit

PE1(config)#ipvrfA

PE1(config-vrf)#rd1:

1

PE1(config-vrf)#route-target1:

1//导入和到处都是1:

1

PE1(config-vrf)#exit

PE1(config)#interfacefastethernet0/1

PE1(config-if)#ipvrfforwardingA

PE1(config-if)#ipaddress12.1.1.2255.255.255.0

PE1(config-if)#exit

PE1(config)#routerrip

PE1(config-router)#address-familyipv4vrfA

PE1(config-router-af)#noauto-summary

PE1(config-router-af)#version2

PE1(config-router-af)#network12.0.0.0

PE1(config-router-af)#redistributebgp100metrictransparent//不改变metric的情况传输

PE1(config-router-af)#exit

PE1(config-router)#exit

PE1(config)#routerbgp100

PE1(config-router)#address-familyipv4vrfA

PE1(config-router-af)#redistributerip

PE1(config-router-af)#exit

PE1(config-router)#exit

PE1(config)#ipcef

PE1(config)#mplsip

PE1(config)#mplslabelprotocolldp

PE1(config)#mplsldprouter-idloopback0

PE1(config)#interfacefastethernet0/1

PE1(config-if)#mplsip

PE1(config-if)#exit

PE1(config)#exit

PE1#

4PE之间建MP-BGP邻居

PE3

PE3(config)#routerbgp100

PE3(config-router)#nobgpdefaultipv4-unicast//关闭bgp进程下的默认ipv4行为,关闭后neighborx.x.x.xipv4地址remote-asas号就再也建立不起ipv4单播邻居了,除非进入ipv4单播的地址簇中建,如果不关闭的话那么MP-BGP和ipv4的单播bpg邻居一块都起来了,这里并不需要ipv4的单播邻居,所以就把它关闭

PE3(config-router)#bgprouter-id3.3.3.3

PE3(config-router)#noauto-summary

PE3(config-router)#nosynchronization

PE3(config-router)#neighbor5.5.5.5remote-as100

PE3(config-router)#address-familyvpnv4unicast

PE3(config-router-af)#neighbor5.5.5.5activate//激活MP-BGP邻居

PE3(config-router-af)#neighbor5.5.5.5send-communityextended//开启发送扩展属性的能力,因为MP-BGP发送的路由携带了RD属于扩展属性

PE5

PE5(config)#routerbgp100

PE5(config-router)#nobgpdefaultipv4-unicast

PE5(config-router)#bgprouter-id5.5.5.5

PE5(config-router)#noauto-summary

PE5(config-router)#nosynchronization

PE5(config-router)#neighbor3.3.3.3remote-as100

PE5(config-router)#neighbor3.3.3.3update-sourceloopback0

PE5(config-router)#address-familyvpnv4unicast

PE5(config-router-af)#neighbor3.3.3.3activate

查看MP-BGP邻居

PE3#showipbgpvpnv4allsummary

BGProuteridentifier3.3.3.3,localASnumber100

BGPtableversionis1,mainroutingtableversion1

NeighborVASMsgRcvdMsgSentTblVerInQOutQUp/DownState/PfxRcd

5.5.5.54100121210000:

09:

180

PE3#

PE5#showipbgpvpnv4allsummary

BGProuteridentifier5.5.5.5,localASnumber100

BGPtableversionis1,mainroutingtableversion1

NeighborVASMsgRcvdMsgSentTblVerInQOutQUp/DownState/PfxRcd

3.3.3.34100121210000:

09:

440

PE5#

5在PE上做VRF

PE3

PE3(config)#ipvrfA

PE3(config-vrf)#rd1:

1

PE3(config-vrf)#route-targetimport1:

1//导入的rt为1:

1,表示只接收从MP-BGP那边传来的rt为1:

1的路由,这边的导入等于那边的导出

PE3(config-vrf)#route-targetexport2:

2//导出的rt为2:

2,表示从vrfA中发布进MP-BGP的路由的rt为2:

2这边的导出等于那边的导入

PE3(config)#interfacee0/0

PE3(config-if)#ipvrfforwardingA//会洗刷掉之前配置的ip地址

PE3(config-if)#ipaddress13.1.1.3255.255.255.0

PE5

PE5(config)#ipvrfB

PE5(config-vrf)#rd10:

10

PE5(config-vrf)#route-targetimport2:

2

PE5(config-vrf)#route-targetexport1:

1

PE5(config)#interfacee0/0

PE5(config-if)#ipvrfforwardingB

PE5(config-if)#ipaddress53.1.1.5255.255.255.0

测试连通性

PE3#pingvrfA13.1.1.1

Typeescapesequencetoabort.

Sending5,100-byteICMPEchosto13.1.1.1,timeoutis2seconds:

.!

!

!

!

Successrateis80percent(4/5),round-tripmin/avg/max=16/29/60ms

PE3#

PE3#

PE5#pingvrfB53.1.1.3

Typeescapesequencetoabort.

Sending5,100-byteICMPEchosto53.1.1.3,

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 高等教育 > 管理学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1