华为s5700交换机配置全局地址池dhcpWord格式.docx
《华为s5700交换机配置全局地址池dhcpWord格式.docx》由会员分享,可在线阅读,更多相关《华为s5700交换机配置全局地址池dhcpWord格式.docx(9页珍藏版)》请在冰豆网上搜索。
[SW1]ippool10(创建全局地址池,同时进入全局地址池视图)
It'
ssuccessfultocreateanIPaddresspool.
[SW1-ip-pool-10]netw
[SW1-ip-pool-10]network192.168.10.0m
[SW1-ip-pool-10]network192.168.10.0mask24(配置全局地址池可动态分配的IP地址范围)
[SW1-ip-pool-10]
[SW1-ip-pool-10]dns-list8.8.8.8(配置DNS)
[SW1-ip-pool-10]gateway-list192.168.10.1(配置网关)
[SW1-ip-pool-10]ex
[SW1-ip-pool-10]excluded-ip-address192.168.10.201192.168.10.254(保留不被分配的地址)
[SW1-ip-pool-10]leased
[SW1-ip-pool-10]leaseday7(IP租约期限)
[SW1-ip-pool-10]disthis(查询当前模式的配置)
#
ippool10
gateway-list192.168.10.1(网关)
network192.168.10.0mask255.255.255.0(IP地址范围)
excluded-ip-address192.168.10.201192.168.10.254(保留IP地址范围)
leaseday7hour0minute0(IP租约周期)
dns-list8.8.8.8
return
[SW1-ip-pool-10]quit(退出)
[SW1]ippool20
[SW1-ip-pool-20]
[SW1-ip-pool-20]netw
[SW1-ip-pool-20]network192.168.20.0m
[SW1-ip-pool-20]network192.168.20.0mask24
[SW1-ip-pool-20]d
[SW1-ip-pool-20]dns-list8.8.8.8
[SW1-ip-pool-20]g
[SW1-ip-pool-20]gateway-list192.168.20.1
[SW1-ip-pool-20]ex
[SW1-ip-pool-20]excluded-ip-address192.168.20.201192.168.20.254
[SW1-ip-pool-20]l
[SW1-ip-pool-20]leased
[SW1-ip-pool-20]leaseday7
[SW1-ip-pool-20]disthis
ippool20
gateway-list192.168.20.1
network192.168.20.0mask255.255.255.0
excluded-ip-address192.168.20.201192.168.20.254
leaseday7hour0minute0
[SW1-ip-pool-20]q
[SW1]v
[SW1]vlanb
[SW1]vlanbatch1020(批量创建vlan)
Thisoperationmaytakeafewseconds.Pleasewaitforamoment...done.
[SW1]int
[SW1]interfaceg
[SW1]interfaceGigabitEthernet0/0/1(进入port1)
[SW1-GigabitEthernet0/0/1]por
[SW1-GigabitEthernet0/0/1]portl
[SW1-GigabitEthernet0/0/1]portlink-t
[SW1-GigabitEthernet0/0/1]portlink-typea
[SW1-GigabitEthernet0/0/1]portlink-typeaccess(配置port1类型)
[SW1-GigabitEthernet0/0/1]
[SW1-GigabitEthernet0/0/1]port
[SW1-GigabitEthernet0/0/1]portdef
[SW1-GigabitEthernet0/0/1]portdefaultv
[SW1-GigabitEthernet0/0/1]portdefaultvlan10(配置port1vlan)
[SW1-GigabitEthernet0/0/1]quit(退出)
[SW1]interfaceGigabitEthernet0/0/2
[SW1-GigabitEthernet0/0/2]
[SW1-GigabitEthernet0/0/2]por
[SW1-GigabitEthernet0/0/2]portl
[SW1-GigabitEthernet0/0/2]portlink-t
[SW1-GigabitEthernet0/0/2]portlink-typea
[SW1-GigabitEthernet0/0/2]portlink-typeaccess
[SW1-GigabitEthernet0/0/2]portdef
[SW1-GigabitEthernet0/0/2]portdefaultv
[SW1-GigabitEthernet0/0/2]portdefaultvlan20
[SW1-GigabitEthernet0/0/2]quit
[SW1]interfacev(配置VLANIF10接口下的客户端从全局地址池中获取IP地址)
[SW1]interfaceVlanif10(创建vlanif10)
[SW1-Vlanif10]
[SW1-Vlanif10]ipadd
[SW1-Vlanif10]ipaddress192.168.10.124(配置IP地址)
[SW1-Vlanif10]dhcpsel
[SW1-Vlanif10]dhcpselectg
[SW1-Vlanif10]dhcpselectglobal(在vlanif10模式下调用全局地址池)
[SW1-Vlanif10]dis
[SW1-Vlanif10]displaythis(查询当前配置参数)
interfaceVlanif10
ipaddress192.168.10.1255.255.255.0
dhcpselectglobal
[SW1-Vlanif10]quit
[SW1]interfacev
[SW1]interfaceVlanif20
[SW1-Vlanif20]
[SW1-Vlanif20]ipadd
[SW1-Vlanif20]ipaddress192.168.20.124
[SW1-Vlanif20]dhcp
[SW1-Vlanif20]dhcpsel
[SW1-Vlanif20]dhcpselectg
[SW1-Vlanif20]dhcpselectglobal
[SW1-Vlanif20]disthis
interfaceVlanif20
ipaddress192.168.20.1255.255.255.0
[SW1-Vlanif20]quit
[SW1]dis
[SW1]displayippool(查看IP地址池配置情况)
-----------------------------------------------------------------------
Pool-name:
10
Pool-No:
0
Position:
LocalStatus:
Unlocked
Gateway-0:
192.168.10.1
Mask:
255.255.255.0
VPNinstance:
--
20
1
192.168.20.1
IPaddressStatistic
Total:
506
Used:
0Idle:
398
Expired:
0Conflict:
0Disable:
108
[SW1]quit
SW1>
save(保存配置,写入设备)
Thecurrentconfigurationwillbewrittentothedevice.
Areyousuretocontinue?
[Y/N]y
Nowsavingthecurrentconfigurationtotheslot0.
Mar18201713:
30:
47-08:
00SW1%%01CFM/4/SAVE(l)[63]:
TheuserchoseYwhendecid
ingwhethertosavetheconfigurationtothedevice.
Savetheconfigurationsuccessfully.
PC情况如下