2012年7月30日月曜日

spanning-tree


  1. RootBridgeを決める(ブリッジプライオリティ+MAC)
  2. ルートからのパスコストでルートポートを決める
  3. パスコストが等しいときは上流のブリッジプライオリティが低いほうを選択
  4. ブリッジプライオリティも等しい(同じSWに接続)場合、上流のポートプライオリティが低いパスを選択

802.1q-Tunneling



802.1q-Tunnelingの際にL2プロトコルを透過させることができる

SW2(config-if)#l2protocol-tunnel ?
  cdp                 Cisco Discovery Protocol
  drop-threshold      Set drop threshold for protocol packets
  lldp                Link Layer Discovery Protocol
  point-to-point      point-to-point L2 Protocol
  shutdown-threshold  Set shutdown threshold for protocol packets
  stp                 Spanning Tree Protocol
  vtp                 Vlan Trunking Protocol
 


interface FastEthernet2/0/13
 switchport access vlan 100
 switchport mode dot1q-tunnel
 l2protocol-tunnel cdp
 no cdp enable


802.1q-Tunnelingするとダブルタグになる、MTUをタグ1個分大きくする必要がある

SW2(config)#system mtu 1504

Cat3750では上記コマンドにより即時反映されるが、

SW2(config)#do sh int fa 2/0/16
FastEthernet2/0/16 is up, line protocol is up (connected)
  Hardware is Fast Ethernet, address is 0025.b49c.b612 (bia 0025.b49c.b612)
  MTU 1504 bytes, BW 100000 Kbit, DLY 100 usec,


Cat3550では再起動を求められる(即時反映されない)


SW3(config)#system mtu 1504
Changes to the System MTU will not take effect until the next reload is done.


SW3(config)#do sh int fa 0/16
FastEthernet0/16 is up, line protocol is up (connected)
  Hardware is Fast Ethernet, address is 0011.20ab.3e10 (bia 0011.20ab.3e10)
  MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,

EtherChannelなど複数ポートをトンネルする場合、トンネル用のVLANは1ポート毎別にする必要がある?


L3 Ether Channel

物理インタフェースをスイッチポートからルーテッドポートに変更してから
channel-group コマンドで設定する


Rack1SW2(config-if)#do sh eth sum
Flags:  D - down        P - bundled 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

        M - not in use, minimum links not met
        u - unsuitable for bundling
        w - waiting to be aggregated
        d - default port


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

Group  Port-channel  Protocol    Ports
------+-------------+-----------+-----------------------------------------------
12     Po12(SU)        LACP      Fa2/0/13(P) Fa2/0/14(P) Fa2/0/15(P)
24     Po24(RU)        LACP      Fa2/0/19(P) Fa2/0/20(P) Fa2/0/21(P)


Ether Channelの確認


Rack1SW1#sh 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: 3
Number of aggregators:           3

Group  Port-channel  Protocol    Ports
------+-------------+-----------+-----------------------------------------------
12     Po12(SU)         -        Fa0/13(P)   Fa0/14(P)   Fa0/15(P)
13     Po13(SU)         -        Fa0/16(P)   Fa0/17(P)   Fa0/18(P)
14     Po14(SU)         -        Fa0/19(P)   Fa0/20(P)   Fa0/21(P)


pruning vlan


vlan 7 をprune 対象から外す。

Rack1SW1(config-if-range)#switchport trunk pruning vlan 1-6,8-1001

vlan 7 が設定されてなくてもprune されなくなる



2012年7月29日日曜日

VTP利用時のTrunkポート

VTPを利用しない場合、Trunkポートでは全てのVLANを許可するが、
VTPを利用する場合、Trunkポートで許可するVLANはVTP Serverで作成する必要がある


Rack1SW2(config)#do sh int trunk

Port        Mode             Encapsulation  Status        Native vlan
Fa2/0/13    auto             n-isl          trunking      1
Fa2/0/14    auto             n-isl          trunking      1
Fa2/0/15    auto             n-isl          trunking      1

Port        Vlans allowed on trunk
Fa2/0/13    1-4094
Fa2/0/14    1-4094
Fa2/0/15    1-4094

Port        Vlans allowed and active in management domain
Fa2/0/13    1,5,7-10,22,43,58,67,79,146
Fa2/0/14    1,5,7-10,22,43,58,67,79,146
Fa2/0/15    1,5,7-10,22,43,58,67,79,146

Port        Vlans in spanning tree forwarding state and not pruned
Fa2/0/13    5,7-10,22,43,58,67,79,146
Fa2/0/14    none
Fa2/0/15    none

Trunkポートにできない



Trunkポートにするのに手こずった...。

interface FastEthernet2/0/13
 switchport trunk native vlan 146


Rack1SW2(config-if-range)#switchport mode trunk
Command rejected: An interface whose trunk encapsulation is "Auto" can not be configured to "trunk" mode.

先にTrunkプロトコル(ISL or dot1.q)を指定しないと設定できない


Rack1SW2(config-if-range)#switchport trunk encapsulation dot1q
Rack1SW2(config-if-range)#switchport mode trunk
Rack1SW2(config-if-range)#switchport nonegotiate


nativ vlan

SW間で同じVLANを利用する場合 native vlan を一致させる必要がある。

CatalystではCDPにより native vlan の不一致を検出できる


02:50:45: %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/13 (146), with Rack1SW2 FastEthernet2/0/13 (1).
02:50:45: %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/14 (146), with Rack1SW2 FastEthernet2/0/14 (1).
02:50:45: %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/15 (146), with Rack1SW2 FastEthernet2/0/15 (1).

DTP

一方のSWで switchport mode dynamic desirable もう一方のSWで dynamic auto

■trunkプロトコルを指定しない場合

ack1SW1#sh int trunk

Port        Mode         Encapsulation  Status        Native vlan
Fa0/13      desirable    n-isl          trunking      1


Rack1SW2#sh int trunk

Port        Mode             Encapsulation  Status        Native vlan
Fa2/0/13    auto             n-isl          trunking      1




trunkプロトコルを指定する場合(ISLを指定しネゴシエーションを行わない)


Rack1SW1(config)#int range fa 0/13 - 21
Rack1SW1(config-if-range)#switchport trunk encapsulation isl



■Rack1SW1#sh int trunk

Port        Mode         Encapsulation  Status        Native vlan
Fa0/13      desirable    isl            trunking      1


Rack1SW2#sh int trunk

Port        Mode             Encapsulation  Status        Native vlan
Fa2/0/13    auto             n-isl          trunking      1

AutoMDI/MDI-X


CatalystでAutoMDI/MDI-Xのサポートを確認するコマンド

■Cat3560
Rack1SW1#sh int fa 0/1 transceiver properties
Name : Fa0/1
Administrative Speed: auto
Administrative Duplex: auto
Administrative Auto-MDIX: on
Administrative Power Inline: N/A
Operational Speed: auto
Operational Duplex: auto
Operational Auto-MDIX: on

■Cat3550

Rack1SW3#sh int fa 0/1 transceiver properties
Diagnostic Monitoring Data is not available.
Name : Fa0/1
Administrative Speed: auto
Administrative Duplex: auto
Administrative Auto-MDIX: N/A
Administrative Power Inline: N/A
Operational Speed: auto
Operational Duplex: auto
Operational Auto-MDIX: N/A

自宅LabはCat3560,3750,3550,3550の4台構成なので、全てストレートケーブルを利用するとCat3550間のI/FだではLinkUPしない。

DTPとVTP


*Mar  1 00:39:35.019: %DTP-5-DOMAINMISMATCH: Unable to perform trunk negotiation on port Fa0/21 because of VTP domain mismatch.

VTPドメインが異なるとDTPのネゴシエーションを行わない。
SW間のI/Fを「switchport mode dynamic desirable」と設定しても access port になる。

2012年7月28日土曜日

ターミナルサーバ導入

子育て&業務が忙しいのを理由に半年近くR&Sの勉強を放置していました...。
再度やる気を出す&効率よく勉強を!ということで自宅LAB環境に手をいれました。

・ヤフオクでAS2511-RJを落札


AS2511-RJから各機器のコンソール接続にはロールオーバケーブルが必要。
ヤフオクやネットショップで探すも見つからない。
(コネクタとセットのものなら1本1000円であったが、高い&コネクタは不要ということで却下しました)
だったら自分で作っちゃえ!ということで

・ケーブル自作用にかしめ工具&LANコネクタをamzaonで購入


AS2511-RJ到着。RJ45のLANインタフェースがないことを初めて知る。
そういえば昔MAUというものがあったな~ということで

・ヤフオクでMAUを落札

かしめ工具&LANコネクタ到着。新人研修以来、約10年ぶりのケーブル自作。
SANWA  SUPPLY の以下のページを参考にさせて頂きました。
http://www.sanwa.co.jp/lan/cate5e.html

ケーブルはSW間の接続用に利用していた安かった黒色CAT5Eを使用しました。

反対側のコネクタの配線を見ながら
茶、白茶、緑、白青、青、白緑、橙、白橙
と並べてかしめ工具でガッチャン!
見事に間違えました...。

正しくは以下の通りです。
白橙、橙、白緑、青、白青、緑、白茶、茶

LANコネクタを1つ無駄にしたものの、ロールオーバ×4本を作成し配線完了。
AS2511-RJから4台のSWにアクセスできるようになりました。


TS#sh session
Conn Host                Address             Byte  Idle Conn Name
   1 SW1                 1.1.1.1                0     0 SW1
   2 SW2                 1.1.1.1                0     0 SW2
   3 SW3                 1.1.1.1                0     0 SW3
*  4 SW4                 1.1.1.1                0     0 SW4



「CTRL+SHIFT+6」 で切り替えるのは面倒くさいですね。
MAUの到着が待ち遠しい。


それにしてもケーブル自作っていいですね。安い&好きな長さにできる。
SW間のケーブル短くして整理しようかな。