<huawei>system-view 簡寫:sy |
進入系統(tǒng)視圖 |
[huawei]sysname huawei |
交換機命名 |
[huawei]quit 簡寫:q |
返回上一級 |
[huawei]return 簡寫:ret |
直接返回用戶視圖 |
<huawei>save 簡寫:sa |
保存配置 |
<huawei>reboot |
重啟設備 |
[huawei]dis cur |
查看配置 |
[huawei]dis vlan |
查看Vlan |
[huawei]dis int g0/0/1 |
查看端口 |
[huawei]vlan 100 |
新建Vlan |
[huawei]undo vlan 100 |
刪除Vlan |
[huawei-vlan100]port g0/0/1 |
把端口放入Vlan 100 中 |
[huawei-vlan100]undo port g0/0/1 |
表示刪除當前Vlan端口1 |
[huawei-vlan100]description wifi |
命名Vlan |
[huawei]int vlan 100 |
進入Vlan |
[huawei-vlanif100]ip address |
配置Vlan管理地址 |
[huawei]int g0/0/1 |
進入端口 |
[huawei-GigabitEthernet0/0/1]port link-type access |
設置端口為access模式 |
[Huawei-GigabitEthernet0/0/1]port default vlan 100 |
把端口放入Vlan 100 中 |
[huawei-GigabitEthernet0/0/1]port link-type trunk |
設置端口為trunk模式 |
[huawei-G0/0/1]port trunk allow-pass vlan all |
設置允許所有Vlan 的報文通過 |
[huawei-GigabitEthernet0/0/1]undo port link-type |
刪除端口配置 |
<huawei>reset saved-configuration |
檫除舊的配置文件 |
[Huawei-Vlanif60]dhcp select global |
DHCP獲取范圍從全局global獲取 |
端口劃入Vlan前,必須設置為access模式
端口批量加入Vlan
[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 authenticationpassword
Telnet配置
[huawei]int vlan 1
[Quidway-Vlanif1]ip address 192.168.1.100255.255.255.0 設置管理地址
[huawei]aaa 進入aaa配置模式
[huawei-aaa]local-user admin password 設置admin密碼
[huawei-aaa]local-user admin privilege level3 然后設置登陸權(quán)限
[huawei-aaa]local-user admin service-typetelnet 設置登錄類型
[huawei]user-interface vty 0 4 進入認證配置模式
[huawei-ui-vty0-4]authentication-modeaaa 設置aaa認證
恢復交換機出廠配置
<huawei>reset saved-configuration 檫除舊的配置文件
<huawei>reboot 交換機重啟
xt startup:, Continue?[Y/N]:n 此處選N
忘記console密碼,恢復交換機出廠配置
設備重啟時按Ctrl+B進入BOOT MENU之后,默認密碼是:Admin@huawei.com
第一步、選擇7;第二步、Y;第三步、選擇1。
華為三層交換機做DHCP服務
配置三層交換機S5700
<Huawei>system-view 進入系統(tǒng)模式
[Huawei]dhcp enable 開啟dhcp服務
[Huawei]dhcp snooping enable 開啟dhcp過濾功能
[Huawei]ip pool aa 創(chuàng)建地址池aa
[Huawei-ip-pool-aa]network 192.168.10.1mask 255.255.255.0 子網(wǎng)IP和掩碼
[Huawei-ip-pool-aa]gateway-list192.168.10.1 網(wǎng)關(guān)地址
[Huawei-ip-pool-aa]dns-list203.208.24.28 配置DNS列表
[Huawei-ip-pool-aa]excluded-ip-address192.168.10.2 192.168.10.50 排除地址
[Huawei]ip pool bb 創(chuàng)建地址池bb
[Huawei-ip-pool-aa]network 192.168.20.1mask 255.255.255.0 子網(wǎng)IP和掩碼
[Huawei-ip-pool-aa]gateway-list192.168.20.1 網(wǎng)關(guān)地址
[Huawei-ip-pool-aa]dns-list 203.208.24.28 配置DNS列表
[Huawei-ip-pool-aa]excluded-ip-address192.168.20.2 192.168.20.50 排除地址
[Huawei-ip-pool-aa]return
<Huawei>sy
[Huawei]vlan 10
[Huawei-vlan10]quit
[Huawei]int vlan 10 進入vlan 10端口
[Huawei-Vlanif10]ip address 192.168.10.1255.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.1255.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-typetrunk 設置端口為trunk模式
[Huawei-GigabitEthernet0/0/1]port trunkallow-pass vlan all 設置允許所有Vlan 的報文通過
[Huawei-GigabitEthernet0/0/1]quit
[Huawei]int g0/0/2 進入端口
[Huawei-GigabitEthernet0/0/2]port link-typetrunk 設置端口為trunk模式
[Huawei-GigabitEthernet0/0/2]port trunkallow-pass vlan all 設置允許所有Vlan 的報文通過
[Huawei-GigabitEthernet0/0/2]return
<Huawei>save 保存配置
Are you sure to continue?[Y/N]y
配置二層交換機(1)S3700
<Huawei>sy
[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]port link-type trunk
[Huawei-Ethernet0/0/1]port trunk allow-passvlan 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
<Huawei>save
配置二層交換機(2)S3700
<Huawei>sy
[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]port link-type trunk
[Huawei-Ethernet0/0/1]port trunk allow-passvlan 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
<Huawei>save