华为模拟器-三次交换机、链路捆绑、单臂路由综合实验

华为模拟器-三次交换机、链路捆绑、单臂路由综合实验


在这里插入图片描述

交换机SW1命令

划分vlan
[Huawei]vlan batch  10 20
interface Ethernet0/0/1
port link-type access 
port default vlan  10

interface Ethernet0/0/2
 port link-type access
 port default vlan 20
 
 配置trunk
 interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan all
 
 interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094

交换机SW2命令

划分vlan
[Huawei]vlan batch 10 20
interface Ethernet0/0/3
 port link-type access
 port default vlan 10
  配置trunk
 interface Ethernet0/0/4
 port link-type access
 port default vlan 20
 
 interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094

交换机SW3命令

划分vlan
[Huawei]vlan batch 10 20 30
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
 
 interface GigabitEthernet0/0/2
 port link-type access
 port default vlan 30
 
 在三层交换机的vlanif里配置网关和直连路由的IP地址
 interface Vlanif10
 ip address 192.168.10.1 255.255.255.0
 
  interface Vlanif20
 ip address 192.168.20.1 255.255.255.0
 
 interface Vlanif30
 ip address 12.0.0.1 255.255.255.252
 配置默认路由
ip route-static 0.0.0.0 0.0.0.0 12.0.0.2

交换机SW4命令

划分vlan
interface Ethernet0/0/1
port link-type access
port default vlan 30
 
interface Ethernet0/0/2
port link-type access
port default vlan 40

将g0/0/1到g0/0/2接口进行链路捆绑,并且设置为trunk口,允许所有vlan通过。
[Huawei]int Eth-Trunk 1
[Huawei-Eth-Trunk1]trunkport g 0/0/1 to 0/0/2
[Huawei-Eth-Trunk1]port link-type  trunk 
[Huawei-port-group-trunk]port trunk allow-pass vlan all 
[Huawei-port-group-trunk]un sh

路由器R1命令

[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 12.0.0.2 30
[Huawei]int Eth-Trunk 1
[Huawei-Eth-Trunk1]trunkport GigabitEthernet 0/0/1 to 0/0/2

将路由器R1设置成单臂路由。
interface Eth-Trunk1.30
 dot1q termination vid 30
 ip address 192.168.30.1 255.255.255.0
 arp broadcast enable
 
interface Eth-Trunk1.40
 dot1q termination vid 40
 ip address 192.168.40.1 255.255.255.0
 arp broadcast enable

在这里插入图片描述

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值