有偿
有4个部门连接到交换机中,各个部门主机192.168.10.2/192.168.10.3,192.168.20.2/192.168.20.3,192.168.30.2/192.168.30.3,192.168.40.2/192.168.40.3,现在把192.168.10.2、192.168.20.2、192.168.30.2、192.168.40.2放在一个vlan,要求这个vlan中的主机能通讯,也就是能ping通 ip add ip地址sub # interface Vlanif2ip address 192.168.10.2 255.255.255.0ip address 192.168.20.2 255.255.255.0 subip address 192.168.30.2 255.255.255.0 subip address 192.168.40.2 255.255.255.0 sub # # interface Vlanif2ip address 192.168.10.2 255.255.255.0ip address 192.168.20.2 255.255.255.0 subip address 192.168.30.2 255.255.255.0 subip address 192.168.40.2 255.255.255.0 sub # #interface Vlanif2
ip address 192.168.10.2 255.255.255.0
ip address 192.168.20.2 255.255.255.0 sub
ip address 192.168.30.2 255.255.255.0 sub
ip address 192.168.40.2 255.255.255.0 sub
# #
interface Vlanif2
ip address 192.168.10.2 255.255.255.0
ip address 192.168.20.2 255.255.255.0 sub
ip address 192.168.30.2 255.255.255.0 sub
ip address 192.168.40.2 255.255.255.0 sub
#
#
interface Vlanif2
ip address 192.168.10.2 255.255.255.0
ip address 192.168.20.2 255.255.255.0 sub
ip address 192.168.30.2 255.255.255.0 sub
ip address 192.168.40.2 255.255.255.0 sub
# 要做路由。
因为虽然在一个VLAN里,交换机放行了,但掩码是不允许PING通过的。只会去找网关。
或者把所有掩码改了,改成255.255.0.0
一个VLAN=一个子网=一个部门
页:
[1]