[GNS3 Labs. Cisco] STP(Spanning Tree Protocol)

[GNS3 Labs. Cisco] STP(Spanning Tree Protocol)

* STP 용어
. STP(Spanning Tree Protocol) – 스패닝 트리 프로토콜 (STP)은 네트워크를 모니터링하여 모든 링크를 추적하고 중복된 네트워크를 차단함으로써 L2네트워크 브리지 또는 스위치에서 네트워크 루프를 방지한다.
. Root Bridge – 가장낮은 bridge ID를 가지는 브릿지. STP 네트워크에서 root bridge로 선출된 스위치는 네트워크의 초점이 된다.
root bridge가 선출되면 다른 bridge들은 root bridge에 단 하나의 경로만 만들어진다. root bridge에 최적의 경로가있는 포트를 root port라 한다.
. Non-root bridge – root bridge가 아닌 다른 모든 bridge. 다른 bridge들과 BPDU를 교환하고 STP topology 데이타베이스를 업데이트한다.
BPDU(Bridge Protocol Data Unit) – 모든 스위치는 네트워크의 다음 구성에 사용할 정보를 교환한다. 각 스위치는 BPDU의 파라메터를 이웃 으로 보내는 BPDU 파라메터와 비교한다. BPDU내에 bridge ID가 있다.
. Bridge ID – STP가 네트워크의 모든 스위치를 추적하는 방법으로 bridge 우선순위와 기본 MAC 주소의 조합으로 결정된다. 가장 낮은 bridge ID로 네트워크의 root bridge가 결정된다. root bridge가 결정되면, 모든 스위치들은 root bridge에 하나의 경로만 만들어야 한다.
대부분의 네트워크는 bridge 우선 순위를 기본값보다 낮게 설정해서 특정 bridge 또는 스위치를 root bridge로 강제 설정한다.
. Port cost – 두 스위치 사이에 멀티 링크가 있을때 최적의 경로를 결정한다. 링크의 cost는 대역폭으로 결정되며 이 경로의 cost는 모든 bridge에서 root bridge로 가장 효율적인 경로를 찾는데 사용되는 결정 요소다.
.Path cost – 스위치는 root bridge에 대한 경로에서 하나 이상의 스위치를 거칠 수 있으며, 하나 이상의 경로가 있을 수 있다. 모든 고유 경로는 개별적으로 분석되고, path cost는 root bridge로 가기 위해 발생하는 개별 port cost를 추가해서 각 경로에 대해 계산된다.

* Bridge Port Role

. STP는 스위치의 어떤 포트가 spanning-tree 알고리즘으로 작동하도록 하는지를 결정하기위해 role을 사용한다.
. Root port – 루트 브리지에 대해 가장 낮은 path cost를 가지는 링크다.root bridge는 root port를 가질 수 없지만 다른 모든 스위치는 하나의 root port를 가져야 한다.
. Designated port – designated port는 해당 세그먼트의 다른 포트와 비교했을 때 주어진 세그먼트에 도달하는데 가장 적은 cost로 결정된 네트워크 포트다. 이 포트는 forward port로 표시되며 세그먼트당 하나의 forward 포트만 가질 수 있다.
. Non-designated port – root port와 designated port가 결정된 후에 남아있는 포트로 bloking 또는 discarding 모드로설정된다.
. Forwarding port – forwarding 포트는 프레임을 전달하고 root 포트나 designated 포트가 된다.
. Blocked port – blocked 포트는 loop를 방지하기 위해 프레임을 전달하지 않는다. blocked 포트는 여전히 BPDU 프레임을 수신하지만, 다른 프레임은 모두 삭제하고 전송하지 않는다.
. Alternate port – 802.1d 차단상태이며, 802.1w(시스코 RSTP)에서 사용하는 용어. 둘 이상의 스위치와 연결된 LAN 세그먼트에 연결되어 있는 스위치에 있으며, 다른 수위치중의 하나에 designated 포트가 있다.
. Backup port – 802.1d blocking 상태에 해당하며 802.1w에 사용하는 용어. 해당 스위치의 다른 포트가 designated 포트로 작동하는 LAN 세그먼트에 연결된다.

* Spanning-tree Port 상태
IEEE 802.1d STP 를 실행하는 스위치나 브릿지의 포트는 다섯개의 서로다른 상태로 바뀔 수 있다.

. Disabled – 관리상 비활성된 포트. STP에 참여하지 않고, 사실상 작동하지 않는다.
. Blocking – 프레임을 전달하지 않지만 BPDU를 수신하며, loop된 경로의 사용을 방지한다. 전원이 켜지면 모든 포트가 bloking 상태가됨.
. Listening – BPDU를 수신하고 데이타 프레임을 전달하기 전에 네트워크에서 loop가 발생하는것을 막는다. 이 상태의 포트는MAC address 테이블을 채우지 않고 데이타 프레임을 전달할 준비를 한다.
. Learning – 스위치 포트는 BPDU를 수신하고 switched 네트워크의 모든 경로를 learning 한다. 이 상태의 포트는 MAC address 테이블을 채우지만 데이타 프레임을 전달하지는 않는다.
. Forwarding – 이 포트는 bridged port 에서 모든 데이타 프레임을 주고 받는다. learning 상태의 끝에서 여전히 root 포트나 designated 포트인 경우 forward 상태가 된다.

* Convergence(수렴)
스위치나 브릿지의 모든 포트가 forwarding 또는 blocking 상태로 바뀔때 convergence가 발생하고 끝날 때 까지 어떤 데이타도 전달되지 않는다.

* Link Cost
port cost는 link 속도를 기반으로 하며, link cost는 아래와 같다.

IEEE STP link costs
Speed         Cost
10 Mb/s       100
100 Mb/s       19
1000 Mb/s       4
10,000 Mb/s     2

port cost는 단일 링크의 비용이지만 path cost는 root 브릿지에대한 다양한 port cost의 합이다. link cost는 단일 root port를 선택하기위해 STP 계산에 사용된다.

* Spanning-tree 프로토콜의 유형
. IEEE 802.1d – CST(Common Spanning Tree)라고도 하며, STP 표준으로 느리지만 리소스가 거의 필요하지 않다.
. PVST+ – 각 VLAN에대해 별도의 802.1d spanning tree 인스턴스를 제공하는 Cisco 제공 STP.
. IEEE 802.1w – RSTP(Rapid Spanning Tree protocol)라고도 한다.
. Rapid PVST+ – Cisco 버전의 RSTP로 PVST+와 VLAN당 802.1w 개별 인스턴스를 제공한다.

* PortFast & BPDU Guard
스위치에 연결된 서버나 다른 장치가 루프를 만들지 않는 경우 STP가 비활성되어 있다면 이런 포트에서는 PortFast라는 802.1d 표준에대한 시스코독점 확장을 사용할 수 있다.
스위치 포트에 FastPort를 사용한다면,BPDU Guard를 사용하는 것이 좋다. FastPort가 활성화된 포트에서 BPDU를 수신하면 해당 포트를 err-disabled(shutdown)상태로 만들어 그 포트에 다른 스위치나 허브를 연결하는 것을 방지한다.

* EtherChannel
Cisco에서 여러 fast ethernet이나 gigabit ethernet 포트를 하나의 논리 채널로 그룹화하기위해 개발한 port channel 기술이다.
Cisco EtherChannel은 스위치 사이에 8포트까지 묶을 수 있고, 이 링크는 같은 duplex, 속도, VLAN 설정이어햐 한다.
. PAgP(Port Aggreation Protocol) – Cisco 버전의 port channel negotiation protocol
. LACP(Link Aggreation Control Protocol) – IEEE 802.3ad 표준 port channel negotiation protocol.
. Port Channeling – 두 스위치 사이에 2-8개의 FastEthernet 이나 2개의 GigabitEthernet 포트를 결합하여 하나의 논리 링크를 만들어 대역폭과 탄력성을 확보한다.

아래 구성은 IOU2 스위치로 구성했으며, 각 스위치는 VLAN 2,3이 추가 되어 있고, 모든 링크는 trunk 모드다.

1. Root Bridge 찾기
switch3 에서, STP 정보를 확인한다.

switch3#sh spanning-tree vlan 2

VLAN0002
  Spanning tree enabled protocol ieee
  Root ID    Priority    32770
             Address     aabb.cc00.0100
             Cost        23
             Port        3 (Ethernet0/2)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32770  (priority 32768 sys-id-ext 2)
             Address     aabb.cc00.0300
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Desg FWD 19        128.1    Shr
Et0/1               Altn BLK 100       128.2    Shr
Et0/2               Root FWD 4         128.3    Shr
Et0/3               Altn BLK 4         128.4    Shr

이 스위치는 Root 포트를 가지고 있으므로, Root Bridge가 아니다.

이제, Root 포트(e0/2)에 연결된 스위치를 찾는다.

switch3#sh cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone,
                  D - Remote, C - CVTA, M - Two-port Mac Relay

Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID
switch2          Eth 0/3           159             R S I  Linux Uni Eth 0/3
switch2          Eth 0/2           159             R S I  Linux Uni Eth 0/2
switch1          Eth 0/1           159             R S I  Linux Uni Eth 0/1

root port는 switch2와 연결되어 있다. switch2 에서 STP를 확인한다.

switch2#sh spanning-tree vlan 2

VLAN0002
  Spanning tree enabled protocol ieee
  Root ID    Priority    32770
             Address     aabb.cc00.0100
             Cost        19
             Port        1 (Ethernet0/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32770  (priority 32768 sys-id-ext 2)
             Address     aabb.cc00.0200
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Root FWD 19        128.1    Shr
Et0/1               Desg FWD 100       128.2    Shr
Et0/2               Desg FWD 4         128.3    Shr
Et0/3               Desg FWD 4         128.4    Shr

e0/0이 root 포트이므로, 이 스위치 역시 Root Bridge가 아니다. 이제, e0/0에 연결된 스위치를 찾는다.

switch2#sh cdp neighbors e0/0
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone,
                  D - Remote, C - CVTA, M - Two-port Mac Relay

Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID
switch1          Eth 0/0           154             R S I  Linux Uni Eth 0/0

e0/0이 switch1과 연결되어 있으므로, switch에서 STP를 확인해본다.

switch1#sh spanning-tree vlan 2

VLAN0002
  Spanning tree enabled protocol ieee
  Root ID    Priority    32770
             Address     aabb.cc00.0100
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32770  (priority 32768 sys-id-ext 2)
             Address     aabb.cc00.0100
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Desg FWD 19        128.1    Shr
Et0/1               Desg FWD 19        128.2    Shr
Et0/2               Desg FWD 100       128.3    Shr
Et0/3               Desg FWD 100       128.4    Shr

switch1이 root 포트를 가지지 않았으므로, 이 스위치가 Root Bridge임을 확인할 수 있다.

switch1#sh spanning-tree summary
Switch is in pvst mode
Root bridge for: VLAN0001-VLAN0003
Extended system ID           is enabled
Portfast Default             is disabled
PortFast BPDU Guard Default  is disabled
Portfast BPDU Filter Default is disabled
Loopguard Default            is disabled
EtherChannel misconfig guard is enabled
Configured Pathcost method used is short
UplinkFast                   is disabled
BackboneFast                 is disabled

Name                   Blocking Listening Learning Forwarding STP Active
---------------------- -------- --------- -------- ---------- ----------
VLAN0001                     0         0        0         16         16
VLAN0002                     0         0        0          4          4
VLAN0003                     0         0        0          4          4
---------------------- -------- --------- -------- ---------- ----------
3 vlans                      0         0        0         24         24

위 결과를 보면, switch1이 모든 VLAN의 root bridge임을 확인 할 수 있다.

2. Root Bridge 설정과 확인
non-root bridge 상태의 스위치에서 STP를 확인한다. switch2에서 VLAN 1의 STP정보를 확인해 본다.

switch2#sh spanning-tree vlan 1

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     aabb.cc00.0100
             Cost        19
             Port        1 (Ethernet0/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
             Address     aabb.cc00.0200
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Root FWD 19        128.1    Shr
Et0/1               Desg FWD 100       128.2    Shr
Et0/2               Desg FWD 4         128.3    Shr
Et0/3               Desg FWD 4         128.4    Shr
Et1/0               Desg FWD 100       128.5    Shr
Et1/1               Desg FWD 100       128.6    Shr
Et1/2               Desg FWD 100       128.7    Shr

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------

Et1/3               Desg FWD 100       128.8    Shr
Et2/0               Desg FWD 100       128.9    Shr
Et2/1               Desg FWD 100       128.10   Shr
Et2/2               Desg FWD 100       128.11   Shr
Et2/3               Desg FWD 100       128.12   Shr
Et3/0               Desg FWD 100       128.13   Shr
Et3/1               Desg FWD 100       128.14   Shr
Et3/2               Desg FWD 100       128.15   Shr
Et3/3               Desg FWD 100       128.16   Shr

Root Bridge에 e0/0 포트로 직접 연결되어 있는것을 확인 할 수 있다.

이제, 우선순위를 바꿔서 VLAN 1의 Root Bridge로 변경해 본다. 우선순위를 16384로 변경한다.

switch2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
switch2(config)#spanning-tree vlan 1 priority 16384
switch2(config)#end

VLAN 1의 STP정보를 확인해본다.

switch2#sh spanning-tree vlan 1

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    16385
             Address     aabb.cc00.0200
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    16385  (priority 16384 sys-id-ext 1)
             Address     aabb.cc00.0200
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Desg FWD 19        128.1    Shr
Et0/1               Desg FWD 100       128.2    Shr
Et0/2               Desg FWD 4         128.3    Shr
Et0/3               Desg FWD 4         128.4    Shr
Et1/0               Desg FWD 100       128.5    Shr
Et1/1               Desg FWD 100       128.6    Shr
Et1/2               Desg FWD 100       128.7    Shr
Et1/3               Desg FWD 100       128.8    Shr

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------

Et2/0               Desg FWD 100       128.9    Shr
Et2/1               Desg FWD 100       128.10   Shr
Et2/2               Desg FWD 100       128.11   Shr
Et2/3               Desg FWD 100       128.12   Shr
Et3/0               Desg FWD 100       128.13   Shr
Et3/1               Desg FWD 100       128.14   Shr
Et3/2               Desg FWD 100       128.15   Shr
Et3/3               Desg FWD 100       128.16   Shr

모든 포트가 designated 포트로 변경되고, Root Bridge로 선출된 것을 확인 할 수 있다.

3. PortFast와 BPDU Guard 설정
switch2와 switch3의 e1/0포트에는 VPCS가 연결되어 있다. 이 포트에 연결될 때 자동으로 forward 모드로 변경되도록 설정한다.

switch2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
switch2(config)#int e1/0
switch2(config-if)#spanning-tree portfast
%Warning: portfast should only be enabled on ports connected to a single
 host. Connecting hubs, concentrators, switches, bridges, etc... to this
 interface  when portfast is enabled, can cause temporary bridging loops.
 Use with CAUTION

%Portfast has been configured on Ethernet1/0 but will only
 have effect when the interface is in a non-trunking mode.

이 포트에 다른 스위치가 연결되면 포트를 shutdown 되도록 BPDUGuard를 설정한다.

switch2(config-if)#spanning-tree bpduguard enable

show run으로 인터페이스 설정을 확인한다.

switch2#show run
...
!
interface Ethernet1/0
 duplex auto
 spanning-tree portfast
 spanning-tree bpduguard enable
!
...

e1/0포트에 다른 스위치를 연결하면 아래와 같은 메시지를 보여주며, shutdown 된다.

*Dec 19 02:42:21.334: %SPANTREE-2-BLOCK_BPDUGUARD: Received BPDU on port Et1/0 with BPDU Guard enabled. Disabling port.
*Dec 19 02:42:21.334: %PM-4-ERR_DISABLE: bpduguard error detected on Et1/0, putting Et1/0 in err-disable state
*Dec 19 02:42:22.334: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet1/0, changed state to down
*Dec 19 02:42:23.341: %LINK-3-UPDOWN: Interface Ethernet1/0, changed state to down
switch2#sh int status

Port      Name               Status       Vlan       Duplex  Speed Type
Et0/0     FastEthernet       connected    trunk        auto   auto unknown
Et0/1                        connected    trunk        auto   auto unknown
Et0/2     Gigabit interface  connected    trunk        auto   auto unknown
Et0/3     Gigabit interface  connected    trunk        auto   auto unknown
Et1/0                        err-disabled 1            auto   auto unknown

4. EtherChannel 설정과 확인
switch2와 switch3 사이에 시스코 PAgP 버전의 EtherChannel을 설정하도록 한다.(switch2, switch3 동일하게 설정한다.)
먼저, port channel 인터페이스를 만든다.

switch3(config)#interface port-channel 1

e0/2, e0/3을 port-channel로 만든다.

switch3(config-if)#int range e0/2-3
switch3(config-if-range)#
switch3(config-if-range)#channel-group 1 mode desirable
Creating a port-channel interface Port-channel 1

switch3(config-if-range)#end

EtherChannel 확인

switch3#sh etherchannel port-channel
                Channel-group listing:
                ----------------------

Group: 1
----------
                Port-channels in the group:
                ---------------------------

Port-channel: Po1
------------

Age of the Port-channel   = 0d:00h:04m:48s
Logical slot/port   = 16/0          Number of ports = 2
GC                  = 0x00010001      HotStandBy port = null
Port state          = Port-channel Ag-Inuse
Protocol            =   PAgP
Port security       = Disabled

Ports in the Port-channel:

Index   Load   Port     EC state        No of bits
------+------+------+------------------+-----------
  0     00     Et0/2    Desirable-Sl       0
  0     00     Et0/3    Desirable-Sl       0

Time since last port bundled:    0d:00h:04m:45s    Et0/2

각 스위치의 최종 설정은 아래와 같다
———-
switch1
———-

switch1#sh run
Building configuration...

Current configuration : 1947 bytes
!
version 15.1
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
!
hostname switch1
!
boot-start-marker
boot-end-marker
!
!
logging discriminator EXCESS severity drops 6 msg-body drops EXCESSCOLL
logging buffered 50000
logging console discriminator EXCESS
!
no aaa new-model
no ip icmp rate-limit unreachable
!
ip cef
!
!
no ip domain-lookup
no ipv6 cef
ipv6 multicast rpf use-bgp
!
!
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
!
!
!
vlan internal allocation policy ascending
!
ip tcp synwait-time 5
!
!
!
!
!
!
!
!
!
interface Ethernet0/0
 description FastEthernet
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 1-3
 switchport mode trunk
 bandwidth 100000
 duplex auto
!
interface Ethernet0/1
 description FastEthernet
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 1-3
 switchport mode trunk
 bandwidth 100000
 duplex auto
!
interface Ethernet0/2
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 1-3
 switchport mode trunk
 duplex auto
!
interface Ethernet0/3
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 1-3
 switchport mode trunk
 duplex auto
!
interface Ethernet1/0
 duplex auto
!
interface Ethernet1/1
 duplex auto
!
interface Ethernet1/2
 duplex auto
!
interface Ethernet1/3
 duplex auto
!
interface Ethernet2/0
 duplex auto
!
interface Ethernet2/1
 duplex auto
!
interface Ethernet2/2
 duplex auto
!
interface Ethernet2/3
 duplex auto
!
interface Ethernet3/0
 duplex auto
!
interface Ethernet3/1
 duplex auto
!
interface Ethernet3/2
 duplex auto
!
interface Ethernet3/3
 duplex auto
!
interface Vlan1
 no ip address
 shutdown
!
!
no ip http server
!
!
!
!
!
control-plane
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
end

switch1#

———-
switch2
———-

switch2#sh run
Building configuration...

Current configuration : 2429 bytes
!
! Last configuration change at 04:16:12 UTC Tue Dec 19 2017
!
version 15.1
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
!
hostname switch2
!
boot-start-marker
boot-end-marker
!
!
logging discriminator EXCESS severity drops 6 msg-body drops EXCESSCOLL
logging buffered 50000
logging console discriminator EXCESS
!
no aaa new-model
no ip icmp rate-limit unreachable
!
ip cef
!
!
no ip domain-lookup
no ipv6 cef
ipv6 multicast rpf use-bgp
!
!
!
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
spanning-tree vlan 1 priority 16384
!
!
!
!
vlan internal allocation policy ascending
!
ip tcp synwait-time 5
!
!
!
!
!
!
!
!
!
interface Port-channel1
 switchport
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 1-3
 switchport mode trunk
!
interface Port-channel1
!
interface Ethernet0/0
 description FastEthernet
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 1-3
 switchport mode trunk
 bandwidth 100000
 duplex auto
!
interface Ethernet0/1
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 1-3
 switchport mode trunk
 duplex auto
!
interface Ethernet0/2
 description Gigabit interface
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 1-3
 switchport mode trunk
 bandwidth 1000000
 duplex auto
 channel-protocol pagp
 channel-group 1 mode desirable
!
interface Ethernet0/3
 description Gigabit interface
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 1-3
 switchport mode trunk
 bandwidth 1000000
 duplex auto
 channel-protocol pagp
 channel-group 1 mode desirable
!
interface Ethernet1/0
 duplex auto
 spanning-tree portfast
 spanning-tree bpduguard enable
!
interface Ethernet1/1
 duplex auto
!
interface Ethernet1/2
 duplex auto
!
interface Ethernet1/3
 duplex auto
!
interface Ethernet2/0
 duplex auto
!
interface Ethernet2/1
 duplex auto
!
interface Ethernet2/2
 duplex auto
!
interface Ethernet2/3
 duplex auto
!
interface Ethernet3/0
 duplex auto
!
interface Ethernet3/1
 duplex auto
!
interface Ethernet3/2
 duplex auto
!
interface Ethernet3/3
 duplex auto
!
interface Vlan1
 no ip address
 shutdown
!
!
no ip http server
!
!
!
!
!
control-plane
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
end

switch2#

———-
switch3
———-

switch3#sh run
Building configuration...

Current configuration : 2391 bytes
!
! Last configuration change at 04:20:54 UTC Tue Dec 19 2017
!
version 15.1
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
!
hostname switch3
!
boot-start-marker
boot-end-marker
!
!
logging discriminator EXCESS severity drops 6 msg-body drops EXCESSCOLL
logging buffered 50000
logging console discriminator EXCESS
!
no aaa new-model
no ip icmp rate-limit unreachable
!
ip cef
!
!
no ip domain-lookup
no ipv6 cef
ipv6 multicast rpf use-bgp
!
!
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
!
!
!
vlan internal allocation policy ascending
!
ip tcp synwait-time 5
!
!
!
!
!
!
!
!
!
interface Port-channel1
 switchport
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 1-3
 switchport mode trunk
!
interface Port-channel1
!
interface Ethernet0/0
 description FastEthernet
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 1-3
 switchport mode trunk
 bandwidth 100000
 duplex auto
!
interface Ethernet0/1
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 1-3
 switchport mode trunk
 duplex auto
!
interface Ethernet0/2
 description Gigabit interface
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 1-3
 switchport mode trunk
 bandwidth 1000000
 duplex auto
 channel-protocol pagp
 channel-group 1 mode desirable
!
interface Ethernet0/3
 description Gigabit interface
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 1-3
 switchport mode trunk
 bandwidth 1000000
 duplex auto
 channel-protocol pagp
 channel-group 1 mode desirable
!
interface Ethernet1/0
 duplex auto
 spanning-tree portfast
 spanning-tree bpduguard enable
!
interface Ethernet1/1
 duplex auto
!
interface Ethernet1/2
 duplex auto
!
interface Ethernet1/3
 duplex auto
!
interface Ethernet2/0
 duplex auto
!
interface Ethernet2/1
 duplex auto
!
interface Ethernet2/2
 duplex auto
!
interface Ethernet2/3
 duplex auto
!
interface Ethernet3/0
 duplex auto
!
interface Ethernet3/1
 duplex auto
!
interface Ethernet3/2
 duplex auto
!
interface Ethernet3/3
 duplex auto
!
interface Vlan1
 no ip address
 shutdown
!
!
no ip http server
!
!
!
!
!
control-plane
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
end

답글 남기기

Your email address will not be published.