2012年7月27日 星期五

淺談Cisco OTV

       OTV(Overlay Transport Virtualization)這一項技術是Cisco為Data Center Solution所提出來的解決方法,目前並非標準,他所提出的是利用"MAC in IP"的概念將原本一個Data Center中虛擬機器做Vmotion時需要在同一個Layer 2的網路(DataNet)才能完成的限制消除掉,而讓不同Data Center之間的VM彼此也可以做Vmotion,這樣做的好處是可以分散一個Data Center的workload,讓其他Data Center可以彼此分擔workload,如果以更廣的角度來看,OTV讓很多Data Center可以看成同一個Data Center。

        雖然OTV是利用Layer2的技術,但是他會過濾掉原有在Layer2的一些frame,包含Spanning-Tree、Broadcast Storm、Unicast flooding等。

       使用OTV並不需要更動現有的網路架構(所以稱為"Overlay",覆蓋在既有的網路架構上),因此當有一個新的Data Center加入時並不需要更動到其他Data Center的網路架構,依照官方的說法最多只需四行指令就可以搞定了。

       目前Cisco只有Nexus 7000系列才有支援OTV,而目前有支援的module有M series,而F1系列的module則不支援。

       Cisco、VMWare、NetApp近期也提出一個叫做IVA(Imagine Virtually Anything)的概念,其中用到的也是OTV這個技術(其他就是VMWare的Vmotion及NetApp的FlexCache技術)。
IVA相關文章可參考:
http://www.imaginevirtuallyanything.com/us/solutions-and-technology.html#long

2012年7月25日 星期三

EtherChannel

      要將兩台Switch之間的連線使用多條線路形成一個trunk通常需要兩台互聯的interface要設定成固定的trunk port (channel-group x mode on, x=ID),如果所處的兩台switch環境是在異地,如果沒有事先設定好,或是兩台switch已經安裝好但需更改架構,除非兩頭都有網管人員同時設定,如果只有一個網管人員時必須爭取時間,先設定完一頭,再趕忙跑到另一頭,以縮短斷線時間。

      但如果使用動態的EtherChannel就可以解決這個問題。目前Cisco Switch上的支援兩種動態的EtherChannel協定,包含Cisco自己的PAgP及標準的802.3ad LACP,如果使用PAgP的話有支援幾種模式,每個模式之間可以形成trunk的搭配方式如下:






如果使用Static Trunking的方式,PAgP與LACP的設定方式如下:

This example shows how to configure an EtherChannel. It assigns two ports as static-access ports in VLAN 10 to channel 5 with the PAgP mode desirable:
Switch# configure terminal Switch(config)# interface range gigabitethernet0/1 -2 Switch(config-if-range)# switchport mode accessSwitch(config-if-range)# switchport access vlan 10
Switch(config-if-range)# channel-group 5 mode desirable
Switch(config-if-range)# end 

This example shows how to configure an EtherChannel. It assigns two ports as static-access ports in VLAN 10 to channel 5 with the LACP mode active
Switch# configure terminal 
Switch(config)# interface range gigabitethernet0/1 -2 
Switch(config-if-range)# switchport mode access
Switch(config-if-range)# switchport access vlan 10
Switch(config-if-range)# channel-group 5 mode active
Switch(config-if-range)# end 

Summary:

EtherChannel Modes 

Mode Description

on

Mode that forces the LAN port to channel unconditionally. In the on mode, a usable EtherChannel exists only when a LAN port group in the on mode is connected to another LAN port group in the on mode. Because ports configured in the on mode do not negotiate, there is no negotiation traffic between the ports.


auto

PAgP mode that places a LAN port into a passive negotiating state in which the port responds to PAgP packets it receives but does not initiate PAgP negotiation.


desirable

PAgP mode that places a LAN port into an active negotiating state in which the port initiates negotiations with other LAN ports by sending PAgP packets.


passive

LACP mode that places a port into a passive negotiating state in which the port responds to LACP packets it receives but does not initiate LACP negotiation.


active

LACP mode that places a port into an active negotiating state in which the port initiates negotiations with other ports by sending LACP packets.

LAN ports can form an EtherChannel when they are in different PAgP modes if the modes are compatible. For example:

YA LAN port in desirable mode can form an EtherChannel successfully with another LAN port that is in desirable mode.

YA LAN port in desirable mode can form an EtherChannel with another LAN port in auto mode.

NA LAN port in auto mode cannot form an EtherChannel with another LAN port that is also in auto mode because neither port initiates negotiation.





LAN ports can form an EtherChannel when they are in different LACP modes as long as the modes are compatible. For example:

YA LAN port in active mode can form an EtherChannel successfully with another LAN port that is in active mode.
YA LAN port in active mode can form an EtherChannel with another LAN port in passive mode.
NA LAN port in passive mode cannot form an EtherChannel with another LAN port that is also in passive mode, because neither port initiates negotiation.


關於Cisco Switch上CDP-4-NATIVE_VLAN_MISMATCH問題...

類似:
00:02:29: %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on GigabitEthernet0/1 (10), with Switch GigabitEthernet0/8 (1)
的訊息在新裝機的環境上常常遇到,而會出現這個問題的來源是開了CDP,CDP的封包內容中有包含一些資訊:VTP management domain name、full/half duplex、native vlan等,如果兩台switch之間是跑trunk mode就不會出現這個問題(不需要特別設定switchport mode access的情況下),但如果我們有好習慣,在界接裝端設備的switch port介面下switchport mode access,就會出現CDP-4-native_vlan-mismatch,但CDP的內容又會因為IOS版本不同所包含的欄位也會不同,以上的內容在IOS 12.0(3)版以後才有支援,這以後的CDP稱為CDP v2,所以在這之前的舊版本是不會出現的。所以要停止 CDP-4-native_vlan-mismatch這個訊息出現的方法有以下幾種:


1.在switch上下no cdp advertise-v2,強制兩台switch的CDP跑version 1

2.不要特別去下switchport mode access這個指令,讓介面自己跑trunk
   (show interface gi x/y capabilities可以看到Operational Mode:trunk)

3.如果一定要下switchport mode access,那只好再明確的指定與uplink port相同的vlan上,
   例如:uplink port是接到core switch上的vlan 10,所以每一個port也要access到vlan 10