当企业内电脑太多或者变动性很大,通过手动给每台计算机终端分配IP地址,工作量太大,可以通过DHCP给公司网络中不同VLAN的终端PC自动分配IP地址。
<Huawei>system-view
[Huawei]vlan 10
[Huawei]interface Vlanif 10
[Huawei-Vlanif10]ip address 192.168.10.254 24
[Huawei-Vlanif10]dhcp select global
[Huawei-Vlanif10]q
[Huawei]dhcp enable
[Huawei]ip pool vlan10
[Huawei-ip-pool-vlan10]gateway-list 192.168.10.254
[Huawei-ip-pool-vlan10]network 192.168.10.0 mask 255.255.255.0
[Huawei-ip-pool-vlan10]dns-list 202.102.192.68
[Huawei-ip-pool-vlan10]
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]port default vlan 10
[Huawei]interface GigabitEthernet 0/0/2
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]port default vlan 10
<Huawei>system-view
[Huawei]vlan 20
[Huawei]interface Vlanif 20
[Huawei-Vlanif20]ip address 192.168.20.254 24
[Huawei-Vlanif20]dhcp select global
[Huawei-Vlanif20]q
[Huawei]ip pool vlan20
[Huawei-ip-pool-vlan20]gateway-list 192.168.20.254
[Huawei-ip-pool-vlan20]network 192.168.20.0 mask 255.255.255.0
[Huawei-ip-pool-vlan20]dns-list 202.102.192.68
[Huawei-ip-pool-vlan20]q
[Huawei]interface GigabitEthernet 0/0/10
[Huawei-GigabitEthernet0/0/10]port link-type access
[Huawei-GigabitEthernet0/0/10]port default vlan 20
[Huawei-GigabitEthernet0/0/10]q
[Huawei]interface GigabitEthernet 0/0/11
[Huawei-GigabitEthernet0/0/10]port link-type access
[Huawei-GigabitEthernet0/0/10]port default vlan 20
[Huawei-GigabitEthernet0/0/10]q
[Huawei]
测试是否能自动获取IP地址
正在阅读:
如何通过三层交接机为公司多个VLAN自动分配IP地址06-09
2020吉林省吉林市永吉县软环境监督员、监测点招募公告11-28
2017年国家司法考试卷一国际私法辅导:国际私法的概念07-08
2018浙江杭州萧山技师学院招聘紧缺专业本科毕业生公告【3人】06-07
小学生远足日记三篇04-29
八年级寒假日记【三篇】03-31
小学三年级优美好句摘抄10-08
德国本科预科留学申请要求05-28
2018成人高考报名系统平台入口,2018广东揭阳成人高考报名流程04-13
什么是小米手环免密支付?(图文)06-04