說明:
在Switch上建立Etherchannel,讓PC用DHCP取得IP。
以下只有下方兩台設定(ASW2和DSW2)的Show Run,因差異不大。
為了減少行數,刪掉不必要的設定。
ps.只把有印象的寫出來,如果有錯誤或可以補充請回覆提醒,感謝!
實作條件:
一、 CLT2是屬於Vlan 4,利用DHCP取得IP。
二、 ASW2的Port 8、9和DSW2 Port 3、4做EtherChannel 3。
三、 DSW2 Port 5、6和DSW1某兩Port做EtherChannel 33。
提醒:
一、在3系列的Switch設定Trunk前需先設定封裝格式(如:dot1q、ISL)
二、在設定EtherChannel前先把Port 關閉。
三、記得設定Vlan 4 的IP做第三層,PC才能取得IP。
ASW2 Show Run如下:
ASW2#sh run
Building configuration...
Current configuration : 2174 bytes
!
! Last configuration change at 05:27:59 UTC Sun Dec 19 2010
! NVRAM config last updated at 03:20:41 UTC Sun Dec 19 2010
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log datetime
no service password-encryption
!
hostname ASW2
!
enable password cisco
!
ip subnet-zero
!
ip tcp synwait-time 5
no ip domain-lookup
vtp domain cisco VTP Domain設定為cisco
vtp mode transparent VTP的模式設定為Transparent
!
spanning-tree mode pvst Spanning-tree的模式設定成PVST
no spanning-tree optimize bpdu transmission
spanning-tree extend system-id
!
vlan 3-4,11-12,63-66
!
EtherChannel介面
interface Port-channel3 EtherChannel 3的設定
switchport mode trunk 設定成Trunk
flowcontrol send off
!
實體介面
interface FastEthernet0/1
description ASw2 0/1 - DSw1 0/3
!
interface FastEthernet0/2
description DO NOT CHANGE CONFIGURATION OF THIS INTERFACE
!
interface FastEthernet0/3
description ASw2 0/3 - CLT2 e 0
switchport access vlan 4 把Port設定成Vlan 4
switchport mode access 設定Access Port
speed 10
!
interface FastEthernet0/4
description ASw2 0/4 - CLT2 e 1
shutdown
speed 10
duplex half
!
interface FastEthernet0/5
description ASw2 0/5 - ASw1 0/5
shutdown
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
description ASw2 0/8 - DSw2 0/3
switchport mode trunk 設定成Trunk Port
channel-group 3 mode on 建立成EtherChannel 3模式為Auto
!
interface FastEthernet0/9
description ASw2 0/9 - DSw2 0/4
switchport mode trunk 設定成Trunk Port
channel-group 3 mode on 建立成EtherChannel 3模式為Auto
!
interface FastEthernet0/10
switchport access vlan 64 把Port設定成Vlan 64
switchport mode access 設定Access Port
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
Vlan介面
interface Vlan1
ip address 172.16.1.22 255.255.255.0 設定IP
no ip route-cache
!
ip default-gateway 172.16.1.222 設定Gateway
ip http server
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
ip netmask-format decimal
line vty 0 4
privilege level 15
password cisco
logging synchronous
login
line vty 5 15
login
!
end
DSW2 Show Run如下:
DSW2#sh run
Building configuration...
Current configuration : 2790 bytes
!
! Last configuration change at 05:48:13 UTC Sun Dec 19 2010
! NVRAM config last updated at 03:20:35 UTC Sun Dec 19 2010
!
version 12.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime
no service password-encryption
!
hostname DSW2
!
boot-start-marker
boot-end-marker
!
enable password cisco
!
no aaa new-model
system mtu routing 1500
vtp domain cisco VTP Domain設定為cisco
vtp mode transparent VTP的模式設定為Transparent
authentication mac-move permit
ip subnet-zero
no ip domain-lookup
!
ip dhcp pool vlan4 設定Vlan 4的DHCP POOL
network 172.16.4.0 255.255.255.0 分派172.16.4.1~254
default-router 172.16.4.1 Gateway給172.16.4.1
lease 8
!
spanning-tree mode pvst Spanning-tree的模式設定成PVST
spanning-tree etherchannel guard misconfig
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
vlan 3-4,11-12,63-66
!
ip tcp synwait-time 5
!
EtherChannel介面
interface Port-channel3 EtherChannel 3的設定
switchport trunk encapsulation dot1q Trunk模式設定成dot1q
switchport mode trunk 設定成Trunk Port
switchport nonegotiate
!
interface Port-channel33 EtherChannel 33的設定
switchport trunk encapsulation dot1q Trunk模式設定成dot1q
switchport mode trunk 設定成Trunk Port
!
實體介面
interface FastEthernet0/1
description DSw2 0/1 - ASw1 0/8
!
interface FastEthernet0/2
!
interface FastEthernet0/3
description DSw2 0/3 - ASw2 0/8
switchport trunk encapsulation dot1q Trunk模式設定成dot1q
switchport mode trunk 設定成Trunk Port
switchport nonegotiate
channel-group 3 mode on 建立成EtherChannel 3模式為Auto
!
interface FastEthernet0/4
description DSw2 0/4 - ASw2 0/9
switchport trunk encapsulation dot1q Trunk模式設定成dot1q
switchport mode trunk 設定成Trunk Port
switchport nonegotiate
channel-group 3 mode on 建立成EtherChannel 3模式為Auto
!
interface FastEthernet0/5
description DSw2 0/5 - DSw1 0/5
switchport trunk encapsulation dot1q Trunk模式設定成dot1q
switchport mode trunk 設定成Trunk Port
channel-group 33 mode on 建立成EtherChannel 3模式為Auto
!
interface FastEthernet0/6
description DSw2 0/6 - DSw1 0/6
switchport trunk encapsulation dot1q Trunk模式設定成dot1q
switchport mode trunk 設定成Trunk Port
channel-group 33 mode on 建立成EtherChannel 3模式為Auto
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
switchport access vlan 66 把Port設定成Vlan 66
switchport mode access 設定Access Port
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
Vlan介面
interface Vlan1
ip address 172.16.1.222 255.255.255.0 設定Vlan IP
!
interface Vlan4
ip address 172.16.4.254 255.255.255.0 設定Vlan IP
!
ip default-gateway 172.16.1.222 設定Gateway
ip classless
ip http server
no ip http secure-server
!
ip sla enable reaction-alerts
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
ip netmask-format decimal
line vty 0 4
privilege level 15
password cisco
logging synchronous
login
line vty 5 15
login
!
end
檢查指令:
Show Etherchannel Summary
Show Vlan
Show Vtp Status
留言列表