close

1.png 

說明:

此Lab為舜超老師自己研發,三種設定Vlan溝通的方式在同一個Lab裡。

這次不在Show Run做解釋,因為最下面有我打的指令並做解釋,

如果要自己先玩的人請先不要拉最下面,為了減少行數,刪掉不必要的設定。


實作條件:

一、各樓層Switch各拉兩條到Core_SW並各設定三條EtherChannel。

二、一樓設定Vlan 11;二樓設定Vlan 12;三樓設定Vlan 13。

三、1F_SW與Core之間利用Trunk模式。

四、2F_SW與Core之間利用Access模式。

五、3F_SW與Core之間利用Routing模式。

六、三台PC皆互Ping的到。

 

備註:

設定完EtherChannel時,記得要先檢查Show Run,

是不是有把Port的設定複製到EtherChannel,這是Packet Tracert 的Bug。

 

Packet Tracert 檔案下載

內有完成檔案(SW_Vlan_OK)、與只拉好線的檔案(SW_Vlan_Int)


1F_SW Show Run如下:

1F_SW#sh run

Building configuration...

Current configuration : 2276 bytes

!

version 12.2

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname 1F_SW

!

interface FastEthernet0/1

switchport access vlan 11

switchport mode access

!

interface FastEthernet0/2

switchport access vlan 11

switchport mode access

!

interface FastEthernet0/23

channel-group 1 mode on

switchport mode trunk

!

interface FastEthernet0/24

channel-group 1 mode on

switchport mode trunk

!

interface Port-channel 1

switchport mode trunk

!

interface Vlan1

no ip address

shutdown

!

end


2F_SW Show Run如下:

2F_SW#sh run

Building configuration...

Current configuration : 1693 bytes

!

version 12.2

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname 2F_SW

!

interface FastEthernet0/1

switchport mode access

!

interface FastEthernet0/2

switchport mode access

!

interface FastEthernet0/23

channel-group 2 mode active

switchport mode access

!

interface FastEthernet0/24

channel-group 2 mode active

switchport mode access

!

interface Port-channel 2

switchport mode access

!

interface Vlan1

no ip address

shutdown

!

end


3F_SW Show Run如下:

3F_SW#sh run

Building configuration...

Current configuration : 2413 bytes

!

version 12.2

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname 3F_SW

!

ip routing

!

interface FastEthernet0/1

switchport access vlan 13

switchport mode access

!

interface FastEthernet0/2

switchport access vlan 13

switchport mode access

!

interface FastEthernet0/23

channel-group 3 mode desirable

!

interface FastEthernet0/24

channel-group 3 mode desirable

!

interface Port-channel 3

no switchport

ip address 10.0.0.1 255.255.255.0

!

interface Vlan1

no ip address

shutdown

!

interface Vlan13

ip address 192.168.13.254 255.255.255.0

!

ip classless

ip route 0.0.0.0 0.0.0.0 10.0.0.2

!

end


Core_SW Show Run如下:

CORE_SW#sh run

Building configuration...

Current configuration : 1862 bytes

!

version 12.2

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname CORE_SW

!

ip routing

!

interface FastEthernet0/1

channel-group 1 mode on

switchport trunk encapsulation dot1q

switchport mode trunk

!

interface FastEthernet0/2

channel-group 1 mode on

switchport trunk encapsulation dot1q

switchport mode trunk

!

interface FastEthernet0/3

channel-group 2 mode active

switchport access vlan 12

switchport mode access

!

interface FastEthernet0/4

channel-group 2 mode active

switchport access vlan 12

switchport mode access

!

interface FastEthernet0/5

channel-group 3 mode desirable

!

interface FastEthernet0/6

channel-group 3 mode desirable

!

interface Port-channel 1

switchport trunk encapsulation dot1q

switchport mode trunk

!

interface Port-channel 2

switchport access vlan 12

switchport mode access

!

interface Port-channel 3

no switchport

ip address 10.0.0.2 255.255.255.0

!

interface Vlan1

no ip address

shutdown

!

interface Vlan11

ip address 192.168.11.254 255.255.255.0

!

interface Vlan12

ip address 192.168.12.254 255.255.255.0

!

ip classless

ip route 192.168.13.0 255.255.255.0 10.0.0.1

!

end


指令 Command:

1F_SW(config)#vl 11 建立Vlan 11

1F_SW(config-vlan)#int ra f0/1 - 22

1F_SW(config-if-range)#sw mo ac 設定成Access Port

1F_SW(config-if-range)#sw ac vl 11 Port指定給Vlan 11

1F_SW(config-if-range)#int ra f0/23 - 24

1F_SW(config-if-range)#sw mo tr 設定成Trunk Port

1F_SW(config-if-range)#shut 先把Port關閉

1F_SW(config-if-range)#channel-group 1 mode on 設定EtherChannel 1模式為Auto

1F_SW(config-if-range)#no shut 等Core_SW設定好Port再打開


2F_SW(config)#int ra f0/1 - 24

2F_SW(config-if-range)#sw mo ac 設定成Access Port

2F_SW(config-if-range)#int ra f0/23 - 24

2F_SW(config-if-range)#shut 先把Port關閉

2F_SW(config-if-range)#channel-group 2 mode active 設定EtherChannel 2模式為LACP

2F_SW(config-if-range)#no shut 等Core_SW設定好Port再打開


3F_SW(config)#vl 13 建立Vlan 13

3F_SW(config-vlan)#int vl 13

3F_SW(config-if)#ip add 192.168.13.254 255.255.255.0 設定Vlan 13的IP

3F_SW(config-if)#int ra f0/1 - 22

3F_SW(config-if-range)#sw mo ac 設定成Access Port

3F_SW(config-if-range)#sw ac vl 13 Port指定給Vlan 13

3F_SW(config)#int ra f0/23 - 24

3F_SW(config-if-range)#shut 先把Port關閉

3F_SW(config-if-range)#channel-group 3 mode desirable 設定EtherChannel 3模式為PAgP

3F_SW(config-if-range)#int port-channel 3

3F_SW(config-if)#no sw 設定成Route Port

3F_SW(config-if)#ip add 10.0.0.1 255.255.255.0 設定IP

3F_SW(config-if)#no shut

3F_SW(config-if)#exit

3F_SW(config)#int ra f0/23 - 24

3F_SW(config-if-range)#no shut 等Core_SW設定好Port再打開

3F_SW(config)#ip routing Switch設定成可路由模式

3F_SW(config)#ip route 0.0.0.0 0.0.0.0 10.0.0.2 指定靜態路由


CORE_SW(config)#int ra f0/1 - 2

CORE_SW(config-if-range)#sw tr encapsulation dot1q 設定Trunk封裝模式為dot1q

CORE_SW(config-if-range)#sw mo tr 設定成Trunk Port

CORE_SW(config-if-range)#channel-group 1 mode on 設定EtherChannel 1模式為Auto

CORE_SW(config)#int port-channel 1 因PKT的關係,指令要自己再打一次

CORE_SW(config-if)#sw tr en dot1q

CORE_SW(config-if)#sw mo tr

CORE_SW(config)#vl 11 建立Vlan 11

CORE_SW(config-vlan)#int vl 11

CORE_SW(config-if)#ip add 192.168.11.254 255.255.255.0 設定Vlan 11的IP


CORE_SW(config)#vl 12 建立Vlan 12

CORE_SW(config-vlan)#int vl 12

CORE_SW(config-if)#ip add 192.168.12.254 255.255.255.0 設定Vlan 12的IP

CORE_SW(config)#int ra f0/3 - 4

CORE_SW(config-if-range)#sw mo ac 設定成Access Port

CORE_SW(config-if-range)#sw ac vl 12 Port指定給Vlan 12

CORE_SW(config-if-range)#channel-group 2 mode active 設定EtherChannel 2模式為LACP

CORE_SW(config)#int port-channel 2 因PKT的關係,指令要自己再打一次

CORE_SW(config-if)#sw mo ac

CORE_SW(config-if)#sw ac vl 12


CORE_SW(config-if-range)#channel-group 3 mode desirable 設定EtherChannel 3模式為PAgP

CORE_SW(config-if-range)#int port-channel 3

CORE_SW(config-if)#no sw 設定成Route Port

CORE_SW(config-if)#ip add 10.0.0.2 255.255.255.0 設定IP

CORE_SW(config-if)#no shut

CORE_SW(config)#ip routing Switch設定成可路由模式

CORE_SW(config)#ip route 192.168.13.0 255.255.255.0 10.0.0.1 指令靜態路由


pic005.png 

pic006.png

pic007.png

pic008.png


arrow
arrow
    全站熱搜

    EdisonChang 發表在 痞客邦 留言(0) 人氣()