H3C 路由器配置單臂路由實(shí)現(xiàn)不同vlan之間相互通信
本次單臂路由實(shí)驗(yàn)依舊采用H3C Cloud Lab軟件進(jìn)行模擬,網(wǎng)絡(luò)拓?fù)鋱D如下:

其中:S6850_1交換機(jī)作為二層交換機(jī)使用,VSR-88_2路由器上利用單臂路由配置PC_3和PC_4的網(wǎng)關(guān),PC_3 vlan劃分為vlan10,IP地址192.168.1.1、子網(wǎng)掩碼為255.255.255.0、網(wǎng)關(guān)192.168.1.254,PC_4vlan劃分為vlan20 IP地址192.168.2.1、子網(wǎng)掩碼255.255.255.0、網(wǎng)關(guān)192.168.2.254。
開始配置S6850_1交換機(jī):
[H3C]interface GigabitEthernet 1/0/1
[H3C-GigabitEthernet1/0/1]port link-type access
[H3C-GigabitEthernet1/0/1]port access vlan 10
[H3C]interface GigabitEthernet 1/0/2
[H3C-GigabitEthernet1/0/2]port link-type access
[H3C-GigabitEthernet1/0/2]port access vlan 20
[H3C]interface GigabitEthernet 1/0/3
[H3C-GigabitEthernet1/0/3]port link-type trunk
[H3C-GigabitEthernet1/0/3]port trunk permit vlan 10 20
配置完成后在系統(tǒng)試圖下輸入dis cu查看設(shè)備配置情況如下圖:
[H3C]display current-configuration

開始配置VSR-88_2路由器:
進(jìn)入0/0/0接口的子接口0.1
[H3C]interface GigabitEthernet 0/0/0.1
配置0.1子接口的ip地址及子網(wǎng)掩碼
[H3C-GigabitEthernet0/0/0.1]ip address 192.168.1.254 24
為子接口0.1配置vlan10
[H3C-GigabitEthernet0/0/0.1]vlan-type dot1q vid 10
進(jìn)入0/0/0接口的子接口0.2
[H3C]int GigabitEthernet 0/0/0.2
配置0.2子接口的ip地址及子網(wǎng)掩碼
[H3C-GigabitEthernet0/0/0.2]ip address 192.168.2.254 24
為子接口0.2配置vlan20
[H3C-GigabitEthernet0/0/0.2]vlan-type dot1q vid 20
配置完成后在系統(tǒng)試圖下輸入dis cu查看設(shè)備配置情況如下圖:
[H3C]display current-configuration

設(shè)置完成后ping測一下:
PC_3pingPC_4如下圖:

PC_4pingPC_3如下圖:
