最佳答案
您好,请知:
针对业务的需求创建不同的VLAN,配置VLAN IP,将VLAN划分到端口,其次配置DHCP地址池即可。参考配置命令如下:
将交换机的名字修改为SW1:
[H3C]sysname SW1
在交换机分别创建VLAN 10、VLAN 20:
[SW1]vlan 10
[SW1-vlan10]quit
[SW1]vlan 20
[SW1-vlan20]quit
VLAN 10的IP设置为:192.168.10.1 255.255.255.0:
[SW1]int vlan 10
[SW1-Vlan-interface10]ip address 192.168.10.1 24
[SW1-Vlan-interface10]quit
VLAN 20的IP设置为:192.168.20.1 255.255.255.0:
[SW1]int vlan 20
[SW1-Vlan-interface20]ip address 192.168.20.1 24
[SW1-Vlan-interface20]quit
将GI1/0/1端口划分到VLAN 10:
[SW1]int gi 1/0/1
[SW1-GigabitEthernet1/0/1]port link-type access
[SW1-GigabitEthernet1/0/1]port access vlan 10
[SW1-GigabitEthernet1/0/1]quit
将GI1/0/2端口划分到VLAN 20:
[SW1]int gi 1/0/2
[SW1-GigabitEthernet1/0/2]port link-type access
[SW1-GigabitEthernet1/0/2]port access vlan 20
[SW1-GigabitEthernet1/0/2]quit
开启DHCP功能:
[SW1]dhcp enable
创建DHCP地址池,命名为VLAN10,分配网段、子网掩码、默认网关、DNS:
[SW1]dhcp server ip-pool vlan10
[SW1-dhcp-pool-vlan10]network 192.168.10.0 mask 255.255.255.0
[SW1-dhcp-pool-vlan10]gateway-list 192.168.10.1
[SW1-dhcp-pool-vlan10]dns-list 114.114.114.114
[SW1-dhcp-pool-vlan10]quit
[SW1]
创建DHCP地址池,命名为VLAN20,分配网段、子网掩码、默认网关、DNS:
[SW1]dhcp server ip-pool vlan20
[SW1-dhcp-pool-vlan20]network 192.168.20.0 mask 255.255.255.0
[SW1-dhcp-pool-vlan20]gateway-list 192.168.20.1
[SW1-dhcp-pool-vlan20]dns-list 114.114.114.114
[SW1-dhcp-pool-vlan20]quit
(0)
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论