搜档网
当前位置:搜档网 › 华为交换机配置模板

华为交换机配置模板

华为交换机配置模板说明:该模板只能满足华为接入层交换机所需的基本配置要求。
///////// 配置主机名、登录验证//////////////
system-view
sysname HuaWei_test
super password level 1 cipher 456123
super password level 2 cipher 456123
super password level 3 cipher 456123
user-interface console 0
authentication-mode password
set authentication password cipher 456123
user privilege level 1
quit
user-interface vty 0 4
authentication-mode password
set authentication password cipher 456123
user privilege level 1
quit
///////// 配置主机名、登录验证//////////////
/////////配置Vlan ////////////////
system-view
vlan batch 2 to 6 9
quit
///////// 配置Vlan ////////////////
///////// 配置管理地址 ////////////
system-view
undo interface Vlanif 1
int Vlanif 2
ip address 192.168.2.1 255.255.255.0
undo shutdown
qu
qu
///////// 配置管理地址 ////////////
/////////配置access端口//////////////
system-view
interface Ethernet0/0/6
undo port link-type
undo port trunk allow-pass vlan all
undo port default vlan
port link-type access
port default vlan 6
undo negotiation auto
speed 100
quit
/////////配置access端口//////////////
/////////配置Trunk端口//////////////
system-view
interface Ethernet0/0/6
undo port link-type
undo port trunk allow-pass vlan all
undo port default vlan
port link-type trunk
port trunk allow-pass vlan 2 to 3 6 7
quit
/////////配置Trunk端口//////////////
////////////////配置某一VLAN通过DHCP分配IP///////////////////
system-view
dhcp snooping enable
vlan 6
################## DHCPIP-MAC绑定#############################
dhcp snooping bind-table static ip-address 192.168.6.254 mac-address 0000-1111-1234 interface Ethernet 0/0/2
################## DHCPIP-MAC绑定#############################
dhcp snooping enable
dhcp snooping trusted interface GigabitEthernet 0/0/1
dhcp option82 insert enable interface Ethernet 0/0/2 to 0/0/3
quit
////////////////配置某一VLAN通过DHCP分配IP///////////////////
////////////////清除启动配置文件、存盘、重启///////////////////
reset saved-configuration
save
reboot
////////////////清除启动配置文件、存盘、重启///////////////////

相关主题