客户的地址池都在核心交换机上,网关在汇聚上,如下图网络结构
核心配置
ip pool bangong
gateway-list 192.168.200.254
network 192.168.200.0 mask 255.255.255.0
dns-list 114.114.114.114
interface Vlanif100
ip address 192.168.100.5 255.255.255.252
#
interface Vlanif101
ip address 192.168.100.1 255.255.255.252
interface GigabitEthernet0/0/1
port link-type access
port default vlan 101
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
ip route-static 192.168.200.0 255.255.255.0 192.168.100.6
汇聚
interface Vlanif100
ip address 192.168.100.6 255.255.255.252
#
interface Vlanif200
ip address 192.168.200.254 255.255.255.0
dhcp select relay
dhcp relay server-ip 192.168.100.5
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 200
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 200
ip route-static 0.0.0.0 0 192.168.100.5