H3C S5500 划分vlan以及做DHCP

 

登录5500设备:

[H3C]dhcp server ip-pool vlan30

[H3C-dhcp-pool-vlan30]network 192.168.30.0 mask 255.255.255.0     配置vlan30_dhcp网段和掩码

[H3C-dhcp-pool-vlan30]gateway-list 192.168.30.1                   配置vlan30_dhcp网关

[H3C-dhcp-pool-vlan30]dns-list 202.106.0.20            

[H3C-dhcp-pool-vlan30]expired day 8

 

[H3C]vlan 30  创建vlan30

[H3C]qu

[H3C]interface Vlan-interface 30

[H3C-Vlan-interface30]ip address 192.168.30.1 255.255.255.0    配置vlan30 网关和掩码:注意要和dhcp网关配置一致,否则网络也不通

[H3C-Vlan-interface30]dhcp select server global-pool

[H3C-Vlan-interface30]qu

[H3C]dhcp server forbidden-ip 192.168.30.1 192.168.30.100 

#192.168.30.1 192.168.30.100之间的IP地址保留,不参与地址自动分配

[H3C]interface range GigabitEthernet 1/0/12 to GigabitEthernet 1/0/14  进入到13 14 15 这三个端口

[H3C-if-range]port access vlan 30 将端口加入到vlan30

[H3C-if-range]dis vlan 30   查看哪些接口加入到vlan30,我们看到 12 13 14  这三个端口已加入到vlan30
 VLAN ID: 30
 VLAN Type: static
 Route Interface: configured
 IPv4 address: 192.168.30.1
 IPv4 subnet mask: 255.255.255.0
 Description: VLAN 0030
 Name: VLAN 0030
 Tagged   Ports: none
 Untagged Ports:
    GigabitEthernet1/0/12    GigabitEthernet1/0/13    GigabitEthernet1/0/14

 

 在12端口接入一台主机  ping三层网关 ok  ping防火墙不通

解决办法:

1、登录H3C-F100-C-G 防火墙

2、网络管理 > 路由管理 > 静态路由  进入到这个目录下面  点新建

3、目的IP地址:192.168.30.0  掩码:255.255.255.0   下一跳:192.168.1.2  这里是三层设备的网关

H3C S5500 划分vlan以及做DHCP_DHCP

 

再次ping防火墙  ping192.168.1.1  ok

H3C S5500 划分vlan以及做DHCP_H3C S5500_02