一、交換機的工作原理
1、基於源Mac地址的學習
2、基於已知目標Mac地址的轉發
3、當目標Mac地址未知時,泛洪處理
4、交換機收到廣播,組播幀時,無條件泛洪處理
5、交換機一個接收可以學習多個Mac地址
6、交換機學習同一個Mac地址,但是從不同端口學習到的,此時將Mac與后學習到的端口綁定起來
二、交換機以太網口的工作模式 :單工‘、半雙工、全雙工
三、華為模擬器ensp關於交換機常用的命令
用戶視圖 >system-view #僅僅能查看和調試用如ping telnet
系統視圖 [ ] 配置、查看
一級退出 quit
完全退出 return
重命名 [ ] sysname R1 #如重命名為R1
設置永不超時 user-interface console 0
idle-timeout 0 0
關閉彈出信息 <> undo terminal monitor
啟始文件 saved-configuration
當前配置文件 current-configuration
查看 display
保存 save
擦除起始文件 reset saved-config (用戶視圖下)
開啟接口 undo shutdown
四、ensp實驗用crt連接交換機
1、熟悉上面的常用的命令
配置雲的方法,如下添加兩個網卡
· 2、配置好,后連接交換機,然后就能實現啟動了如下,框選后啟動
3、常用命令學習
The device is running!
<Huawei>
<Huawei>undo ter
<Huawei>undo terminal mo
<Huawei>undo terminal monitor
Info: Current terminal monitor is off.
<Huawei>sy
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW1
[SW1]user-in
[SW1]user-interface cons
[SW1]user-interface console 0
[SW1-ui-console0]idle
[SW1-ui-console0]idle-timeout 0 0
[SW1-ui-console0]q
[SW1]disp
[SW1]display cur
[SW1]display current-configuration
#
sysname SW1
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
drop-profile default
#
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 MEth0/0/1
[SW1]disa
[SW1]disa
[SW1]disp
[SW1]display save
[SW1]display saved-configuration
[SW1]qu
[SW1]quit
<SW1>save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]:
Now saving the current configuration to the slot 0.
Save the configuration successfully.
<SW1>reset
<SW1>reset sav
<SW1>reset saved-configuration
Warning: The action will delete the saved configuration in the device.
The configuration will be erased to reconfigure. Continue? [Y/N]:n
<SW1>sy
<SW1>system-view
Enter system view, return user view with Ctrl+Z.
[SW1]int e0/0/1
[SW1-Ethernet0/0/1]ip add 192.168.2.66 24
^
Error: Unrecognized command found at '^' position.
[SW1-Ethernet0/0/1]q
[SW1]int vlanif 1
[SW1-Vlanif1]ip add 192.168.1.66 24
[SW1-Vlanif1]undo shutdown
Info: Interface Vlanif1 is not shutdown.
[SW1-Vlanif1]dis this
#
interface Vlanif1
ip address 192.168.1.66 255.255.255.0
#
return
[SW1-Vlanif1]q
[SW1]user-in
[SW1]user-interface vty 0 4
[SW1-ui-vty0-4]aut
[SW1-ui-vty0-4]authentication-mode pass
[SW1-ui-vty0-4]authentication-mode password ?
<cr>
[SW1-ui-vty0-4]authentication-mode password set au
[SW1-ui-vty0-4]authentication-mode password set auth
[SW1-ui-vty0-4]set authentication-mode password ?
^
Error: Unrecognized command found at '^' position.
[SW1-ui-vty0-4]set auth
[SW1-ui-vty0-4]set authentication passw
[SW1-ui-vty0-4]set authentication password sim
[SW1-ui-vty0-4]set authentication password ?
cipher Set the password with cipher text
simple Set the password in plain text
[SW1-ui-vty0-4]set authentication password sim
[SW1-ui-vty0-4]set authentication password simple huawei
[SW1-ui-vty0-4]user pri
[SW1-ui-vty0-4]user privilege lev
[SW1-ui-vty0-4]user privilege level 3
4、用telnet連接網絡地址
上面用telnet連接有點問題先不管的
五、實現了用密碼telnetWS1交換機
如圖ws1配置不變 配置ws2的配置上圖