Cisco Catalyst 3550交换机 – VLAN ACL问题

我似乎无法使Vlan ACL正常工作。 当我通过VPN连接时,我希望能够访问10.100.xxnetworking上的服务器以及10.200.xxnetworking上的服务器。 但是,我想阻止10.100.xxnetworking看到10.200.xx

目前,我有2个Vlans:

interface Vlan111 description "vlan 111" ip address 10.100.1.1 255.255.255.0 interface Vlan222 description "vlan 222" ip address 10.200.1.1 255.255.255.0 ip access-group vlan222_acl in ip access-group vlan222_acl out 

我有2个服务器连接到每个VLAN:

 !--- the below port is connected to a windows machine with static ip address 10.100.1.10 and gateway 10.100.1.1 interface FastEthernet0/4 description server 1 switchport access vlan 111 switchport mode access !--- the below port is connected to a windows machine with static ip address 10.200.1.10 and gateway 10.200.1.1 interface FastEthernet0/5 description server 2 switchport access vlan 222 switchport mode access 

问题是当我configurationvlan222_acl。

这是我input的内容:

 ip access-list extended vlan222_acl deny icmp 10.100.0.0 255.255.0.0 10.200.0.0 255.255.0.0 

但是这里是应用到正在运行的configuration:

 ip access-list extended vlan222_acl deny icmp 0.0.0.0 255.255.0.0 0.0.0.0 255.255.0.0 !--- the above line is not what I actually entered in the terminal, for some reason !--- the source and dest ip addresses are getting replaced with zeros 

由于上述路线,现在每个人都无法在10.200.1.10上ping服务器。 当我删除线,即no deny icmp 0.0.0.0 255.255.0.0 0.0.0.0 255.255.0.0然后我可以再次ping它。

我怎样才能限制10.100.xx能够ping 10.200.xx?

非常感谢您的帮助! G

你需要反转你的networking掩码…即,而不是255.255.0.0使用0.0.255.255

例:

 ip access-list standard external_traffic deny 172.16.0.0 0.15.255.255 deny 192.168.0.0 0.0.255.255 

此外,你明白,你需要一个路由器之间VLAN的子网,对吧? (不要试图听起来很暴躁,我只是不确定你的经验水平)

编辑:是否有一个原因,你使用/ 24子网地址分配,但/ 16的ACL?

我的build议是抛出222上的ACL,并对111子网进行限制,因为这就是你实际上想限制的东西。

 ip access-list extended block-icmp deny icmp 10.100.1.0 0.0.0.255 10.200.1.0 0.0.0.255 permit ip any any ! interface vlan 111 ip access-group block-icmp in 

您已将ACL应用于VLAN 222,用于传入和传出通信,并且ACL不是有状态的。 这意味着他们不会允许他们自己的返回stream量,你将不得不添加一个隐含的规则。 所以,在这种情况下,你阻止了返回stream量。

一种解决scheme是在同一个ACL上为返回stream量添加另一个规则,但是我认为最好的方法是为input和输出stream量configuration两个不同的ACL,如果您真的需要它们的话。

您也可以尝试使用反身 ACL,这是允许返回stream量的好方法。 点击这里查看更多详情: http : //www.cisco.com/en/US/docs/ios/12_2/security/command/reference/srfreflx.html

以下是一些可能有助于拍摄的附加提示。

  • show access-list NAME/NUMBER显示每个规则的点击次数,可以看出哪些规则匹配并拒绝或允许数据包。 这对你的情况没有太大帮助,因为你在两个方向上都有相同的ACL,你不知道它在哪里匹配。

  • 如果您在每个规则的末尾添加日志 (例如deny icmp 10.100.1.0 0.0.0.255 10.200.1.0 0.0.0.255 log ),交换机将logging您可以使用show logging进行尝试的每个匹配。尽pipe如此,尝试不要长时间的离开,只是为了拍摄。