//兴趣记录一下~希望退休以后可以回味,各位别嫌弃,感谢各位!!
///
//VLAN的重要性,实作(验证在不同的VLAN底下,主机不能互通)
以上图中可以看到
-DHCP server
-Switch server
-computer
我把DHCP IP address 设为 192.168.1.1/24 会分配IP给电脑
以上图中是switch目前配置的VLAN,在还没分配的情况下,都还在VLAN1,输入 show vlan brief 就能看到了喔
根据第一章图,以交换器为中心,分为左半部和右半部。
左半部为=>销售部门(VLAN10)(Fa0/1-4)
新增销售部门 SwitchVlan(config)#vlan10 => name sales
把interface分配到vlan10
SwitchVlan(config)# int range f0/1 - f0/4
SwitchVlan(config-if-range)#switchport access vlan 10
右半部为=>开发部门(VLAN20)(Fa0/5-7)
新增开发部门 SwitchVlan(config)#vlan20 => name develop
把interface分配到vlan20
SwitchVlan(config)# int range f0/5 - f0/7
SwitchVlan(config-if-range)#switchport access vlan 20
SwitchVlan#show vlan brief 即可看到第三张图片
DHCP分配IP时,可以看到销售部门和开发部门的IP并不相同
原因:VLAN的不同,造成两边的主机不能互通。