华为eNSP单臂路由实验实操笔记
一、实验准备
1、主机1:VLAN 10,ip:192.168.10.1/24,网关:192.168.10.254/24;
2、主机2:VLAN 20,ip:192.168.20.1/24,网关:192.168.20.254/24;
3、交换机LSW1:通过trunk接入路由器R1,access下联到主机A和主机B;
4、路由器R1配置单臂路由,实现主机1和主机2不同网段互访;
5、实验拓扑:
二、配置过程
1、R1配置:
(1)配置VLAN 10子接口以及网关、打开arp广播使能
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int g0/0/0.10
[Huawei-GigabitEthernet0/0/0.10]dot1q termination vid 10
[Huawei-GigabitEthernet0/0/0.10]arp broadcast enable
Info: This interface has already been configured with ARP broadcast.
[Huawei-GigabitEthernet0/0/0.10]ip address 192.168.10.254 24
[Huawei-GigabitEthernet0/0/0.10]
(2)配置VLAN 20子接口以及网关、打开arp广播使能
[Huawei]int g0/0/0.20
[Huawei-GigabitEthernet0/0/0.20]dot1q termin vid 20
[Huawei-GigabitEthernet0/0/0.20]ip address 192.168.20.254 24
Aug 21 2022 22:14:29-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
IP on the interface GigabitEthernet0/0/0.20 has entered the UP state.
[Huawei-GigabitEthernet0/0/0.20]arp broadcast ena
[Huawei-GigabitEthernet0/0/0.20]
(3)路由器命名及配置保存
[Huawei]sysname R1
[R1]qui
<R1>save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait........
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
2、交换机LSW1配置:
(1)交换机命名以及创建VLAN 10和20
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname LSW1
[LSW1]vlan 10
[LSW1-vlan10]vlan 20
[LSW1-vlan20]
(2)交换机端口类型以及VLAN配置
[LSW1]int g0/0/1
[LSW1-GigabitEthernet0/0/1]port link-type trunk
[LSW1-GigabitEthernet0/0/1]description to R1
[LSW1-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 20
[LSW1]int g0/0/2
[LSW1-GigabitEthernet0/0/2]port link-type access
[LSW1-GigabitEthernet0/0/2]port default vlan 10
[LSW1-GigabitEthernet0/0/2]description to PC1
[LSW1]int g0/0/3
[LSW1-GigabitEthernet0/0/2]port link-type access
[LSW1-GigabitEthernet0/0/2]port default vlan 20
[LSW1-GigabitEthernet0/0/2]description to PC2
(3)交换机配置保存
[LSW1-GigabitEthernet0/0/3]qui
[LSW1]qui
<LSW1>sav
<LSW1>save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]:
Aug 21 2022 22:24:25-08:00 LSW1 %%01CFM/4/SAVE(l)[0]:The user chose Y when decid
ing whether to save the configuration to the device.
<LSW1>
3、PC1和PC2网卡配置及连通性验证:
(1)PC1网卡配置
(2)PC2网卡配置
(3)连通性验证
版权声明
本文仅代表作者观点,不代表博信信息网立场。