我正在尝试在“router-on-a-stick”中创建一个访问,它只允许 VLAN 62 与另一个 VLAN 上的服务器通信,其他 VLAN 中的其他主机都不能访问 VLAN 62。要清楚,我的VLAN 62 是网络摄像头的 VLAN,我的服务器是注册服务器。我尝试过标准和扩展 acl,但它不起作用。谁能帮我吗 ?
ps:我也有一个问题。在标准 acl 中,“拒绝部分”是否必须位于“允许部分”之上。对不起,我的英语不好。
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
ip dhcp pool 61
network 192.168.6.64 255.255.255.192
default-router 192.168.6.65
ip dhcp pool 62
network 192.168.6.128 255.255.255.192
default-router 192.168.6.129
ip dhcp pool 2
network 192.168.6.0 255.255.255.192
default-router 192.168.6.1
!
!
!
ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO1941/K9 sn FTX1524S9UZ
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0
no ip address
duplex auto
speed auto
!
interface GigabitEthernet0/0.2
encapsulation dot1Q 2
ip address 192.168.6.1 255.255.255.192
!
interface GigabitEthernet0/0.61
encapsulation dot1Q 61
ip address 192.168.6.65 255.255.255.192
!
interface GigabitEthernet0/0.62 ! *** I want this VLAN to be completely separate from others except for VLAN 2 ***
encapsulation dot1Q 62
ip address 192.168.6.129 255.255.255.192
ip access-group 162 in
ip access-group 162 out
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Serial0/1/0
no ip address
clock rate 2000000
shutdown
!
interface Serial0/1/1
ip address 192.168.67.3 255.255.255.0
!
interface Vlan1
no ip address
shutdown
!
router rip
network 192.168.6.0
network 192.168.67.0
!
ip classless
!
ip flow-export version 9
!
!
access-list 162 permit ip 192.168.6.128 0.0.0.64 192.168.6.0 0.0.0.64
access-list 162 deny ip any any
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end