[huawei]port-group yewu
[huawei-port-group-yewu]group-member g0/0/4 to g0/0/6 [huawei-port-group-yewu]port link-type access [huawei-port-group-yewu]port default vlan 100
密码配置
[Quidway]user-interface con 0
[Quidway-ui-console0]set authentication password
Telnet配置
[huawei]int vlan 1
[Quidway-Vlanif1]ip address 192.168.1.100 255.255.255.0 设置管理地址 [huawei]aaa 进入aaa配置模式
[huawei-aaa]local-user admin password 设置admin密码
[huawei-aaa]local-user admin privilege level 3 然后设置登陆权限 [huawei-aaa]local-user admin service-type telnet 设置登录类型 [huawei]user-interface vty 0 4 进入认证配置模式
[huawei-ui-vty0-4]authentication-mode aaa 设置aaa认证
恢复交换机出厂配置
忘记console密码,恢复交换机出厂配置
设备重启时按Ctrl+B进入BOOT MENU之后,默认密码是:Admin@huawei.com 第一步、选择7;第二步、Y;第三步、选择1。
华为三层交换机做DHCP服务
配置三层交换机S5700
[Huawei]dhcp snooping enable 开启dhcp过滤功能 [Huawei]ip pool aa 创建地址池aa
[Huawei-ip-pool-aa]network 192.168.10.1 mask 255.255.255.0 子网IP和掩码 [Huawei-ip-pool-aa]gateway-list 192.168.10.1 网关地址 [Huawei-ip-pool-aa]dns-list 203.208.24.28 配置DNS列表
[Huawei-ip-pool-aa]excluded-ip-address 192.168.10.2 192.168.10.50 排除地址 [Huawei]ip pool bb 创建地址池bb
[Huawei-ip-pool-aa]network 192.168.20.1 mask 255.255.255.0 子网IP和掩码 [Huawei-ip-pool-aa]gateway-list 192.168.20.1 网关地址 [Huawei-ip-pool-aa]dns-list 203.208.24.28 配置DNS列表
[Huawei-ip-pool-aa]excluded-ip-address 192.168.20.2 192.168.20.50 排除地址 [Huawei-ip-pool-aa]return
[Huawei]vlan 10 [Huawei-vlan10]quit
[Huawei]int vlan 10 进入vlan 10端口
[Huawei-Vlanif10]ip address 192.168.10.1 255.255.255.0 为vlan 10配置IP地址 [Huawei-Vlanif10]dhcp select global DHCP获取范围从全局global获取 [Huawei-Vlanif10]quit [Huawei]vlan 20 [Huawei-vlan10]quit
[Huawei]int vlan 20 进入vlan 20端口
[Huawei-Vlanif20]ip address 192.168.20.1 255.255.255.0 为vlan 20配置IP地址 [Huawei-Vlanif20]dhcp select global DHCP获取范围从全局global获取 [Huawei-Vlanif20]quit
[Huawei]int g0/0/1 进入端口
[Huawei-GigabitEthernet0/0/1]port link-type trunk 设置端口为trunk模式
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan all 设置允许所有Vlan 的报文通过 [Huawei-GigabitEthernet0/0/1]quit
[Huawei]int g0/0/2 进入端口
[Huawei-GigabitEthernet0/0/2]port link-type trunk 设置端口为trunk模式
[Huawei-GigabitEthernet0/0/2]port trunk allow-pass vlan all 设置允许所有Vlan 的报文通过 [Huawei-GigabitEthernet0/0/2]return
配置二层交换机(1)S3700
[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]port link-type trunk
[Huawei-Ethernet0/0/1]port trunk allow-pass vlan all [Huawei-Ethernet0/0/1]q [Huawei]int e0/0/2
[Huawei-Ethernet0/0/2]port link-type access [Huawei-Ethernet0/0/2]q [Huawei]vlan 10
[Huawei-vlan10]port e0/0/2 [Huawei-vlan10]ret
配置二层交换机(2)S3700
[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]port link-type trunk
[Huawei-Ethernet0/0/1]port trunk allow-pass vlan all [Huawei-Ethernet0/0/1]q [Huawei]vlan 20 [Huawei-vlan20]q [Huawei]int e0/0/2
[Huawei-Ethernet0/0/2]port link-type access [Huawei-Ethernet0/0/2]port default vlan 20 [Huawei-Ethernet0/0/2]ret