目标:链路聚合 Ip 配置 vlan划分(笔记回顾)

  2018 9-4

目标:链路聚合    Ip 配置    vlan划分

实例

目标:链路聚合 Ip 配置 vlan划分(笔记回顾)_第1张图片

要求:1 PC1&PC3属于VLAN5、

   2 PC2&PC4 属于VLAN6

   3 所有的PC网关配置在R1上

   4 实现所有PC互通

 

将线路连接并给个PC机配置IP 和子网掩码

   LSW3配置

  • 配置 0/0/6

       

   port link-type access

/*在只有一个VLAN通过的情况下接口设置成access*/

   port default vlan 6

/*设置0/0/6的接口为vlan6*/

  • 配置 0/0/5

port link-type access

/*设置接口为access*/

port default vlan 5

设置接口为vlan5

    (3)配置 0/0/2

interface GigabitEthernet0/0/2

       port link-type trunk

/*在多个vlan通过的条件下要将接口设置成trunk接口*/

 port trunk allow-pass vlan 2 to 2094

     (4)配置 0/0/1接口

port link-type trunk

         port trunk allow-pass vlan 2 to 4094

 

 

配置LSW4

 配置0/0/1接口

interface GigabitEthernet0/0/1

port link-type trunk

 port trunk allow-pass vlan 2 to 4094

配置0/0/5接口

interface Ethernet0/0/5

 port link-type access     

 port default vlan 5

  配置0/0/6接口

port link-type access

port default vlan 6

配置LSW1

配置0/0/1接口

interface GigabitEthernet0/0/1

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

配置0/0/2接口

interface GigabitEthernet0/0/2

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

聚合0/0/10和0/0/9

interface Eth-Trunk11

/*设置聚合接口,类型为Trunk并且将聚合接口的名字设置成11*/

trunkport GigabitEthernet 0/0/9 0/0/10

/*将0/0/9 和0/0/10 的接口进行聚合*/

port trunk allow-pass vlan all

/*允许所有VLAN通过*/

/*设置聚合

配置0/0/24接口

port link-type access

port default vlan 5

配置LSW2

配置0/0/1接口

port link-type trunk

port trunk allow-pass vlan 2 to 2094

配置0/0/2接口

port link-type trunk

port trunk allow-pass vlan 2 to 4094

聚合0/0/9和0/0/10接口

interface Eth-Trunk 12

trunkport GigabitEthernet 0/0/10 0/0/9

 

port trunk allow-pass

配置0/0/24接口

 

port link-type access

port default vlan 6

配置路由器

配置G0/0/1接口

interface gthernet0/0/1

ip address 10.0.1.100 24

配置E0/0/0接口

interface Ethernet0/0/1

ip address 10.0.5.100 24

配置G0/0/0接口

interface GigabitEthernet0/0/0

 ip address 10.0.2.100 255.255.255.0

注意事项

链路聚合的删除:

首先进入链路聚合口,将各个接口的命令撤回 undo trunkport GigabitEthernet + 接口号

再删除链路聚合口 unde interface Eth-Trunk 12 +聚合口号

将接口加入链路聚合的方法 : 再接口页面输入 命令eth-trunk +接口号

IP地址必须与网关对应

PC1和PC2 分别处在不同的网关中

你可能感兴趣的:(华为基础配置)