我正在使用具有 3 个 VLAN 的 IOS XE 16.8 配置 Cisco 路由器 C1111-8p。
- VLAN 1:本机/管理 192.168。0 .0/24
- VLAN 10:192.168。10 .0/24
- VLAN 20:192.168。20 .0/24
我还没有设置 ACL,但基本上:
- 我想从外部阻止除 2 个端口之外的所有内容,这两个端口将仅连接到 VLAN 10。
- VLAN 10,20 可以相互通信。
- 管理/本机 VLAN 1:除了用于 eap-tls 管理和 Radius 服务器的无线 AP 之外,没有人应该能够访问它。
问题:
- 连接到 VLAN10,从
SSID10
或GigabitEthernet 0/1/2
. 为什么我可以手动将我的 IP 定义为 VLAN1 或 VLAN10 的 IP? - 为什么我可以合法地获得与我所连接的不同的 VLAN/子网 IP?
想要 VLAN 间通信并不意味着我希望我的设备能够从不同的 VLAN/子网获取 IP。
在这种情况下,存在一个巨大的安全漏洞,因为我网络中的某个人可以获得管理 IP。
我的配置:
# Setup ISP internet connection
configure terminal
interface GigabitEthernet 0/0/0
description WAN
ip address 219.*.*.* 255.255.255.252
ip nat outside
no shutdown
end
conf t
ip nat inside source list NAT interface GigabitEthernet0/0/0 overload
ip route 0.0.0.0 0.0.0.0 219.*.*.*
ip dns server
ip domain-lookup
ip name-server 221.110.33.164 221.110.33.132
end
# Set DHCP pools
configure terminal
service dhcp
# Native pool
ip dhcp pool vlanNativePool
network 192.168.0.0 255.255.255.0
default-router 192.168.0.1
exit
# VLAN 10 pool
ip dhcp pool vlan10Pool
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
dns-server 221.110.33.164 221.110.33.132
# VLAN 20 pool
ip dhcp pool vlan20Pool
network 192.168.20.0 255.255.255.0
default-router 192.168.20.1
dns-server 221.110.33.164 221.110.33.132
end
#NAT
configure terminal
ip access-list standard NAT
permit 192.168.10.0 0.0.0.255
permit 192.168.20.0 0.0.0.255
permit 192.168.0.0 0.0.0.255
end
#Setup the trunk port between the switch and the WAP
configure terminal
interface GigabitEthernet 0/1/0
switchport mode trunk
switchport trunk native vlan 1
switchport trunk allowed vlan add 1,10,20
switchport nonegotiate
no shutdown
end
#Setup the port VLAN 1 native for the Radius/squid server
configure terminal
interface GigabitEthernet 0/1/6
switchport mode access
switchport access vlan 1
no shutdown
exit
#Setup the port VLAN 1 for management
configure terminal
interface GigabitEthernet 0/1/7
switchport mode access
switchport access vlan 1
no shutdown
end
# Setup the switch port for direct VLAN access
configure terminal
interface GigabitEthernet 0/1/2
switchport mode access
switchport access vlan 10
no shutdown
exit
interface GigabitEthernet 0/1/3
switchport mode access
switchport access vlan 20
no shutdown
exit
# Configure VLANs
ip routing
configure terminal
# VLAN 1 DEFAULT NATIVE
vlan 1
interface vlan 1
ip address 192.168.0.1 255.255.255.0
ip nat inside
exit
# VLAN 10
vlan 10
no shutdown
interface vlan 10
ip address 192.168.10.1 255.255.255.0
ip nat inside
no shutdown
exit
# VLAN 20
vlan 20
no shutdown
interface vlan 20
ip address 192.168.20.1 255.255.255.0
ip nat inside
no shutdown
end