码迷,mamicode.com
首页 > 其他好文 > 详细

华为交换机S5700配置DHCP

时间:2014-10-22 18:35:27      阅读:478      评论:0      收藏:0      [点我收藏+]

标签:华为交换机配置dhcp

bubuko.com,布布扣


配置命令:

<Huawei>sys

Enter system view, return user view withCtrl+Z.

[Huawei]sysna         

[Huawei]sysname dhcp

[dhcp]vlan 11

[dhcp-vlan11]vlan 22

[dhcp-vlan22]qu

[dhcp]interface vlan11

[dhcp-Vlanif11] ip add

[dhcp-Vlanif11]ip add 192.168.0.254255.255.255.0

[dhcp-Vlanif11]inter vlan 22

[dhcp-Vlanif22]

[dhcp-Vlanif22]ip add 192.168.2.254255.255.255.0

[dhcp-Vlanif22]

[dhcp-Vlanif22]qu

[dhcp]interface g    

[dhcp]interface GigabitEthernet 0/0/1

[dhcp-GigabitEthernet0/0/1]port link-typeaccess

[dhcp-GigabitEthernet0/0/1]port defaultvlan 11

[dhcp-GigabitEthernet0/0/1]

[dhcp-GigabitEthernet0/0/1]inter g0/0/2

[dhcp-GigabitEthernet0/0/2]port link-t  

[dhcp-GigabitEthernet0/0/2]port link-typeacc      

[dhcp-GigabitEthernet0/0/2]port link-typeaccess

[dhcp-GigabitEthernet0/0/2]port def     

[dhcp-GigabitEthernet0/0/2]port default vla 

[dhcp-GigabitEthernet0/0/2]port defaultvlan 22

[dhcp-GigabitEthernet0/0/2]qu

[dhcp]

[dhcp]dhcp enable

Info: The operation may take a few seconds.Please wait for a moment.done.

[dhcp]

[dhcp]ip pool vlan11

Info:It‘s successful to create an IPaddress pool.

[dhcp-ip-pool-vlan11]gateway-list192.168.0.254

[dhcp-ip-pool-vlan11]network 192.168.0.0mask 255.255.255.0

[dhcp-ip-pool-vlan11]dns-list202.102.224.68

[dhcp-ip-pool-vlan11]qu

[dhcp]

[dhcp]ip pool vlan22

Info:It‘s successful to create an IPaddress pool.

[dhcp-ip-pool-vlan22]

[dhcp-ip-pool-vlan22]gateway-list192.168.2.254

[dhcp-ip-pool-vlan22]network 192.168.2.0mask 255.255.255.0

[dhcp-ip-pool-vlan22]dns-list202.102.224.68

[dhcp-ip-pool-vlan22]excluded-ip-address192.168.2.253

[dhcp-ip-pool-vlan22]qu

[dhcp]

[dhcp]quit

<dhcp>

<dhcp>save

The current configuration will be writtento the device.

Are you sure to continue?[Y/N]y

Now saving the current configuration to theslot 0.

Oct 22 2014 15:07:36-08:00 dhcp%%01CFM/4/SAVE(l)[0]:The user chose Y when decidi

ng whether to save the configuration to thedevice.

Save the configuration successfully.

<dhcp>

 -------------------------------------------------------------------------------------

最终配置结果:

<dhcp>dis current-configuration

#

sysname dhcp

#

vlan batch 11 22

#

cluster enable

ntdp enable

ndp enable

#

drop illegal-mac alarm

#

dhcp enable

#

diffserv domain default

#

drop-profile default

#

ip pool pool1

 gateway-list 192.168.0.254

 network 192.168.0.0 mask 255.255.255.0

 dns-list 202.102.224.68

#

ip pool vlan1

#

ip pool vlan22

 gateway-list 192.168.2.254

 network 192.168.2.0 mask 255.255.255.0

 excluded-ip-address 192.168.2.253

#

aaa

 authentication-scheme default

 authorization-scheme default

 accounting-scheme default

 domain default

 domain default_admin

 local-user admin password simple admin

 local-user admin service-type http

#

interface Vlanif1

#

interface Vlanif11

 ipaddress 192.168.0.254 255.255.255.0

 dhcpselect global

#

interface Vlanif22

 ipaddress 192.168.2.254 255.255.255.0

 dhcpselect global

#

interface MEth0/0/1

#

interface GigabitEthernet0/0/1

 portlink-type access

 portdefault vlan 11

#

interface GigabitEthernet0/0/2

 portlink-type access

 portdefault vlan 22

#

interface GigabitEthernet0/0/3 

 ………………

 

验证配置结果,并测试:

bubuko.com,布布扣

bubuko.com,布布扣

 


本文出自 “信诺” 博客,请务必保留此出处http://xinnuo.blog.51cto.com/4132978/1566724

华为交换机S5700配置DHCP

标签:华为交换机配置dhcp

原文地址:http://xinnuo.blog.51cto.com/4132978/1566724

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!