我的交换机配置如下,还有拓扑。现在我上网的代理服务器是放在VLAN11 里的,在我们局域网里的IP地址为:192.168.4.2。掩码为:255.255.255.0。网关为:192.168.4.254。在同一VLAN下的主机上网时断时续,很不稳定,在另外一个VLAN里的主机跟本上不了。
在没有上这台交换机之前,我们大家都处在同一广播域里(就是全是用“傻瓜型”二层交换机联网),现在划分VLAN了,不在服务器这个VLAN里主机就上不了网。
但是大家都能PING通服务器,而且都设置了代理服务器的地址。请大家教我,为什么,怎样设置?????还要做什么配置或者设置?????
configure terminal
vtp mode transparent
vlan 10
name beiqu
exit
vlan 11
name nanqu
end
configure terminal
interface fastethernet0/10
switchport mode access
switchport access vlan 10
exit
interface fastethernet0/11
switchport mode access
switchport access vlan 11
exit
interface vlan10
ip address 192.168.3.254 255.255.252.0
no shutdown
exit
interface vlan11 //服务器所在VLAN
ip address 192.168.4.254 255.255.255.0
no shutdown
exit
ip routing
ip forward-protocol udp 137
ip forward-protocol udp 138
ip forward-protocol udp 139
inter vlan 10
ip helper 192.168.4.0
exit
inter vlan 11
ip helper 192.168.0.0
ip helper 192.168.1.0
ip helper 192.168.2.0
ip helper 192.168.3.0
exit
ip route 0.0.0.0 0.0.0.0 Vlan10 这是静态路由
ip route 0.0.0.0 0.0.0.0 Vlan11
access-list 103 permit ip 192.168.4.0 0.0.0.255 192.168.0.0 0.0.0.255
access-list 103 permit ip 192.168.4.0 0.0.0.255 192.168.1.0 0.0.0.255
access-list 103 permit ip 192.168.4.0 0.0.0.255 192.168.2.0 0.0.0.255
access-list 103 permit ip 192.168.4.0 0.0.0.255 192.168.3.0 0.0.0.255
access-list 103 permit udp any any eq netbios-dgm
access-list 103 permit udp any any eq netbios-ns
access-list 103 permit udp any any eq netbios-ss
access-list 103 permit udp any eq netbios-dgm any
access-list 103 permit udp any eq netbios-ns any
access-list 103 permit udp any eq netbios-ss any
inter vlan 10
ip directed-broadcast 103
exit
access-list 104 permit ip 192.168.0.0 0.0.0.255 192.168.4.0 0.0.0.255
access-list 104 permit ip 192.168.1.0 0.0.0.255 192.168.4.0 0.0.0.255
access-list 104 permit ip 192.168.2.0 0.0.0.255 192.168.4.0 0.0.0.255
access-list 104 permit ip 192.168.3.0 0.0.0.255 192.168.4.0 0.0.0.255
access-list 104 permit udp any any eq netbios-dgm
access-list 104 permit udp any any eq netbios-ns
access-list 104 permit udp any any eq netbios-ss
access-list 104 permit udp any eq netbios-dgm any
access-list 104 permit udp any eq netbios-ns any
access-list 104 permit udp any eq netbios-ss any
inter vlan 11
ip directed-broadcast 104
exit
inter vlan 10
ip access-group 103 out
exit
inter vlan 11
ip access-group 104 out
end
copy run star
|