一.实验目的
学会并使用单臂路由,并会配置
二.实验拓扑
一.实验步骤
1.为PC机配置IP,并设置网关
2.为路由器配置子接口,配置IP
3.配置SW1
四.实验内容
PC
SW1
<SW1>system-view
[SW1]sysname ZJSW1
[ZJSW1]vlan 10
[ZJSW1-vlan10]port Ethernet 0/4/1
[ZJSW1-vlan10]quit
[ZJSW1]vlan 20
[ZJSW1-vlan20]port Ethernet 0/4/2
[ZJSW1-vlan20]quit
[ZJSW1]vlan 30
[ZJSW1-vlan30]port Ethernet 0/4/3
[ZJSW1-vlan30]quit
[ZJSW1]vlan 40
[ZJSW1-vlan40]port Ethernet 0/4/4
[ZJSW1-vlan40]quit
[ZJSW1]interface Ethernet 0/4/0
[ZJSW1-Ethernet0/4/0]port link-type trunk
[ZJSW1-Ethernet0/4/0]port trunk permit vlan all
RT1
<RT1>system-view
[RT1]sysname ZJRT1
[ZJRT1]interface GigabitEthernet 0/0/0.1
[ZJRT1-GigabitEthernet0/0/0.1]ip address 1.1.1.254 24
[ZJRT1-GigabitEthernet0/0/0.1]vlan-type dot1q vid 10
[ZJRT1-GigabitEthernet0/0/0.1]quit
[ZJRT1]interface GigabitEthernet 0/0/0.2
[ZJRT1-GigabitEthernet0/0/0.2]ip address 2.2.2.254 24
[ZJRT1-GigabitEthernet0/0/0.2]vlan-type dot1q vid 20
[ZJRT1-GigabitEthernet0/0/0.2]quit
[ZJRT1]interface GigabitEthernet 0/0/0.3
[ZJRT1-GigabitEthernet0/0/0.3]ip address 3.3.3.254 24
[ZJRT1-GigabitEthernet0/0/0.3]vlan-type dot1q vid 30
[ZJRT1-GigabitEthernet0/0/0.3]quit
[ZJRT1]interface GigabitEthernet 0/0/0.4
[ZJRT1-GigabitEthernet0/0/0.4]ip address 4.4.4.254 24
[ZJRT1-GigabitEthernet0/0/0.4]vlan-type dot1q vid 40
[ZJRT1-GigabitEthernet0/0/0.4]quit
测试,查看PC夸网段夸VLAN能否通信
已经可以通信了,VLAN间通信可以使用单臂路由的办法