你好!
这实验,简单!假设三层交换机的fa0/1到指数fa0/6分别连接pc0至pc5,那么请参考如下命令:
enable
vlan database
vlan 10
vlan 11
exit
configure terminal
ip routing
interface vlan 10
ip address 192.168.10.1 255.255.255.0
interface vlan 11
ip address 192.168.11.1 255.255.255.0
exit
interface range fastethernet0/1 -3
switchport mode access
switchport access vlan 10
exit
interface range fastethernet0/4 -6
switchport mode access
switchport access vlan 11
exit
如果不庆逗誉想手工设置PC的IP地址,那誉段么用DHCP好了。回到全局配置模式下:
ip dhcp pool vlan10
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
dns-1.1.1.1
exit
ip dhcp pool vlan11
network 192.168.11.0 255.255.255.0
default-router 192.168.11.1
dns-1.1.1.1
exit
ip dhcp e 192.168.10.1
ip dhcp e 192.168.11.1
就这样子。
满意请采纳!
划分vlan,然后把端口扰和划入vlan中。 给vlan配上管理地址如图所示,亩李液把PC的网关设置为VLAN的迅物管理地址就可以ping通了