CCNA (Cisco Certified Network Associate)

CCNA Ana Sayfa | CCNA Nedir?

Etherchannel

Normalde iki switch arasinda birden fazla port kullanirsak switching looplar olusur ve bu looplar sonucunda istenmeyen durumlar ortaya çikar. Tabii ki STP çalisan switchlerde looplar engellenecektir fakat o bunun engellenmesi içinde portlardan bazilari blocking duruma geçecektir. ile bunu önleyebiliyoruz. çünkü mantiksal olarak tek bir port gibi  göründügünden, looplari önlemek için çalisan Spanning Tree Protokolu hiçbir portu bloke etmeyecektir.

ayrica redundancy saglar. içindeki linklerden biri fail olursa iletim diger linklerden yapilmaya devam edecektir. Link tekrar aktif oldugunda yük tekrar dağıtılıp LOAD BALANCE sağlanacaktır.

olustururken portlar ayni vlan ve aynı bandwith değerlerine sahip olmasi gerekir. Karşılıklı portlar için de bu durum geçerlidir.. Eger bu portlar trunk ise kullaniliyorsa ayni trunk olmalıdır.

Yukarida portlari arasinda yüklerin esit dagitilmasi gerektiginden bahsetmistik. Peki bu islem nasil yapilacak birazda ondan bahsedelim. Frameler kullanilan hashing algoritmasi sonucunda belirli bir porttan forward edilirler. Algoritma source mac address, destination mac address yada ikisini, source ip address, destination ip address yada ikisini veya tcp/udp port numaralarini kullanabilir. 

Etherchannel Algoritmaları

kat1Switch(config)#port-channel load-balance ?
dst-ip Dst IP Addr
dst-mac Dst Mac Addr
src-dst-ip Src XOR Dst IP Addr
src-dst-mac Src XOR Dst Mac Addr
src-ip Src IP Addr
src-mac Src Mac Addr

Listeden de görüldüğü gibi mac adresi, ip adresi veya port bazında işlemler yapılabilir.

 

Frameler, bu adreslerin ya en düsük bitlerine göre yada XOR sonucundaki bitlere göre belirlenen linklerden gönderilirler. Örnegin da iki link var, biz sadece destination mac address kullaniyoruz algoritmada. Eger mac adresin son biti 1 ise frame 1. linkden, 0 ise 0. linkden gönderilecektir. Iki linki 1 bitle, 4 linki 2 bitle ve 8 linki de 3 bitle ifade edebiliriz. Eger 2 çift bilgisi adres kullanılıyorsa algoritmada, bir XOR islemi yapilir ve bunun sonucundaki bitlere göre link seçimi yapılır.. Iki link için örnek asagidaki tabloda verilmistir.

 

da 8 link oldugunu kabul edelim ve  source - destination ip adres bilgisinin birlikte kullanildigini varsayalim. 8 link oldugu için bunu 3 bit ile ifade edebiliriz. Frame 192.168.1.1 den 192.168.1.5 e gönderilsin. Şimdi source ip’nin son 3 biti “001”, destination ip adresin son 3 biti “101”. Bu iki adres Exor isleminden geçirildiginde son 3 bit “100” çikacaktir. Bu sayinin decimal karsiligi 4 oldugu için frame, 4.linkden gönderilecek.

1^1=0
1^0=1
0^1=1
0^0=0

EtherChannelda, switchler link konfigürasyonlarinin dinamik olarak yapılmasını farklı protokoller ile sağlarlar.

ciscoya özeldir

standart tabanlidir. Yani ortamda olmayan switchler varsa sadece LACP kullanabiliriz.

PAgP paketleri switchler üzerinde portlarindan gider. Bu paketler ile komsular tanimlanir, port grouplari ögrenilir ve switch kendi bilgileri ile karsilastirma yapar. Bu protokol ayni zamanda ’i düzenler, yani bir portun vlan bilgisi, hizi ya da dublex modu degistiyse diger portlar için bunlari tekrar konfigüre eder.

PAgP active mode (desirable) olarak konfigüre edilebilir. Böylece uzaktaki switch ile negotiate islemini bu switch baslatacaktir ya da passive mode (auto, default) olarak konfigüre edilebilir. Böylece uzaktaki switchin negotiate baslatmasini bekleyecektir.

LACP ise PAgP’ye alternatif olarak standart tabanli bir protokoldür. LACP paketleri portlari üzerinden gönderilir. PAgP gibi komsular tanimlanir, port grouplari ögrenilir ve kendi bilgileri ile karsilastirma yapar. Ayrica LACP endpointlerin rollerini de belirler.

En düsük system priority’e (2 byte priorty+ 6 byte mac adres) sahip olan switch, hangi portun aktif olarak ’a katilacagina karar veren switchdir.

 

Default configuration “src-dst-ip” dir. Eger layer 2 switching kullaniliyorsa default olarak “src-mac” kullanilir. Load-balancing metodu seçerken dikkat etmek gerekir. Mesela, ortamda bir server oldugunu düsünelim, ip’si sabittir, degismez. Eger burada load-balancing olarak des-ip kullanirsak sürekli ayni link kullanilacak ve diger linkler kullanilmayacaktir. Bu da verimli bir çalisma degildir. Böyle bir durumda src-dst-ip kullanmak daha iyi bir çözüm olacaktir. Burada dikkat edilmesi gereken bir nokta var. Eger paketler ip paketi degilse, ipx gibi bir protokol kullaniliyorsa o zaman ne olacak? Tabiki böyle bir durumda source- destination ip bilgisine bakamaz. O halde diger load balance metodu yani lowest-method kullanilacaktir.

kat1Switch(config)#port-channel load-balance src-dst-ip

kat1Switch(config-if)#channel-protocol pagp
kat1Switch(config-if)#channel-group 1 mode desirable

Örneğin 6 linkte karşılıklı olarak etherchannel yapıldıysa range ile de komutları girebiliriz.

kat1Switch(config)#interface range fastEthernet 0/1 - 6
kat1Switch(config-if-range)#channel-protocol pagp
kat1Switch(config-if-range)#channel-group 1 mode desirable

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/6, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/6, changed state to up
kat1Switch(config-if-range)#

----KAT 2 Konfigurasyonu ------

kat2Switch(config)#port-channel load-balance src-dst-ip
kat2Switch(config)#interface range fastEthernet 0/1 - 6
kat2Switch(config-if-range)#channel-protocol pagp
kat2Switch(config-if-range)#channel-group 1 mode desirable

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/6, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/6, changed state to
%LINK-5-CHANGED: Interface Port-channel 1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 1, changed state to up
kat2Switch(config-if-range)#


kat1Switch#sh interfaces etherchannel
----
FastEthernet0/1:
Port state = 1
Channel group = 1 Mode = Desirable-S1 Gcchange = 0
Port-channel = Po1 GC = 0x00000000 Pseudo port-channel = Po1
Port index = 0 Load = 0x00 Protocol = PAgP

Flags: S - Device is sending Slow hello. C - Device is in Consistent state.
A - Device is in Auto mode. P - Device learns on physical port.
d - PAgP is down.
Timers: H - Hello timer is running. Q - Quit timer is running.
S - Switching timer is running. I - Interface timer is running.

Local information:
Hello Partner PAgP Learning Group
Port Flags State Timers Interval Count Priority Method Ifindex
Fa0/1 d U1/S1 H30s 1 0 128 Any 0

Partner's information:
Partner Partner Partner Partner Group
Port Name Device ID Port Age Flags Cap.
Fa0/1 kat2Switch 0002.164A.2272 Fa0/1 0 SC 10001

Age of the port in the current state: 00d:00h:22m:23s

----
FastEthernet0/2:
Port state = 1
Channel group = 1 Mode = Desirable-S1 Gcchange = 0
Port-channel = Po1 GC = 0x00000000 Pseudo port-channel = Po1
Port index = 0 Load = 0x00 Protocol = PAgP

Flags: S - Device is sending Slow hello. C - Device is in Consistent state.
A - Device is in Auto mode. P - Device learns on physical port.
d - PAgP is down.
Timers: H - Hello timer is running. Q - Quit timer is running.
S - Switching timer is running. I - Interface timer is running.

Local information:
Hello Partner PAgP Learning Group
Port Flags State Timers Interval Count Priority Method Ifindex
Fa0/2 d U1/S1 H30s 1 0 128 Any 0

Partner's information:
Partner Partner Partner Partner Group
Port Name Device ID Port Age Flags Cap.
Fa0/2 kat2Switch 0002.164A.2272 Fa0/2 0 SC 10001

Age of the port in the current state: 00d:00h:22m:23s

----
FastEthernet0/3:
Port state = 1
Channel group = 1 Mode = Desirable-S1 Gcchange = 0
Port-channel = Po1 GC = 0x00000000 Pseudo port-channel = Po1
Port index = 0 Load = 0x00 Protocol = PAgP

Flags: S - Device is sending Slow hello. C - Device is in Consistent state.
A - Device is in Auto mode. P - Device learns on physical port.
d - PAgP is down.
Timers: H - Hello timer is running. Q - Quit timer is running.
S - Switching timer is running. I - Interface timer is running.

Local information:
Hello Partner PAgP Learning Group
Port Flags State Timers Interval Count Priority Method Ifindex
Fa0/3 d U1/S1 H30s 1 0 128 Any 0

Partner's information:
Partner Partner Partner Partner Group
Port Name Device ID Port Age Flags Cap.
Fa0/3 kat2Switch 0002.164A.2272 Fa0/3 0 SC 10001

Age of the port in the current state: 00d:00h:22m:23s

----
FastEthernet0/4:
Port state = 1
Channel group = 1 Mode = Desirable-S1 Gcchange = 0
Port-channel = Po1 GC = 0x00000000 Pseudo port-channel = Po1
Port index = 0 Load = 0x00 Protocol = PAgP

Flags: S - Device is sending Slow hello. C - Device is in Consistent state.
A - Device is in Auto mode. P - Device learns on physical port.
d - PAgP is down.
Timers: H - Hello timer is running. Q - Quit timer is running.
S - Switching timer is running. I - Interface timer is running.

Local information:
Hello Partner PAgP Learning Group
Port Flags State Timers Interval Count Priority Method Ifindex
Fa0/4 d U1/S1 H30s 1 0 128 Any 0

Partner's information:
Partner Partner Partner Partner Group
Port Name Device ID Port Age Flags Cap.
Fa0/4 kat2Switch 0002.164A.2272 Fa0/4 0 SC 10001

Age of the port in the current state: 00d:00h:22m:23s

----
FastEthernet0/5:
Port state = 1
Channel group = 1 Mode = Desirable-S1 Gcchange = 0
Port-channel = Po1 GC = 0x00000000 Pseudo port-channel = Po1
Port index = 0 Load = 0x00 Protocol = PAgP

Flags: S - Device is sending Slow hello. C - Device is in Consistent state.
A - Device is in Auto mode. P - Device learns on physical port.
d - PAgP is down.
Timers: H - Hello timer is running. Q - Quit timer is running.
S - Switching timer is running. I - Interface timer is running.

Local information:
Hello Partner PAgP Learning Group
Port Flags State Timers Interval Count Priority Method Ifindex
Fa0/5 d U1/S1 H30s 1 0 128 Any 0

Partner's information:
Partner Partner Partner Partner Group
Port Name Device ID Port Age Flags Cap.
Fa0/5 kat2Switch 0002.164A.2272 Fa0/5 0 SC 10001

Age of the port in the current state: 00d:00h:22m:23s

----
FastEthernet0/6:
Port state = 1
Channel group = 1 Mode = Desirable-S1 Gcchange = 0
Port-channel = Po1 GC = 0x00000000 Pseudo port-channel = Po1
Port index = 0 Load = 0x00 Protocol = PAgP

Flags: S - Device is sending Slow hello. C - Device is in Consistent state.
A - Device is in Auto mode. P - Device learns on physical port.
d - PAgP is down.
Timers: H - Hello timer is running. Q - Quit timer is running.
S - Switching timer is running. I - Interface timer is running.

Local information:
Hello Partner PAgP Learning Group
Port Flags State Timers Interval Count Priority Method Ifindex
Fa0/6 d U1/S1 H30s 1 0 128 Any 0

Partner's information:
Partner Partner Partner Partner Group
Port Name Device ID Port Age Flags Cap.
Fa0/6 kat2Switch 0002.164A.2272 Fa0/6 0 SC 10001

Age of the port in the current state: 00d:00h:22m:23s

----
Port-channel1:Port-channel1
Age of the Port-channel = 00d:00h:28m:39s
Logical slot/port = 2/1 Number of ports = 6
GC = 0x00000000 HotStandBy port = null
Port state =
Protocol = 2
Port Security = Disabled

Ports in the Port-channel:

Index Load Port EC state No of bits
------+------+------+------------------+-----------
0 00 Fa0/5 Desirable-Sl 0
0 00 Fa0/4 Desirable-Sl 0
0 00 Fa0/2 Desirable-Sl 0
0 00 Fa0/6 Desirable-Sl 0
0 00 Fa0/3 Desirable-Sl 0
0 00 Fa0/1 Desirable-Sl 0
Time since last port bundled: 00d:00h:22m:23s Fa0/1
kat1Switch#

kat1Switch#show etherchannel load-balance
EtherChannel Load-Balancing Configuration:
src-dst-ip

EtherChannel Load-Balancing Addresses Used Per-Protocol:
Non-IP: Source XOR Destination MAC address
IPv4: Source XOR Destination IP address
IPv6: Source XOR Destination IP address

kat1Switch#

kat1Switch#show etherchannel port-channel
Channel-group listing:
----------------------

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

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

Age of the Port-channel = 00d:00h:30m:53s
Logical slot/port = 2/1 Number of ports = 6
GC = 0x00000000 HotStandBy port = null
Port state = Port-channel
Protocol = PAGP
Port Security = Disabled

Ports in the Port-channel:

Index Load Port EC state No of bits
------+------+------+------------------+-----------
0 00 Fa0/5 Desirable-Sl 0
0 00 Fa0/4 Desirable-Sl 0
0 00 Fa0/2 Desirable-Sl 0
0 00 Fa0/6 Desirable-Sl 0
0 00 Fa0/3 Desirable-Sl 0
0 00 Fa0/1 Desirable-Sl 0
Time since last port bundled: 00d:00h:24m:37s Fa0/1
kat1Switch#

 

kat1Switch#show etherchannel summary
Flags: D - down P - in port-channel
I - stand-alone s - suspended
H - Hot-standby (LACP only)
R - Layer3 S - Layer2
U - in use f - failed to allocate aggregator
u - unsuitable for bundling
w - waiting to be aggregated
d - default port

Number of channel-groups in use: 1
Number of aggregators: 1

Group Port-channel Protocol Ports
------+-------------+-----------+----------------------------------------------

1 Po1(SU) PAgP Fa0/1(P) Fa0/2(P) Fa0/3(P) Fa0/4(P) Fa0/5(P) Fa0/6(P)
kat1Switch#

kat1Switch(config)#interface port-channel 1
kat1Switch(config-if)#?
cdp Global CDP configuration subcommands
channel-group Etherchannel/port bundling configuration
channel-protocol Select the channel protocol (LACP, PAgP)
description Interface specific description
duplex Configure duplex operation.
exit Exit from interface configuration mode
mac-address Manually set interface MAC address
mdix Set Media Dependent Interface with Crossover
mls mls interface commands
no Negate a command or set its defaults
shutdown Shutdown the selected interface
spanning-tree Spanning Tree Subsystem
speed Configure speed operation.
storm-control storm configuration
switchport Set switching mode characteristics
kat1Switch(config-if)#

 

LACP konfigurasyonu PaGP den fark olarak system priority bilgisi ister.

Switch(config-if)# lacp port-priority [deger]

deger olarak System priority degeri 0 ile 65,535 arasinda olabilir, default olarak 32,768’dir. Eger switchlerde bu deger ayarlanmazsa mac adreslerine bakilarak hangisinin rolleri belirleme isini yapacagi belirlenir. En düsük mac degerine sahip olan seçilecektir.

 

ÖZET:

  • Etherchannel switchler arasinda bandwidth’i arttirir ve redundancy saglar.
  • Etherchannel, PAgP ya da LACP protokolleri ile dinamik olarak konfigüre edilebilir.
  • Linklerdeki yük dagitimi için load balance yöntemleri kullanilir.

 

 

 

| | | | ©2009 A. Alper Şahan