华为交换机S5700配置DHCP

配置命令:

<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

………………

验证配置结果,并测试:

时间: 2024-10-07 04:04:04

华为交换机S5700配置DHCP的相关文章

华为交换机S5700升级实例

华为交换机S5700升级实例 近期我写了一篇文章,是在测试vSphere虚拟交换机中的"专用VLAN",此功能需要上层交换机的支持.专用VLAN,思科称为PVLAN,华为称为MUX VLAN. 文章详见 http://wangchunhai.blog.51cto.com/225186/1857192 我的环境中都是华为的交换机.先在一个环境中,测试,创建了4个VLAN,其中一个是主VLAN,另3个是辅助VLAN.但是我想为主VLAN设置端口地址时,出错: vlan 1030 mux-v

华为交换机基本配置命令

  华为交换机基本配置命令 一.单交换机VLAN划分 命令 命令解释 system 进入系统视图 system-view 进入系统视图 quit 退到系统视图 undo vlan 20 删除vlan 20 sysname 交换机命名 disp vlan 显示vlan vlan 20 创建vlan(也可进入vlan 20) port e1/0/1 to e1/0/5 把端口1-5放入VLAN 20 中 disp vlan 20 显示vlan里的端口20 int e1/0/24 进入端口24 por

华为交换机基础配置命令参考

华为交换机基础配置命令参考 基础配置 用户模式 登陆设备后,直接进入用户模式,只能执行少量查看配置的命令: 视图模式 用户模式下,输入system-view进入视图模式,可执行设备全局配置的命令: 局部配置模式 视图模式下,输入局部配置命令,如interface GE 1/0/0,进入GE1/0/0端口配置模式, 此外局部配置模式有很多种,可根据不同需求进入vlan配置模式.端口聚合配置模式等,可输入?,查看当前模式下,能执行哪些命令: 输入quit返回上一层配置模式,输入commit提交已有配

华为交换机S5700设置远程ssh telnet登录

如果是一台刚初始化过的华为交换机,需要输入两次相同的密码作为登录交换机的登录密码 交换机上有console 端口 MEth管理端口 usb端口 通过串口线配置S5700 的管理IP地址,串口线接在交换机的console口,ip设置完成后网线接在ETH口: <Quidway> system-view                   [Quidway] interface MEth 0/0/1[Quidway] interface MEth 0/0/1          [Quidway-ME

python脚本批量修改华为交换机端口配置

用python写的,主要是telnetlib库的应用,华为交换机批量修改端口配置,把已经UP的端口做一个port sec的mac sticky绑定,DOWN的端口,就clear配置信息. 使用前,先在交换机上 dis int bri,查出交换机的端口状态信息并复制到此脚本同目录下,以 IP.txt这样的格式命名的文件(比如 192.168.0.1对应 192.168.0.1.txt),以下内容记得把IP跟账号密码改成自己的. import sys,os,telnetlib,re ip = '你的

华为交换机sflow配置

华为交换机sflow功能配置 1.配置交换机的sflow流发送 [系统视图]sflow agen ip  x.x.x.x                 设置sflow输出源 [系统视图]sflow collector 1 ip x.x.x.x           设置sflow分析器组1并关联到IP x.x.x.x [系统视图]sflow collector 1 port 6432            设置sflow分析器组1输出端口 2.应用slow,配置交换机某个端口的slow功能 [系

华为交换机基本配置命令明细

1:配置登录用户,口令等 <Quidway>                   //用户直行模式提示符,用户视图 <Quidway>system-view        //进入配置视图 [Quidway]                  //配置视图(配置密码后必须输入密码才可进入配置视图) [Quidway] sysname xxx //设置主机名成为xxx这里使用 [Quidway] aaa  //进入aaa认证模式定义用户账户 [Quidway-aaa] local-u

华为交换机基础配置

一些华为的基础的命令行 system-view ------ 进入系统视图sysname-------R1修改主机名为R1 display version ------显示版本 display current-configuration -------查看交换机当前配置 save ----配置完交换机后保存当前配置的命令aaa-----进入三A视图vlan10-----创建一个vlan10display port vlan------显示当前各端口vlan情况undo terminal moni

华为交换机清除配置

1.清除端口配置 ```(cmd)<huawei>system-view[huawei]interface gigabitethernet 0/0/? (?:表示第几个端口)[huawei-GigabitEthernet0/0/?]clear configuration interface gigabitethernet 0/0/?清除该端口的配置后,该端口处于关闭状态,可以用以下命令重新开启.[huawei-GigabitEthernet0/0/?]undo shutdown # 2.清除交