(3)单臂路由的测试(直接上手)

需求:实现不同vlan能够ping通

(3)单臂路由的测试(直接上手)

SW1配置:

The device is running!
//切换系统视图	
<Huawei>sy	
<Huawei>system-view 
//修改交换机名称	
[Huawei]sysname SW1


//批量划分vlan
[SW1]vla	
[SW1]vlan  b	
[SW1]vlan  batch 10 20


//关掉信息提示	
[SW1]undo in en	
//进接口配置access链路
[SW1]int e0/0/1进接口配置
[SW1-Ethernet0/0/1]p l a
[SW1-Ethernet0/0/1]p d v 10
[SW1-Ethernet0/0/1]un sh

[SW1-Ethernet0/0/1]int e0/0/2
[SW1-Ethernet0/0/2]p l a
[SW1-Ethernet0/0/2]p d v 20
[SW1-Ethernet0/0/2]un sh

//配置trunk链路
[SW1-Ethernet0/0/2]int e0/0/3
[SW1-Ethernet0/0/3]p l t
[SW1-Ethernet0/0/3]p t a v 10 20
[SW1-Ethernet0/0/3]un sh
Please Press ENTER.
//用户视图保存
<SW1>sav	
<SW1>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]:

R1路由器配置:

The device is running!
//进入形同视图
<Huawei>system-view 
//改路由器名称
[Huawei]sysname R1


//交换机可以子接口划分,直接进入子接口0.10,建议与vlan一致
[R1]int g0/0/0.10
//配置vlan封装结构,(dot1q为IEEE802.1q协议,该子接口属于vlan10)
[R1-GigabitEthernet0/0/0.10]dot1q termination  vid 10
//为该子接口添加ip地址(即vlan10下面所属主机的网关地址)
[R1-GigabitEthernet0/0/0.10]ip address 192.168.10.1 24
//	交换机可以子接口划分,直接进入子接口0.10,建议与vlan一致
[R1-GigabitEthernet0/0/0.10]int g0/0/0.20

//配置vlan封装结构,(dot1q为IEEE802.1q协议,该子接口属于vlan10)
[R1-GigabitEthernet0/0/0.20]dot1q termination  vid 20
//为改接口配置ip地址(地址是vlan20下面所属主机的网关地址)
[R1-GigabitEthernet0/0/0.20]ip add 192.168.20.1 24
//	//开启向下arp广播请求功能
[R1-GigabitEthernet0/0/0.20]ar	
[R1-GigabitEthernet0/0/0.20]arp
Jun  1 2021 11:52:34-08:00 R1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 7, the ch
ange loop count is 0, and the maximum number of records is 4095. b	
[R1-GigabitEthernet0/0/0.20]arp broadcast  e	
[R1-GigabitEthernet0/0/0.20]arp broadcast  enable 

//上面vlan10 的子接口配置没有广播,进入子接口进行广播
[R1-GigabitEthernet0/0/0.20]int g0/0/0.10
[R1-GigabitEthernet0/0/0.10]arp broadcast  enable 
[R1-GigabitEthernet0/0/0.10]q
[R1]q
<R1>sa	
<R1>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]:
Jun  1 2021 12:01:46-08:00 R1 %%01CFM/4/SAVE(l)[2]:The user chose Y when decidin
g whether to save the configuration to the device.

然后配置电脑ip,网关,子网掩码进行ping测试:

(3)单臂路由的测试(直接上手)

(3)单臂路由的测试(直接上手)

(3)单臂路由的测试(直接上手)

搞定!!

上一篇:鼠标移入 移出div div会消失的处理


下一篇:华为单臂路由配置