2024年5月29日发(作者:漆香梅)
System-view
一、 激活combo端口,启用DHCP
interface GigabitEthernet0/0/5
undo shutdown
interface GigabitEthernet0/0/6
undo shutdown
interface GigabitEthernet0/0/7
undo shutdown
interface GigabitEthernet0/0/8
undo shutdown
dhcp enable
二、 建立vlan
Vlan1防火墙用(端口27-28)
Vlan20服务器用(端口15-26)
Vlan2-9保持不变(端口5-12)
Vlan10-11原Vlan1计算机使用(端口13-14)
Vlan 1
interface Vlan-interface1
ip address 10.0.1.1 255.255.255.0
dhcp select server global-pool
Vlan 2
interface Vlan-interface2
ip address 10.0.2.1 255.255.255.0
dhcp select server global-pool
Vlan 3
interface Vlan-interface3
ip address 10.0.3.1 255.255.255.0
dhcp select server global-pool
Vlan 4
interface Vlan-interface4
ip address 10.0.4.1 255.255.255.0
dhcp select server global-pool
Vlan 5
interface Vlan-interface5
ip address 10.0.5.1 255.255.255.0
dhcp select server global-pool
Vlan 6
interface Vlan-interface6
ip address 10.0.6.1 255.255.255.0
dhcp select server global-pool
Vlan 7
interface Vlan-interface7
ip address 10.0.7.1 255.255.255.0
dhcp select server global-pool
Vlan 8
interface Vlan-interface8
ip address 10.0.8.1 255.255.255.0
dhcp select server global-pool
Vlan 9
interface Vlan-interface9
ip address 10.0.9.1 255.255.255.0
dhcp select server global-pool
Vlan 10
interface Vlan-interface10
ip address 10.0.10.1 255.255.255.0
dhcp select server global-pool
Vlan 11
interface Vlan-interface11
ip address 10.0.11.1 255.255.255.0
dhcp select server global-pool
Vlan 20
interface Vlan-interface20
ip address 10.0.0.1 255.255.255.0
dhcp select server global-pool
三、 设定端口所在vlan
interface GigabitEthernet0/0/5
port access vlan 2
interface GigabitEthernet0/0/6
port access vlan 3
interface GigabitEthernet0/0/7
port access vlan 4
interface GigabitEthernet0/0/8
port access vlan 5
interface GigabitEthernet0/0/9
port access vlan 6
interface GigabitEthernet0/0/10
port access vlan 7
interface GigabitEthernet0/0/11
port access vlan 8
interface GigabitEthernet0/0/12
port access vlan 9
interface GigabitEthernet0/0/13
port access vlan 10
interface GigabitEthernet0/0/14
port access vlan 11
interface GigabitEthernet0/0/15
port access vlan 20
interface GigabitEthernet0/0/16
port access vlan 20
interface GigabitEthernet0/0/17
port access vlan 20
interface GigabitEthernet0/0/18
port access vlan 20
interface GigabitEthernet0/0/19
port access vlan 20
interface GigabitEthernet0/0/20
port access vlan 20
interface GigabitEthernet0/0/21
port access vlan 20
interface GigabitEthernet0/0/22
port access vlan 20
interface GigabitEthernet0/0/23
port access vlan 20
interface GigabitEthernet0/0/24
port access vlan 20
interface GigabitEthernet0/0/25
port access vlan 20
interface GigabitEthernet0/0/26
port access vlan 20
interface GigabitEthernet0/0/27
port access vlan 1
interface GigabitEthernet0/0/28
port access vlan 1
四、 定义地址池
dhcp server ip-pool vlan1
network 10.0.1.0 mask 255.255.255.0
gateway-list 10.0.1.1
dns-list 10.0.0.16
domain-name
dhcp server ip-pool vlan2
network 10.0.2.0 mask 255.255.255.0
gateway-list 10.0.2.1
dns-list 10.0.0.16
domain-name
dhcp server ip-pool vlan3
network 10.0.3.0 mask 255.255.255.0
gateway-list 10.0.3.1
dns-list 10.0.0.16
domain-name
dhcp server ip-pool vlan4
network 10.0.4.0 mask 255.255.255.0
gateway-list 10.0.4.1
dns-list 10.0.0.16
domain-name
dhcp server ip-pool vlan5
network 10.0.5.0 mask 255.255.255.0
gateway-list 10.0.5.1
dns-list 10.0.0.16
domain-name
dhcp server ip-pool vlan6
network 10.0.6.0 mask 255.255.255.0
gateway-list 10.0.6.1
dns-list 10.0.0.16
domain-name
dhcp server ip-pool vlan7
network 10.0.7.0 mask 255.255.255.0
gateway-list 10.0.7.1
dns-list 10.0.0.16
domain-name
dhcp server ip-pool vlan8
network 10.0.8.0 mask 255.255.255.0
gateway-list 10.0.8.1
dns-list 10.0.0.16
domain-name
dhcp server ip-pool vlan9
network 10.0.9.0 mask 255.255.255.0
gateway-list 10.0.9.1
dns-list 10.0.0.16
domain-name
dhcp server ip-pool vlan10
network 10.0.10.0 mask 255.255.255.0
gateway-list 10.0.10.1
dns-list 10.0.0.16
domain-name
dhcp server ip-pool vlan11
network 10.0.11.0 mask 255.255.255.0
gateway-list 10.0.11.1
dns-list 10.0.0.16
domain-name
dhcp server ip-pool vlan20
network 10.0.0.0 mask 255.255.255.0
gateway-list 10.0.0.1
dns-list 10.0.0.16
domain-name
五、 设置路由
Undo ip route-static 0.0.0.0 0.0.0.0 10.0.1.1 preference 60
dhcp server forbidden-ip 10.0.0.1
dhcp server forbidden-ip 10.0.1.1
dhcp server forbidden-ip 10.0.1.250 10.0.1.254
dhcp server forbidden-ip 10.0.2.1
dhcp server forbidden-ip 10.0.3.1
dhcp server forbidden-ip 10.0.4.1
dhcp server forbidden-ip 10.0.5.1
dhcp server forbidden-ip 10.0.6.1
dhcp server forbidden-ip 10.0.7.1
dhcp server forbidden-ip 10.0.8.1
dhcp server forbidden-ip 10.0.9.1
dhcp server forbidden-ip 10.0.10.1
dhcp server forbidden-ip 10.0.11.1
2024年5月29日发(作者:漆香梅)
System-view
一、 激活combo端口,启用DHCP
interface GigabitEthernet0/0/5
undo shutdown
interface GigabitEthernet0/0/6
undo shutdown
interface GigabitEthernet0/0/7
undo shutdown
interface GigabitEthernet0/0/8
undo shutdown
dhcp enable
二、 建立vlan
Vlan1防火墙用(端口27-28)
Vlan20服务器用(端口15-26)
Vlan2-9保持不变(端口5-12)
Vlan10-11原Vlan1计算机使用(端口13-14)
Vlan 1
interface Vlan-interface1
ip address 10.0.1.1 255.255.255.0
dhcp select server global-pool
Vlan 2
interface Vlan-interface2
ip address 10.0.2.1 255.255.255.0
dhcp select server global-pool
Vlan 3
interface Vlan-interface3
ip address 10.0.3.1 255.255.255.0
dhcp select server global-pool
Vlan 4
interface Vlan-interface4
ip address 10.0.4.1 255.255.255.0
dhcp select server global-pool
Vlan 5
interface Vlan-interface5
ip address 10.0.5.1 255.255.255.0
dhcp select server global-pool
Vlan 6
interface Vlan-interface6
ip address 10.0.6.1 255.255.255.0
dhcp select server global-pool
Vlan 7
interface Vlan-interface7
ip address 10.0.7.1 255.255.255.0
dhcp select server global-pool
Vlan 8
interface Vlan-interface8
ip address 10.0.8.1 255.255.255.0
dhcp select server global-pool
Vlan 9
interface Vlan-interface9
ip address 10.0.9.1 255.255.255.0
dhcp select server global-pool
Vlan 10
interface Vlan-interface10
ip address 10.0.10.1 255.255.255.0
dhcp select server global-pool
Vlan 11
interface Vlan-interface11
ip address 10.0.11.1 255.255.255.0
dhcp select server global-pool
Vlan 20
interface Vlan-interface20
ip address 10.0.0.1 255.255.255.0
dhcp select server global-pool
三、 设定端口所在vlan
interface GigabitEthernet0/0/5
port access vlan 2
interface GigabitEthernet0/0/6
port access vlan 3
interface GigabitEthernet0/0/7
port access vlan 4
interface GigabitEthernet0/0/8
port access vlan 5
interface GigabitEthernet0/0/9
port access vlan 6
interface GigabitEthernet0/0/10
port access vlan 7
interface GigabitEthernet0/0/11
port access vlan 8
interface GigabitEthernet0/0/12
port access vlan 9
interface GigabitEthernet0/0/13
port access vlan 10
interface GigabitEthernet0/0/14
port access vlan 11
interface GigabitEthernet0/0/15
port access vlan 20
interface GigabitEthernet0/0/16
port access vlan 20
interface GigabitEthernet0/0/17
port access vlan 20
interface GigabitEthernet0/0/18
port access vlan 20
interface GigabitEthernet0/0/19
port access vlan 20
interface GigabitEthernet0/0/20
port access vlan 20
interface GigabitEthernet0/0/21
port access vlan 20
interface GigabitEthernet0/0/22
port access vlan 20
interface GigabitEthernet0/0/23
port access vlan 20
interface GigabitEthernet0/0/24
port access vlan 20
interface GigabitEthernet0/0/25
port access vlan 20
interface GigabitEthernet0/0/26
port access vlan 20
interface GigabitEthernet0/0/27
port access vlan 1
interface GigabitEthernet0/0/28
port access vlan 1
四、 定义地址池
dhcp server ip-pool vlan1
network 10.0.1.0 mask 255.255.255.0
gateway-list 10.0.1.1
dns-list 10.0.0.16
domain-name
dhcp server ip-pool vlan2
network 10.0.2.0 mask 255.255.255.0
gateway-list 10.0.2.1
dns-list 10.0.0.16
domain-name
dhcp server ip-pool vlan3
network 10.0.3.0 mask 255.255.255.0
gateway-list 10.0.3.1
dns-list 10.0.0.16
domain-name
dhcp server ip-pool vlan4
network 10.0.4.0 mask 255.255.255.0
gateway-list 10.0.4.1
dns-list 10.0.0.16
domain-name
dhcp server ip-pool vlan5
network 10.0.5.0 mask 255.255.255.0
gateway-list 10.0.5.1
dns-list 10.0.0.16
domain-name
dhcp server ip-pool vlan6
network 10.0.6.0 mask 255.255.255.0
gateway-list 10.0.6.1
dns-list 10.0.0.16
domain-name
dhcp server ip-pool vlan7
network 10.0.7.0 mask 255.255.255.0
gateway-list 10.0.7.1
dns-list 10.0.0.16
domain-name
dhcp server ip-pool vlan8
network 10.0.8.0 mask 255.255.255.0
gateway-list 10.0.8.1
dns-list 10.0.0.16
domain-name
dhcp server ip-pool vlan9
network 10.0.9.0 mask 255.255.255.0
gateway-list 10.0.9.1
dns-list 10.0.0.16
domain-name
dhcp server ip-pool vlan10
network 10.0.10.0 mask 255.255.255.0
gateway-list 10.0.10.1
dns-list 10.0.0.16
domain-name
dhcp server ip-pool vlan11
network 10.0.11.0 mask 255.255.255.0
gateway-list 10.0.11.1
dns-list 10.0.0.16
domain-name
dhcp server ip-pool vlan20
network 10.0.0.0 mask 255.255.255.0
gateway-list 10.0.0.1
dns-list 10.0.0.16
domain-name
五、 设置路由
Undo ip route-static 0.0.0.0 0.0.0.0 10.0.1.1 preference 60
dhcp server forbidden-ip 10.0.0.1
dhcp server forbidden-ip 10.0.1.1
dhcp server forbidden-ip 10.0.1.250 10.0.1.254
dhcp server forbidden-ip 10.0.2.1
dhcp server forbidden-ip 10.0.3.1
dhcp server forbidden-ip 10.0.4.1
dhcp server forbidden-ip 10.0.5.1
dhcp server forbidden-ip 10.0.6.1
dhcp server forbidden-ip 10.0.7.1
dhcp server forbidden-ip 10.0.8.1
dhcp server forbidden-ip 10.0.9.1
dhcp server forbidden-ip 10.0.10.1
dhcp server forbidden-ip 10.0.11.1