ensp路由配置
ensp路由配置
(笔记)
实验设备:
IP规划
PC1:192.168.1.0/24
PC2:192.168.2.0/24
PC3:192.168.3.0/24
pc 1属于vlan 10
pc 2属于vlan 20
s
sys
[Huawei]vlan 10
[Huawei-vlan10]
[Huawei-vlan20]q
[Huawei]un in en
[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]port link-type access //将接口设置为access口
[Huawei-Ethernet0/0/1]port default vlan 10 //默认此接口允许vlan 10 通过
[Huawei-Ethernet0/0/1]q
[Huawei]int e0/0/2
[Huawei-Ethernet0/0/2]port link-type access //
[Huawei-Ethernet0/0/2]port default vlan 20 //默认此接口允许vlan 20 通过
[Huawei-Ethernet0/0/2]q
[Huawei]int e0/0/3
[Huawei-Ethernet0/0/3]port link-type trunk //设为Trunk口
[Huawei-Ethernet0/0/3]port trunk allow-pass vlan all //让这个接口允许所有vlan 通过。
R1
R1
sys
[Huawei]un in en
Info: Information center is disabled.
[Huawei]
[Huawei]int g0/0/0.1
[Huawei-GigabitEthernet0/0/0.1]ip add 192.168.1.1 24
[Huawei-GigabitEthernet0/0/0.1]q
[Huawei]int g0/0/0.1
[Huawei-GigabitEthernet0/0/0.1]dot1q termination vid 10
[Huawei-GigabitEthernet0/0/0.1]q
[Huawei]int g0/0/0.2
[Huawei-GigabitEthernet0/0/0.2]ip add 192.168.2.1 24
[Huawei-GigabitEthernet0/0/0.2]dot1q termination vid 20
[Huawei-GigabitEthernet0/0/0.2]q
[Huawei]
[Huawei]int g0/0/0.1
[Huawei-GigabitEthernet0/0/0.1]arp broadcast enable //开启广播报文
[Huawei-GigabitEthernet0/0/0.1]q
[Huawei]int g0/0/0.2
[Huawei-GigabitEthernet0/0/0.2]arp broadcast enable
[Huawei-GigabitEthernet0/0/0.2]q
[Huawei]
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 10.0.0.1 30
[Huawei-GigabitEthernet0/0/1]q
[Huawei]
[Huawei]ip route-static 192.168.3.0 24 10.0.0.2
R2
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]
[Huawei]un in en
[Huawei]
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 10.0.0.2 30
[Huawei-GigabitEthernet0/0/1]q
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 192.168.3.1 24
[Huawei-GigabitEthernet0/0/0]q
[Huawei]ip route-static 192.168.1.0 24 10.0.0.1
[Huawei]ip route-static 192.168.2.0 24 10.0.0.1