[HCIA]VLAN实验

1.实验拓扑
[HCIA]VLAN实验_第1张图片
2.实验要求
VLAN 2 192.168.1.0/24
VLAN 3 192.168.2.0/24
VLAN之内可以通信,VLAN间也可以通信
3.实验分析
1)创建VLAN
2)接口划入
3)TRUNK干道
4)单臂路由
上面的技术都需要配置
4.实验过程
1)创建VLAN

[sw1]vlan 2
[sw1]vlan 3

2)接口(接用户的接口)划入VLAN
sw1

[sw1]int g 0/0/1
[sw1-GigabitEthernet0/0/1]port link-type access 
[sw1-GigabitEthernet0/0/1]port default vlan 2
[sw1]int g 0/0/2 
[sw1-GigabitEthernet0/0/2]port link-type access  
[sw1-GigabitEthernet0/0/2]port default vlan 3

sw2

[sw2]int g 0/0/2 
[sw2-GigabitEthernet0/0/2]port link-type access 
[sw2-GigabitEthernet0/0/2]port default vlan 2
[sw2]int g 0/0/3
[sw2-GigabitEthernet0/0/3]port link-type access 
[sw2-GigabitEthernet0/0/3]port default vlan 3

3)TRUNK干道
sw1

[sw1]int g 0/0/4
[sw1-GigabitEthernet0/0/4]port link-type trunk 
[sw1-GigabitEthernet0/0/4]port trunk allow-pass vlan 2 3

sw2

[sw2]int g 0/0/1
[sw2-GigabitEthernet0/0/1]port link-type trunk 
[sw2-GigabitEthernet0/0/1]port trunk allow-pass vlan 2 3

4)单臂路由

[r1]int g 0/0/0.1 
[r1-GigabitEthernet0/0/0.1]ip add 192.168.1.1 24
[r1-GigabitEthernet0/0/0.1]dot1q termination vid 2
[r1-GigabitEthernet0/0/0.1]arp broadcast enable
[r1]int g 0/0/0.2
[r1-GigabitEthernet0/0/0.2]ip add 192.168.2.1 24 
[r1-GigabitEthernet0/0/0.2]dot1q termination vid 3 
[r1-GigabitEthernet0/0/0.2]arp broadcast enable 

应记得把sw1连接AR1的接口改成TRUNK病允许VLAN2 3通过

[sw1]int g 0/0/3 
[sw1-GigabitEthernet0/0/3]port link-type trunk 
[sw1-GigabitEthernet0/0/3]port trunk allow-pass vlan 2 3

致此,完成了实验所有要求
5.实验总结
要清楚哪个端口是哪个类型,不要遗漏

你可能感兴趣的:([HCIA]VLAN实验)