实验名称:简单的单臂路由的 配置实验(华为)
实验拓扑:
实验需要:
1、按图中所示配置设网络备vlan,IP地址
2、能够使各pc互相ping通。
实验步骤:
1、配置终端设备:
pc1-pc5按照拓扑图中所示配置各个pc的ip地址。
网关配置为 192.168.x.254
2、配置网络设备
#配置交换设备(Lsw1)
1、创建vlan
vlan batch 10 20
2、配置端口模式以及加入的vlan
interface g0/0/1
port link-type access
port default vlan 10
interface g0/0/2
port link-type access
port default vlan 20
3、配置交换机之间的互联链路(trunk)
interface gi0/0/24
port link-type trunk
port trunk allow-pass vlan 10 20
#配置交换设备(Lsw2)
1、创建vlan
vlan batch 10 20
2、配置端口模式以及加入的vlan
interface g0/0/1
port link-type access
port default vlan 10
interface g0/0/2
port link-type access
port default vlan 20
3、配置交换机之间的互联链路(trunk)
interface gi0/0/24
port link-type trunk
port trunk allow-pass vlan 10 20
interface gi0/0/23
port link-type trunk
port trunk allow-pass vlan all
#配置路由器设备(AR1)
1、配置子端口,并定义对应的vlan
interface g0/0/1.1
dot1q termination vid 10
ip address 192.168.10.254 255.255.255.0
arp broadcast enable
interface g0/0/1.2
dot1q termination vid 20
ip address 192.168.20.254 255.255.255.0
arp broadcast enable
2、配置连接pc端的端口
interface g0/0/0
ip address 192.168.30.254 255.255.255.0
验证:
![](http://i2.51cto.com/images/blog/201811/21/a79963be03dbcb4dcd9fe03c019f2a05.jpg?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=)
pc1 ping通了pc5