配置路由器的静态路由实现vlan间的互通,基于华为ensp

 文章目录

一、实验目的

二、实验设备

三、实验拓扑

四、实验步骤

五、实验结果


一、实验目的

掌握路由器配置静态路由实现vlan之间的通信。

二、实验设备

两台华为S5700、两台华为路由器AR3260、两台pc。

三、实验拓扑

配置路由器的静态路由实现vlan间的互通,基于华为ensp_第1张图片

四、实验步骤

交换机LSW1:

LSW1:
undo terminal monitor//关闭终端提示
system-view//进入系统视图模式
[Huawei]sysname S1//修改名字

[S1]vlan batch 10 11//创建vlan

[S1]interface  g 0/0/2//配置接口类型,划入vlan10中
[S1-GigabitEthernet0/0/2]port link-type access
[S1-GigabitEthernet0/0/2]port default vlan 10
[S1-GigabitEthernet0/0/2]quit

[S1]interface vlanif 10//配置valnif接口(网关)
[S1-Vlanif20]ip address 192.168.10.254 24
[S1-Vlanif20]quit

[S1]interface g 0/0/1//配置接口类型,划入vlan11中
[S1-GigabitEthernet0/0/1]port hybrid pvid vlan 11
[S1-GigabitEthernet0/0/1]port hybrid untagged vlan 10 11//剥离vlan标签
[S1-GigabitEthernet0/0/1]quit

[S1]interface vlanif 11
[S1-Vlanif21]ip address 192.168.11.1 24
[S1-Vlanif21]quit

[S1]ip route-static 0.0.0.0 0 192.168.11.254//配置静态路由

交换机LSW2:

LSW2:
undo terminal monitor
system-view
[Huawei]sysname S2

[S2]vlan batch 20 21

[S2]interface  g 0/0/2
[S2-GigabitEthernet0/0/2]port link-type access
[S2-GigabitEthernet0/0/2]port default vlan 20
[S2-GigabitEthernet0/0/2]quit

[S2]interface vlanif 20
[S2-Vlanif20]ip address 192.168.20.254 24
[S2-Vlanif20]quit

[S2]interface g 0/0/1
[S2-GigabitEthernet0/0/1]port hybrid pvid vlan 21
[S2-GigabitEthernet0/0/1]port hybrid untagged vlan 20 21
[S2-GigabitEthernet0/0/1]quit

[S2]interface vlanif 21
[S2-Vlanif21]ip address 192.168.21.1 24
[S2-Vlanif21]quit

[S2]ip route-static 0.0.0.0 0 192.168.21.254

路由器AR3:

AR3:
undo terminal monitor
system-view
[Huawei]sysname R3

[R3]iterfance g 0/0/0
[R3-GigabitEthernet0/0/0]ip address 200.100.200.6 29
[R3]interface g 0/0/1
[R3-GigabitEthernet0/0/1]ip address 192.168.11.254 24
[R3]interface g 0/0/2
[R3-GigabitEthernet0/0/2]ip address 192.168.21.254 24 

[R3]ip route-static 192.168.10.0 24 192.168.11.1
[R3]ip route-static 192.168.20.0 24 192.168.21.1

路由器AR2:

AR2:
undo terminal monitor
system-view
[Huawei]sysname R2

[R2]interface g 0/0/0
[R2-GigabitEthernet0/0/0]ip address 200.100.200.1 29

[R2]ip route-static 0.0.0.0 0 200.100.200.6

五、实验结果

pc2 (192.168.20.1)ping pc1(192.168.10.1),发现能ping通。

配置路由器的静态路由实现vlan间的互通,基于华为ensp_第2张图片


你可能感兴趣的:(华为,智能路由器,网络)