码迷,mamicode.com
首页 > 其他好文 > 详细

三层链路捆绑实例

时间:2020-05-20 14:03:56      阅读:131      评论:0      收藏:0      [点我收藏+]

标签:byte   art   打开   注意   lin   lan   eth-trunk   路由   ttl   

一. 链路捆绑实现冗余功能实验
1.在华为模拟器ensp上设置两个普通路由器,两个交换机,四台PC
先打开ensp ,新建2个路由器和2个pc用户,分别用网线连接,如下图
技术图片

  1. 配置LSW1 LACP
    配置lacp
    [SW1]lacp priority 1000
    [SW1]int Eth-Trunk 1
    [SW1-Eth-Trunk1]bpdu enable
    [SW1-Eth-Trunk1]mode lacp-static
    [SW1-Eth-Trunk1]max active-linknumber 2
    [SW1-Eth-Trunk1]q
    [SW1]vlan batch 10 20
    [SW1]int Eth-Trunk 1
    [SW1-Eth-Trunk1]trunkport e 0/0/20 to 0/0/22
    [SW1-Eth-Trunk1]p l t
    [SW1-Eth-Trunk1]p t a v a
    [SW1-Eth-Trunk1]un sh
    [SW1-Eth-Trunk1]dis eth-trunk 1
    Least Active-linknumber: 1  Max Active-linknumber: 2                         
    Ethernet0/0/20         Unselect 100M     32768   21     289     10100010  1     
    Ethernet0/0/21         Unselect 100M     32768   22     289     10100010  1     
    Ethernet0/0/22         Unselect 100M     32768   23     289     10100010  1
    [SW1-Eth-Trunk1]dis int brief
    Eth-Trunk1                  down  down        0%     0%          0          0
    Ethernet0/0/20            up    up          0%     0%          0          0
    Ethernet0/0/21            up    up          0%     0%          0          0
    Ethernet0/0/22            up    up          0%     0%          0          0

    配置Trunk 2

    [SW1]int Eth-Trunk 2
    [SW1-Eth-Trunk2]trunkport g 0/0/1 to 0/0/2
    [SW1-Eth-Trunk2]p l a
    [SW1-Eth-Trunk2]p d v 10
    [SW1-Eth-Trunk2]un sh
    [SW1]dis eth-trunk 2
    Eth-Trunk2                  up    up          0%     0%          0          0
    GigabitEthernet0/0/1      up    up          0%     0%          0          0
    GigabitEthernet0/0/2      up    up          0%     0%          0          0

配置接PC的连个口

[SW1-Eth-Trunk1]q
[SW1]int e0/0/1
[SW1-Ethernet0/0/1]p l a
[SW1-Ethernet0/0/1]p d v 10
[SW1-Ethernet0/0/1]un sh
[SW1-Ethernet0/0/1]int e0/0/2
[SW1-Ethernet0/0/2]p l a
[SW1-Ethernet0/0/2]p d v 20
[SW1-Ethernet0/0/2]undo sh
  1. 配置LSW2
    [SW2] int Eth-Trunk 1
    [SW2Eth-Trunk1]bpdu enable
    [SW2Eth-Trunk1]mode lacp-static
    [SW2-Eth-Trunk1]trunkport e 0/0/20 to 0/0/22
    [SW2-Eth-Trunk1]p l t
    [SW2-Eth-Trunk1]p t a v a
    [SW2-Eth-Trunk1]un sh
    [SW2-Eth-Trunk1]int Eth-Trunk 2
    [SW2-Eth-Trunk2]trunkport g 0/0/1 to 0/0/2
    [SW2-Eth-Trunk2]p l a
    [SW2-Eth-Trunk2]p d v 20
    [SW2-Eth-Trunk2]un sh
    [SW2]int e0/0/1
    [SW2-Ethernet0/0/1]p l a
    [SW2-Ethernet0/0/1]p d v 10
    [SW2-Ethernet0/0/1]undo sh
    [SW2-Ethernet0/0/1]int e0/0/2
    [SW2-Ethernet0/0/2]p l a
    [SW2-Ethernet0/0/2]p d v 20
    [SW2-Ethernet0/0/2]un sh
    [SW2-Ethernet0/0/2]dis int brief
    Eth-Trunk1                  up    up          0%     0%          0          0
    Ethernet0/0/20            up    up          0%     0%          0          0
    Ethernet0/0/21            up    up          0%     0%          0          0
    Ethernet0/0/22            up    up          0%     0%          0          0
    Eth-Trunk2                  up    up          0%     0%          0          0
    GigabitEthernet0/0/1      up    up          0%     0%          0          0
    GigabitEthernet0/0/2      up    up          0%     0%          0          0

    4.配置R1

    [R1]interface Eth-Trunk 1
    [R1-Eth-Trunk1]trunkport g 0/0/2 to 0/0/3
    [R1-Eth-Trunk1]ip add 12.0.0.1 30
    [R1-Eth-Trunk1]un sh
    [R1-Eth-Trunk1]interface Eth-Trunk 2
    [R1-Eth-Trunk2]trunkport g 0/0/0 to 0/0/1
    [R1-Eth-Trunk2]ip add 192.168.10.1 24
    [R1-Eth-Trunk2]un sh
    [R1-Eth-Trunk2]dis int brief
    Eth-Trunk1                  up    up          0%     0%          0          0
    GigabitEthernet0/0/2      up    up          0%     0%          0          0
    GigabitEthernet0/0/3      up    up          0%     0%          0          0
    Eth-Trunk2                  up    up          0%     0%          0          0
    GigabitEthernet0/0/0      up    up          0%     0%          0          0
    GigabitEthernet0/0/1      up    up          0%     0%          0          0

    配置静态路由

    [R1]ip route-static 192.168.20.0 24 12.0.0.2
    [R1]ping 192.168.10.20
    PING 192.168.10.20: 56  data bytes, press CTRL_C to break
    Reply from 192.168.10.20: bytes=56 Sequence=1 ttl=128 time=180 ms
    [R1]ping 192.168.10.10
    PING 192.168.10.10: 56  data bytes, press CTRL_C to break
    Reply from 192.168.10.10: bytes=56 Sequence=1 ttl=128 time=140 ms
    Reply from 192.168.10.10: bytes=56 Sequence=2 ttl=128 time=60 ms

    5.配置R2

    [R2]interface Eth-Trunk 1
    [R2-Eth-Trunk1]trunkport g 0/0/2 to 0/0/3
    [R2-Eth-Trunk1]ip add 12.0.0.2 30
    [R2-Eth-Trunk1]un sh
    [R2-Eth-Trunk1]int eth-trunk 2
    [R2-Eth-Trunk2]trunkport g 0/0/0 to 0/0/1
    [R2-Eth-Trunk2]ip add 192.168.20.1 24
    [R2-Eth-Trunk2]un sh
    [R2-Eth-Trunk2]ip route-static 192.168.10.0 24 12.0.0.1
    [R2]ping 12.0.0.1
    PING 12.0.0.1: 56  data bytes, press CTRL_C to break
    Reply from 12.0.0.1: bytes=56 Sequence=1 ttl=255 time=60 ms
    Reply from 12.0.0.1: bytes=56 Sequence=2 ttl=255 time=30 ms

    6.主机配置注意网关地址一定要填
    如PC1 10.10网关时10.1
    技术图片
    7.互通性测试
    每台主机Ping 其他三台都能通,则ok.
    以上。

三层链路捆绑实例

标签:byte   art   打开   注意   lin   lan   eth-trunk   路由   ttl   

原文地址:https://blog.51cto.com/14625831/2496798

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!