這次課我們做的實驗是交換機之間的級聯,把兩臺交換機上的各一個端口設置成串口模式,這樣兩臺交換機上的所有只要是同一VLAN 裏的端口都能連接。
先通過網卡1連上外網,通過網站登錄模式登錄實驗櫃的網站,從而連上一臺交換機,隊友同樣的方式連上另一臺交換機,對交換機進行基本配置。
把兩臺電腦的網卡2設置好IP地址,分別爲1.1.1.1 255.255.255.0 ,1.1.1.2 255.255.255.0 。
交換機1 把端口3設置成串口 端口1放在VALN 10裏面。
Switch(config)#hostname
% Incomplete command.
Switch(config)#hostname switch1
switch1(config)#vlan 10
switch1(config-vlan)#exit
switch1(config)#int fa0/1
switch1(config-if)#sw acc vlan 10
switch1(config-if)#
switch1#
%SYS-5-CONFIG_I: Configured from console by console
交換機2 端口1放在VALN 10裏面。
Switch(config)#hostname
% Incomplete command.
Switch(config)#hostname switch1
switch1(config)#vlan 10
switch1(config-vlan)#exit
switch1(config)#int fa0/1
switch1(config-if)#sw acc vlan 10
switch1(config-if)#
switch1#
%SYS-5-CONFIG_I: Configured from console by console
在把端口設置成串口之前兩臺電腦是不能通的
交換機1 把端口3設置成串口 端口1放在VALN 10裏面。
witch2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
switch2(config)#intf0/3
^
% Invalid input detected at '^' marker.
switch2(config)#int f0/3
switch2(config-if)#sw mode trunk
switch2(config-if)#exit
switch2(config)#
%SYS-5-CONFIG_I: Configured from console by console
做完以上步驟我們能發現這兩臺電腦可以相互ping通