dhcp怎么开启(dhcp在哪里设置启用)
一、若需将交换机之前配置清空,命令
reset saved-configuration 保存的配置文件将被删除
The saved configuration file will be erased. Are you sure? [Y/N]:y
保存的配置文件将被删除。你确定吗?[Y/N]:Y
reboot 重新启动
Current configuration may be lost after the reboot, save current configuration?[Y/N]:n
重新启动后,当前配置可能会丢失,请保存当前配置,选N
This command will reboot the device. Continue? [Y/N]:y
此命令将重新启动设备。持续 选Y
二、创建用户名和密码
local-user cd
password simple A123456789
authorization-attribute user-role level-15 授权属性用户角色级别15
service-type telnet 服务类型telnet
service-type http https
dhcp enable 启用 dhcp
ip http enable 启用 ip http
ip https enable
telnet server enable
undo info-center enable 关闭信息中心提示
三,创建vlan
vlan 2 3
interface range G1/0/2 to G1/0/8 接口范围:2至8口
port link-type access
port access vlan 2
int vlan2
ip address 192.168.2.1 24
dhcp server ip-pool 2
network 192.168.2.0 24
dns-list 114.114.114.114 8.8.8.8
gateway-list 192.168.2.1
forbidden-list 192.168.2.1
forbidden-list 192.168.2.254
配置vlan3
interface range G1/0/9 to G1/0/16
port link-type access
port access vlan 3
int vlan3
ip address 192.168.3.1 24
dhcp server ip-pool 3
network 192.168.3.0 24
dns-list 114.114.114.114 8.8.8.8
gateway-list 192.168.3.1
forbidden-list 192.168.3.1
forbidden-list 192.168.3.254
四,配置trunk端口,允许vlan互通
int g1/0/1
port link-type trunk
port trunk permit vlan all
display ip interface brief 显示ip接口简介
display vlan all 显示vlan全部
display current-configuration查看端口配置情况
display vlan all 显示vlan全部
display current-configuration查看端口配置情况