华为VPLS实验

该文描述了一个网络实验,通过配置OSPF作为IGP,MPLSLDP进行标签分发,然后设置VSI(虚拟交换实例)来实现路由器R1和R2以及交换机SW1和SW2之间的二层互通。实验步骤包括OSPF配置、MPLSLDP会话建立和VPLS的VSI配置,并通过ping命令验证了二层连通性。
摘要由CSDN通过智能技术生成

实验目的:使用vpls构建伪线使得sw1和sw2二层互通

拓扑如下在这里插入图片描述

配置思路

首先配置R1,R2,R3之间的IGP,我这里使用OSPF;其次在配置MPLS LDP;最后配置VSI

1. IGP

将R1,R2,R3的互联接口和换回接口通告进ospf

R1-R3测试联通性
<R1>ping -a 1.1.1.1 3.3.3.3
  PING 3.3.3.3: 56  data bytes, press CTRL_C to break
    Reply from 3.3.3.3: bytes=56 Sequence=1 ttl=254 time=40 ms
    Reply from 3.3.3.3: bytes=56 Sequence=2 ttl=254 time=80 ms
    Reply from 3.3.3.3: bytes=56 Sequence=3 ttl=254 time=60 ms
    Reply from 3.3.3.3: bytes=56 Sequence=4 ttl=254 time=50 ms
    Reply from 3.3.3.3: bytes=56 Sequence=5 ttl=254 time=90 ms

  --- 3.3.3.3 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 40/64/90 ms

<R1>

2.MPLS LDP

R1,R2,R3之间的互联接口使能MPLS LDP;R1-R3手动指定LDP会话

R1 配置
#
mpls lsr-id 1.1.1.1 
mpls
#
mpls ldp
#
interface GigabitEthernet0/0/2
 ip address 10.1.12.1 255.255.255.0
 ospf enable 1 area 0.0.0.0
 mpls
 mpls ldp
#
mpls ldp remote-peer 3.3.3.3 //手动指定对端PE
 remote-ip 3.3.3.3
#
验证LDP会话
<R1>dis mpls ldp session  //R1成功与R2,R3建立LDP会话

 LDP Session(s) in Public Network
 Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)
 A '*' before a session means the session is being deleted.
 ------------------------------------------------------------------------------
 PeerID             Status      LAM  SsnRole  SsnAge      KASent/Rcv
 ------------------------------------------------------------------------------
 2.2.2.2:0          Operational DU   Passive  0000:00:00  2/2
 3.3.3.3:0          NonExistent      Passive              0/0
 ------------------------------------------------------------------------------
 TOTAL: 2 session(s) Found.

3.VSI

R1和R2配置相同

R1配置
#
mpls l2vpn //使能mpls二层vpn
#
vsi 111 static //静态vsi
 pwsignal ldp // 信令方式为ldp
  vsi-id 1  //一个VPLS域内所有设备的VSI ID应配置为相同
  peer 3.3.3.3  //R3的ip
#
interface GigabitEthernet0/0/1 //接口绑定vsi,链接SW1的接口
 l2 binding vsi 111
#

验证

在R1查看VSI
<R1>display vsi name 111 
Vsi                             Mem    PW   Mac       Encap     Mtu   Vsi     
Name                            Disc   Type Learn     Type      Value State   
--------------------------------------------------------------------------
111                             static ldp  unqualify vlan      1500  up      
<R1>

SW1配置ip:10.1.1.1/24
SW2配置ip:10.1.1.2/24
在sw1上ping sw2
<Huawei>ping -a 10.1.1.1 10.1.1.2
  PING 10.1.1.2: 56  data bytes, press CTRL_C to break
    Reply from 10.1.1.2: bytes=56 Sequence=1 ttl=255 time=200 ms
    Reply from 10.1.1.2: bytes=56 Sequence=2 ttl=255 time=140 ms
    Reply from 10.1.1.2: bytes=56 Sequence=3 ttl=255 time=110 ms
    Reply from 10.1.1.2: bytes=56 Sequence=4 ttl=255 time=110 ms

  --- 10.1.1.2 ping statistics ---
    4 packet(s) transmitted
    4 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 110/140/200 ms

实验成功

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值