Bu uygulama, yeni 2960 anahtarların bir şube ofisinde konuşlandırılması hazırlığı kapsamında, VLAN ve Trunking yapılandırmalarının test edilmesi amacıyla hazırlanmıştır.
Laboratuvarda kullanılacak cihazların IP adresleri ve VLAN tanımları aşağıdaki tablolarla belirlenmiştir:
| Cihaz | Arayüz | IP Adresi | VLAN | Anahtar Portu |
| PC1 | NIC | 192.168.10.10 | VLAN 10 | SWB F0/1 |
| PC4 | NIC | 192.168.10.11 | VLAN 10 | SWC F0/1 |
| PC2 | NIC | 192.168.20.20 | VLAN 20 | SWB F0/2 |
| PC5 | NIC | 192.168.20.21 | VLAN 20 | SWC F0/2 |
| SWA | SVI | 192.168.99.252 | VLAN 99 | N/A |
| SWC | SVI | 192.168.99.254 | VLAN 99 | N/A |
| VLAN Numarası | VLAN Adı |
| 10 | Admin |
| 20 | Accounts |
| 30 | HR |
| 40 | Voice |
| 99 | Management |
| 100 | Native |
TALİMATLAR
BÖLÜM 1: VLAN Yapılandırma
- Tüm üç anahtar üzerinde (SWA, SWB, SWC) yukarıdaki VLAN Tablosu’ndaki tüm VLAN’ler tam olarak adlarıyla birlikte yapılandırılmalıdır.
BÖLÜM 2: Portları VLAN’lara Atama
- SWB ve SWC anahtarları üzerinde, Adresleme Tablosu’na bakılarak ilgili portlar (F0/1, F0/2, F0/3, F0/4) ilgili VLAN’lere atayın.
- SWC anahtarındaki ilgili port, Voice VLAN (VLAN 40) işlevselliği için yapılandırın.
- Tüm üç anahtar üzerinde sanal yönetim arayüzleri (SVI) oluşturun.
- Bu SVI’ler, Adresleme Tablosu’na göre IP adresleriyle yapılandırın (VLAN 99). Anahtarlar birbirini ping’leyememelidir.
BÖLÜM 3: Statik Trunking Yapılandırma
- SWA ve SWB arasındaki bağlantı, statik trunk olarak yapılandırın ve bu portta dinamik trunking (DTP) devre dışı bırakın.
- Trunk bağlantısının her iki ucunda da DTP devre dışı bırakılır.
- Trunk, belirlenen Native VLAN (VLAN 100) ile yapılandırın ve varsa Native VLAN çakışmaları giderin
BÖLÜM 4: Dinamik Trunking Yapılandırma
- SWC’deki trunk portunun varsayılan DTP modunda (2960 anahtarlar için) olduğu varsayılır.
- SWA üzerindeki G0/2 portu, SWC ile başarılı bir şekilde trunking müzakeresi yapacak şekilde yapılandırın.
- Bu trunk da Native VLAN (VLAN 100) ile yapılandırılır ve varsa Native VLAN çakışmaları ortadan kaldırın.
ÇÖZÜM
BÖLÜM 1: VLAN Yapılandırma
SWA Anahtarı için;
SWA>enable
SWA#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
SWA(config)#vlan 10
SWA(config-vlan)#name Admin
SWA(config-vlan)#exit
SWA(config)#vlan 20
SWA(config-vlan)#name Accounts
SWA(config-vlan)#exit
SWA(config)#vlan 30
SWA(config-vlan)#name HR
SWA(config-vlan)#exit
SWA(config)#vlan 40
SWA(config-vlan)#name Voice
SWA(config-vlan)#exit
SWA(config)#vlan 99
SWA(config-vlan)#name Management
SWA(config-vlan)#exit
SWA(config)#vlan 100
SWA(config-vlan)#name Native
SWA(config-vlan)#exit
SWA(config)#
SWB Anahtarı için;
SWB>enable
SWB#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
SWB(config)#vlan 10
SWB(config-vlan)#name Admin
SWB(config-vlan)#exit
SWB(config)#vlan 20
SWB(config-vlan)#name Accounts
SWB(config-vlan)#exit
SWB(config)#vlan 30
SWB(config-vlan)#name HR
SWB(config-vlan)#exit
SWB(config)#vlan 40
SWB(config-vlan)#name Voice
SWB(config-vlan)#exit
SWB(config)#vlan 99
SWB(config-vlan)#name Management
SWB(config-vlan)#exit
SWB(config)#vlan 100
SWB(config-vlan)#name Native
SWB(config-vlan)#exit
SWB(config)#
SWC Anahtarı için;
SWC>enable
SWC#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
SWC(config)#vlan 10
SWC(config-vlan)#name Admin
SWC(config-vlan)#exit
SWC(config)#vlan 20
SWC(config-vlan)#name Accounts
SWC(config-vlan)#exit
SWC(config)#vlan 30
SWC(config-vlan)#name HR
SWC(config-vlan)#exit
SWC(config)#vlan 40
SWC(config-vlan)#name Voice
SWC(config-vlan)#exit
SWC(config)#vlan 99
SWC(config-vlan)#name Management
SWC(config-vlan)#exit
SWC(config)#vlan 100
SWC(config-vlan)#name Native
SWC(config-vlan)#exit
SWC(config)#
BÖLÜM 2: Portları VLAN’lara Atama
SWB Anahtarı için;
| Cihaz | Port | VLAN |
| PC1 | F0/1 | 10 |
| PC2 | F0/2 | 20 |
| PC3 | F0/3 | 30 |
SWB>enable
SWB#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
SWB(config)#interface FastEthernet0/1
SWB(config-if)#switchport mode access
SWB(config-if)#switchport access vlan 10
SWB(config-if)#exit
SWB(config)#interface FastEthernet0/2
SWB(config-if)#switchport mode access
SWB(config-if)#switchport access vlan 20
SWB(config-if)#exit
SWB(config)#interface FastEthernet0/3
SWB(config-if)#switchport mode access
SWB(config-if)#switchport access vlan 30
SWB(config-if)#exit
SWB(config)#
SWC Anahtarı için;
| Cihaz | Port | VLAN | Not |
| PC4 | F0/1 | 10 | |
| PC5 | F0/2 | 20 | |
| PC6 | F0/3 | 30 | |
| PC7 | F0/4 | 40 | Voice VLAN |
SWC>enable
SWC#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
SWC(config)#interface FastEthernet0/1
SWC(config-if)#switchport mode access
SWC(config-if)#switchport access vlan 10
SWC(config-if)#exit
SWC(config)#interface FastEthernet0/2
SWC(config-if)#switchport mode access
SWC(config-if)#switchport access vlan 20
SWC(config-if)#exit
SWC(config)#interface FastEthernet0/3
SWC(config-if)#switchport mode access
SWC(config-if)#switchport access vlan 30
SWC(config-if)#exit
SWC(config)#interface FastEthernet0/4
SWC(config-if)#switchport mode access
SWC(config-if)#switchport access vlan 40
SWC(config-if)#switchport voice vlan 40
SWC(config-if)#exit
SWC(config)#
SVI Yapılandırması için SWA Anahtarına;
SWA>enable
SWA#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
SWA(config)#interface vlan 99
SWA(config-if)#
%LINK-5-CHANGED: Interface Vlan99, changed state to up
SWA(config-if)#ip address 192.168.99.252 255.255.255.0
SWA(config-if)#no shutdown
SWA(config-if)#exit
SWA(config)#
SVI Yapılandırması için SWB Anahtarına;
SWB>enable
SWB#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
SWB(config)#interface vlan 99
SWB(config-if)#
%LINK-5-CHANGED: Interface Vlan99, changed state to up
SWB(config-if)#ip address 192.168.99.253 255.255.255.0
SWB(config-if)#no shutdown
SWB(config-if)#exit
SWB(config)#
SVI Yapılandırması için SWC Anahtarına;
SWC>enable
SWC#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
SWC(config)#interface vlan 99
SWC(config-if)#
%LINK-5-CHANGED: Interface Vlan99, changed state to up
SWC(config-if)#ip address 192.168.99.254 255.255.255.0
SWC(config-if)#no shutdown
SWC(config-if)#exit
SWC(config)#
BÖLÜM 3: Statik Trunking Yapılandırma (SWA – SWB Bağlantısı)
SWA Anahtarı için;
SWA>enable
SWA#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
SWA(config)#interface GigabitEthernet0/1
SWA(config-if)#switchport mode trunk
SWA(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to up
SWA(config-if)#switchport nonegotiate
SWA(config-if)#switchport trunk native vlan 100
SWA(config-if)#
%CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on GigabitEthernet0/1 (100), with SWB GigabitEthernet0/1 (1).
SWA(config-if)#exit
SWA(config)#
SWB Anahtarı için;
SWB>enable
SWB#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
SWB(config)#interface GigabitEthernet0/1
SWB(config-if)#switchport mode trunk
SWB(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to up
%SPANTREE-2-RECV_PVID_ERR: Received BPDU with inconsistent peer vlan id 100 on GigabitEthernet0/1 VLAN1.
%SPANTREE-2-BLOCK_PVID_LOCAL: Blocking GigabitEthernet0/1 on VLAN0001. Inconsistent local vlan.
SWB(config-if)#
%CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on GigabitEthernet0/1 (1), with SWA GigabitEthernet0/1 (100).
SWB(config-if)#switchport nonegotiate
SWB(config-if)#switchport trunk native vlan 100
SWB(config-if)#%SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking GigabitEthernet0/1 on VLAN0100. Port consistency restored.
%SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking GigabitEthernet0/1 on VLAN0001. Port consistency restored.
SWB(config-if)#exit
SWB(config)#
BÖLÜM 4: Dinamik Trunking Yapılandırma (SWA – SWC Bağlantısı)
2960 anahtarlarında varsayılan mod genellikle dynamic auto‘dur. Başarılı bir trunk oluşturmak için SWA’nın dynamic desirable modunda olması gerekir. SWA Anahtarı için;
SWA>enable
SWA#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
SWA(config)#interface GigabitEthernet0/2
SWA(config-if)#switchport mode dynamic desirable
SWA(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to up
SWA(config-if)#switchport trunk native vlan 100
SWA(config-if)#exit
SWA(config)#
SWC Anahtarı için;
SWC>enable
SWC#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
SWC(config)#
%CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on GigabitEthernet0/2 (1), with SWA GigabitEthernet0/2 (100).
%CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on GigabitEthernet0/2 (1), with SWA GigabitEthernet0/2 (100).
SWC(config)#interface GigabitEthernet0/2
SWC(config-if)#switchport trunk native vlan 100
SWC(config-if)#%SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking GigabitEthernet0/2 on VLAN0100. Port consistency restored.
%SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking GigabitEthernet0/2 on VLAN0001. Port consistency restored.
SWC(config-if)#exit
SWC(config)#exit
SWC#
%SYS-5-CONFIG_I: Configured from console by console
SWC#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
SWC#
SWA Anahtarı için;
SWA>
SWA>enable
SWA#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
SWA#
SWB Anahtarı için;
SWB>
SWB>enable
SWB#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
SWB#
Başarılı olması için aynı VLAN’lar birbirine ping atabilmeli. Farklı VLAN’lar birbirine ping atamamalı. Talimatlar gereği, anahtarlar birbirine ping atamamalı. Yani;
Anahtarların yönetim arayüzleri (SVI’lar) VLAN 99’dadır:
- SWA SVI (192.168.99.252, VLAN 99) ↔ SWB SVI (192.168.99.253, VLAN 99)
- SWA SVI (192.168.99.252, VLAN 99) ↔ SWC SVI (192.168.99.254, VLAN 99)
Faydalı olması dileğimle 🙂


