2012年7月7日土曜日

MPLS ラベル配布


MPLS ラベル配布


■ ラベル配布プロトコル

TDPとは、
MPLS ネットワーク内ラベルを配布するために使用されるシスコ独自のプロトコルの事。
711番ポートを使用してネイバーの検出やラベル交換を行う。
ルータIDとしてLoopbackを使用する場合はサブネットマスクを 255.255.255.255 (/32)にする事が推奨されている。

LDPとは、
MPLS ネットワーク内ラベルを配布するために使用されるプロトコルの事。
646 ポートを使用してネイバーの検出やラベル交換を行う。

Router(config)# mpls label protocol { tdp | ldp | both }

※cefとMPLSの有効化は必須。

LDP Router IDの優先度
1.ldp router-id で指定したインターフェースアドレス
2.Loopbackアドレスの数値が一番大きいアドレス
3.有効な物理インターフェースで一番大きなアドレス


メッセージタイプ

Discovery : LSRネイバーを検出する為に使用のメッセージ
Session : LDPピアを確立する為に使用のメッセージ
Advertisement : ラベル情報を交換する為に使用するメッセージ
Notification : 何らかのエラーが発生した際にLSRに送られてくるメッセージ

※ネイバーの検出はUDPを使用し、ラベルの交換はTCPを使用。


■ ラベル配布方法


① Downstream-on-Demand 型 (DoD型)

LSRがラベル情報の要求があった場合、FECに対応したラベルを配布する方法。Downstream Unsolicited型に比べて必要最低限のラベル情報を配布する事が出来る。


② Downstream Unsolicited 型 (DU型)

ラベル要求がなくても、FECに対応したラベルを配布する方法。Downstream-on-Demand型に比べてLSPの収束が早い。


■ ラベル制御方法


① Independent Control

Downstreamからラベル情報を受信しなくても、自身のラベル情報をUpstreamに配布する方法。LSPの収束は早い。


②Ordered Control

Downstream側のLSRからラベル情報を受信した場合のみ、ラベルマッピング情報をUpstreamに配布する方法。確実にLSPを張る事が可能。反面、障害時の収束が遅い。



■ ラベル保存方法


① Conservative Label Retention Mode

複数のMPLSルートがある場合、最短ルートのラベル情報のみを保持する方式。最短ルートのみを格納する為、リソースの節約やループの検出に優れている。

② Liberal Label Retention Mode

すべてのMPLSルートのラベルを保存する方式。Conservative Label Retention Mode に比べると、すべてのラベル情報が格納されている為、障害時の収束が早い。


※ その他MPLS関連

MPLS LSP確立    //後日更新
MPLS基礎コマンド  //後日更新

2012年7月6日金曜日

受験記 642-691 BGP+MPLS


約半年ぶりの更新です......

英語の勉強と会社の研修に追われてました..

CCIEを取得する為に、まずは英語だと思い、CCIPの BGP+MPLSを目指してました。

とりあえず、受験記です。勉強のお役に立てると幸いです!!


受 験 日 : 2012/07/04
合  否 : 合格
受験科目 : 642-691
受験言語 : 英語
取 得 点 : 932点
合 格 点 : 825点
問 題 数 : 48ぐらい
試験時間 : 120min
勉強期間 : 5 month
受験目的 : CCIE 取得の為のスキルアップ。英語の出題に慣れる
勉強形態 : 独学
実務経験 : あり(1年以下)
勉強前のレベル : ちょっと詳しい初心者
何度目の挑戦か : 1回目

【 セクション毎の正解率 】

Technology .....................................88%
Basic Implementation and Configuration .........81%
Advanced Configuration .........................100%

【 使用教材 】

CCIE Routing and Switching Certification Guide
Routing TCP/IP, Volume 1
Routing TCP/IP, Volume 2
MPLS and VPN Architectures
MPLS and VPN Architectures, Vol. 2
CCO
実機

【 勉強方法 】
勉強時間は、通勤時間2時間と帰宅後1時間 計約3時間
1.MPLSの知識が低かった為、MPLS and VPN Architecturesを読み進めcisco英語に慣れる
2.実機で検証する。
3.BGPは、不明な箇所を上記の教材、CCOで拾い読みする。

【 試験の感想 】
内容については、基礎的な項目が中心であまり難しくない。
BGPについては、CCIEを勉強している人であれば十分通用する感じでした。

ただ、私の英語の能力(TOEIC 500点程度)では、かなりシンドイ試験でした。

【 受験者へのアドバイス 】
どんなに英語が出来なくても、毎日地道に勉強すればシスコ英語に慣れます!
英語出来なくても努力次第で打破可能です!!

【次のチャレンジ】
とりあえずCCIPの試験が10月後半でサポート終了のようなので、
残り QoS 642-642 を取り CCIP 認定へ!!




2012年1月25日水曜日

MPLS基礎

MPLS基礎

◾️MPLSとは、
宛先IPアドレスの代わりに「ラベル」という識別子を使用して「ラベル」が示す方向にフォワーディングする技術です。IPヘッダ(20byte/可変長)へのパケット転送と比較すると、ラベルは4byte固定長である為パケット転送が可能になります。
※現在はネットワーク機器の処理能力が向上した為、高速転送を目的にした利用はあまりない。現在の利用用途としては、MPLSを使用する事により様々なネットワーク付加サービス(IP-VPN/広域Ethernet/通信経路の有効活用/QoS)などで利用されております。
詳細は、以下のMPLS長所に通りとなります。



◾️MPLSの長所


①通信経路の有効活用(MPLS-TE)
IGPを用いた場合、ある特定のリンクに片寄ってしまい特定のリンクに通信トラフィックが集中してしまいます。
MPLSでは、TE(トラフィック・エンジニアリング)と呼ばれる明示的に経路を特定する事によりトラフィックのパスをコントロールする事が出来ます。


②高速転送
通常のルーティングの場合は、IPアドレス(32bit)に基づいてパケットを転送します。しかし、MPLSで使用する「ラベル」は20bitで構成されている為ラベルスイッチングの方が高速に転送する事が出来ます。


③障害時即検知(FFR)
IGPでは、通信障害によって通信が数十秒遮断されてしまう可能性があります。
しかし、MPLSでは即座に他の代理経路に切り替える事が出来るFFRという機能があります。


④VPN(MPLS-VPN)
MPLSを利用して、拠点間で仮想専用線を確立し拠点間で通信可能にする技術です。ISPで提供されているIP-VPNはこの技術を採用している会社が多いようです。
MPLS VPNでは、各顧客の識別子であるRD(ルート識別子)を使用して他の顧客のルーティング情報を論理的に分割されております。その為、高いセキュリティを確保する事も可能です。




◾️MPLSの用語

ラベル
MPLSネットワーク内で転送する為に使用される識別子

LSR(Label Switch Router)
MPLSネットワークを構成しているルータの事。

LER(Label Edge Router)
MPLSネットワークの最先端のLSRの事。

Push(プッシュ)
MPLSネットワークでラベルを付けて転送する事

Swap(スワップ)
MPLSネットワークでラベルを付け替えて転送する事

Pop(ポップ)
MPLSネットワークでラベルを取り除いて転送する事

FEC(Forwarding Equivalence Class : フェック)
同じあて先ネットワークなどをまとめたパケットの集まりの事。

PHP(Penultimate Hop Popping)
LERでは、ポップとパケットの転送動作など他のLSRに比べて負荷が増大してしまいます。
PHPとは、LERの1つ手前のLSRでPOPする事によりLERの負荷を分散させる機能の事。



※ その他MPLS関連

MPLS LSP確立    //後日更新
MPLS基礎コマンド  //後日更新

2012年1月14日土曜日

MPLS VPN


MPLS VPN


MPLS VPNとは、
MPLSを利用して、拠点間で仮想専用線を確立し拠点間で通信可能にする技術です。ISPで提供されているIP-VPNはこの技術を採用している会社が多いようです。
MPLS VPNでは、各顧客の識別子であるRD(ルート識別子)を使用して他の顧客のルーティング情報を論理的に分割されております。その為、高いセキュリティを確保する事も可能です。
又、各顧客のルーティング情報はPEルータ同士でMP-BGPを確立されて交換する為、MPLSネットワーク内のPルータにはあまり負荷がかからない。


※MPLS VPNの技術について

今回は、MPLS VPNの設定について説明します。

■ MPLS VPNの設定

(1) 全体的なMPLS VPNの設定の流れ

①PEルータの設定

②Pルータ(MPLSネットワーク内)の設定

③PEルータ間でMP-BGPを確立させる為の設定

④CEとPE間のルーティング設定

の4ステップです。



(2) 各ステップの設定

①PEルータの設定

RouterPE(config)# ip vrf { 仮想ルータ名 }
RouterPE(config-vrf)# rd { RD値 }
RouterPE(config-vrf)# route-target { export | import | both  } { RD値 } 
RouterPE(config-vrf)# exit
RouterPE(config)# interface { インターフェース名 }
RouterPE(config-if)# ip vrf forwarding {仮想ルータ名}
>上記のコマンドを入力すると、物理IPアドレスが削除される為再度設定が必要
RouterPE(config-if)# ip address { 物理IPアドレス } { MACアドレス }
RouterPE(config-if)# no shutdown


②Pルータ(MPLSネットワーク内)の設定

RouterP(config)# ip cef
RouterP(config)# interface { インターフェース名 }
RouterP(config-if)# mpls ip
RouterP(config-if)# exit
RouterP(config)# router ospf { プロセス番号 } //OSPFの場合。以下省略


③PEルータ間でMP-BGPを確立させる為の設定]

RouterPE(config)# interface loopback { ループバック番号 }
RouterPE(config-if)#ip address { BGPピアを張るIPアドレス } { MACアドレス }
RouterPE(config-if)#no shutdown
RouterPE(config-if)#exit
RouterPE(config)#router bgp { AS番号 }
RouterPE(config-router)#no bgp default ipv4-unicast
>MPLS VPNでは、VPNv4アドレスを使用する為従来のIPv4アドレスのやり取りを強制的に止める
RouterPE(config-router)#neighbor { BGPピアを張る為のBGPピアIPアドレス(ループバックアドレス) } remote-as 1
RouterPE(config-router)#neighbor { BGPピアを張る為のBGPピアIPアドレス(ループバックアドレス) }  update-source { ピアを張る際に使用するループバックアドレス }
RouterPE(config-router)#address-family { ipv4 | ipv6 | vpnv4 | nsap }
RouterPE(config-router-af)#neighbor  { BGPピアを張るIPアドレス }  activate 


④CEとPE間のルーティング設定

(1) スタティックルーティングによる再配送版

RouterPE(config)#ip route vrf { 仮想ルータ名 } { ネットワークアドレス} { MACアドレス } { 送出するインタフェース | ピアアドレス }
>例 ネットワークアドレス = 192.168.1.0 送出されるインターフェースがser0/0の場合は、192.168.1.0宛てのネットワークはser0/0に送るという意味。
RouterPE(config)#router bgp 1
RouterPE(config-router)#address-family ipv4 vrf { 仮想ルータ名 } 
RouterPE(config-router-af)#redistribute static


(2) OSPFによる再配送版

RouterPE(config)# router ospf { プロセス番号 } vrf { 仮想ルータ名 }
RouterPE(config-router)# network { ネットワークアドレス } { ワイルドカードマスク } area { エリア番号 }
RouterPE(config-router)# redistribute bgp { AS番号 } metric { メトリック数 } [ subnets ]
RouterPE(config-router)# exit
RouterPE(config)#router bgp { AS番号 }
RouterPE(config-router)# address-family ipv4 vrf { 仮想ルータ名 }
RouterPE(config-router-af)# redistribute ospf { プロセス番号 } vrf { 仮想ルータ名 }



※ コマンド例や検証コマンドは、以下のラボで

MPLS VPNラボ(スタティックルート)

MPLS VPNラボ(OSPF版)

2012年1月11日水曜日

MPLS VPN lab (OSPF版)


MPLS VPN(OSPF版ラボ)






■ 目的

(1) MPLSネットワーク内を経由してAAAA株式会社の本社、支店同士で通信が出来るようにする事。
(2) MPLSネットワーク内を経由してBBBB株式会社の本社、支店同士で通信が出来るようにする事。
(3) AAAA株式会社とBBBB株式会社間は一切通信できない事。(ルーティング情報も含めて)


■ 設定コンフィグ
※ 基礎コマンドは除く


(1)R1(AAAA株式会社本社側CEルータ)

R1(config)# router ospf 1
R1(config-router)#network 0.0.0.0 255.255.255.255 area 0


(2)R2(通信事業者MPLSネットワーク本社側PEルータ)


Router2(config)# ip cef
Router2(config)# ip vrf AAAA
Router2(config-vrf)# rd 1:100
Router2(config-vrf)# route-target both 1:100 
Router2(config-vrf)# exit
Router2(config)# interface ser0/0
Router2(config-if)# ip address 10.0.0.1 255.255.255.252
Router2(config-if)# mpls ip
Router2(config-if)# no shutdown
Router2(config)# interface ser0/1
Router2(config-if)# ip vrf forwarding AAAA
Router2(config-if)# ip address 10.10.0.2 255.255.255.252
Router2(config-if)# no shutdown
Router2(config)# interface loopback 0
Router2(config-if)# ip address 1.1.1.1 255.255.255.255
Router2(config-if)# no shutdown
Router2(config-if)# exit
Router2(config)# router bgp 100
Router2(config-router)# no bgp default ipv4-unicast
Router2(config-router)# neighbor 2.2.2.2 remote-as 100
Router2(config-router)# neighbor 2.2.2.2 update-source Loopback0
Router2(config-router)# address-family vpnv4
Router2(config-router-af)# neighbor 2.2.2.2 activate 
Router2(config)# router ospf 10 vrf AAAA
Router2(config-router)# network 10.10.0.0 0.0.0.3 area 0
Router2(config-router)# redistribute bgp 100 metric 30 subnets
Router2(config-router)# exit
Router2(config)#router bgp 100
Router2(config-router)# address-family ipv4 vrf AAAA 
Router2(config-router-af)# redistribute ospf 10 vrf AAAA

Router2(config)# ip vrf BBBB
Router2(config-vrf)# rd 1:200
Router2(config-vrf)# route-target both 1:200 
Router2(config-vrf)# exit
Router2(config)# interface fa0/1
Router2(config-if)# ip vrf forwarding BBBB
Router2(config-if)# ip address 10.100.0.2 255.255.255.252
Router2(config-if)# no shutdown
Router2(config)# router ospf 20 vrf BBBB
Router2(config-router)# network 10.100.0.0 0.0.0.3 area 0
Router2(config-router)# redistribute bgp 100 metric 30 subnets
Router2(config-router)# exit
Router2(config)#router bgp 100
Router2(config-router)# address-family ipv4 vrf BBBB 
Router2(config-router-af)# redistribute ospf 10 vrf BBBB

(3)R3(通信事業者MPLSネットワークPルータ)

Router3(config)# ip cef
Router3(config)# interface ser0/0
Router3(config-if)# ip address 10.0.0.2 255.255.255.252
Router3(config-if)# mpls ip
Router3(config-if)# no shut
Router3(config-if)# exit
Router3(config)# interface ser0/1
Router3(config-if)# ip address 10.0.0.6 255.255.255.252
Router3(config-if)# mpls ip
Router3(config-if)# no shut

(4)R4(通信事業者MPLSネットワーク支社側PEルータ)

Router4(config)# ip cef
Router4(config)# ip vrf AAAA
Router4(config-vrf)# rd 1:100
Router4(config-vrf)# route-target both 1:100 
Router4(config-vrf)# exit
Router4(config)# interface ser0/0
Router4(config-if)# ip address 10.0.0.5 255.255.255.252
Router4(config-if)# mpls ip
Router4(config-if)# no shutdown
Router4(config)# interface ser0/1
Router4(config-if)# ip vrf forwarding AAAA
Router4(config-if)# ip address 10.20.0.2 255.255.255.252
Router4(config-if)# no shutdown
Router4(config)# interface loopback 0
Router4(config-if)# ip address 2.2.2.2 255.255.255.255
Router4(config-if)# no shutdown
Router4(config-if)# exit
Router4(config)# router bgp 100
Router4(config-router)# no bgp default ipv4-unicast
Router4(config-router)# neighbor 1.1.1.1 remote-as 100
Router4(config-router)# neighbor 1.1.1.1 update-source Loopback0
Router4(config-router)# address-family vpnv4
Router4(config-router-af)# neighbor 1.1.1.1 activate 
Router4(config)# router ospf 10 vrf AAAA
Router4(config-router)# network 10.20.0.0 0.0.0.3 area 0
Router4(config-router)# redistribute bgp 100 metric 30 subnets
Router4(config-router)# exit
Router4(config)#router bgp 100
Router4(config-router)# address-family ipv4 vrf AAAA 
Router4(config-router-af)# redistribute ospf 10 vrf AAAA

Router4(config)# ip vrf BBBB
Router4(config-vrf)# rd 1:200
Router4(config-vrf)# route-target both 1:200 
Router4(config-vrf)# exit
Router4(config)# interface fa0/1
Router4(config-if)# ip vrf forwarding BBBB
Router4(config-if)# ip address 10.110.0.2 255.255.255.252
Router4(config-if)# no shutdown
Router4(config)# router ospf 20 vrf BBBB
Router4(config-router)# network 10.110.0.0 0.0.0.3 area 0
Router4(config-router)# redistribute bgp 100 metric 30 subnets
Router4(config-router)# exit
Router4(config)#router bgp 100
Router4(config-router)# address-family ipv4 vrf BBBB 
Router4(config-router-af)# redistribute ospf 20 vrf BBBB


(5)R5(AAAA株式会社支店側CEルータ)

Router5(config)# router ospf 1
Router5(config-router)#network 0.0.0.0 255.255.255.255 area 0

(6)R6(AAAA株式会社支店側CEルータ)

Router6(config)# router ospf 1
Router6(config-router)#network 0.0.0.0 255.255.255.255 area 0

(7)R7(AAAA株式会社支店側CEルータ)

Router7(config)# router ospf 1
Router7(config-router)#network 0.0.0.0 255.255.255.255 area 0




■ 検証コマンド


1.ルーティングテーブルの確認


(1)R2(通信事業者MPLSネットワーク本社側PEルータ)


Router2# show ip route vrf AAAA

Routing Table: AAAA
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     20.0.0.0/32 is subnetted, 1 subnets
B       20.20.20.20 [200/65] via 2.2.2.2, 00:30:16
     10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
O       10.10.10.10/32 [110/65] via 10.10.0.1, 00:21:44, Serial0/1
C       10.10.0.0/30 is directly connected, Serial0/1
B       10.20.0.0/30 [200/0] via 2.2.2.2, 00:30:16

Router2# show ip route vrf BBBB

Routing Table: BBBB
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     100.0.0.0/32 is subnetted, 1 subnets
O       100.100.100.100 [110/11] via 10.100.0.1, 00:21:45, FastEthernet0/0
     110.0.0.0/32 is subnetted, 1 subnets
B       110.110.110.110 [200/11] via 2.2.2.2, 00:17:48
     10.0.0.0/30 is subnetted, 2 subnets
B       10.110.0.0 [200/0] via 2.2.2.2, 00:17:48
C       10.100.0.0 is directly connected, FastEthernet0/0


(2)R4(通信事業者MPLSネットワーク支社側PEルータ)

Router4#show ip route vrf AAAA

Routing Table: AAAA
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     20.0.0.0/32 is subnetted, 1 subnets
O       20.20.20.20 [110/65] via 10.20.0.1, 00:29:27, Serial0/1
     10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
B       10.10.10.10/32 [200/65] via 1.1.1.1, 00:26:18
B       10.10.0.0/30 [200/0] via 1.1.1.1, 00:26:18
C       10.20.0.0/30 is directly connected, Serial0/1

Router4#show ip route vrf BBBB

Routing Table: BBBB
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     100.0.0.0/32 is subnetted, 1 subnets
B       100.100.100.100 [200/11] via 1.1.1.1, 00:11:31
     110.0.0.0/32 is subnetted, 1 subnets
O       110.110.110.110 [110/11] via 10.110.0.1, 00:29:16, FastEthernet0/0
     10.0.0.0/30 is subnetted, 2 subnets
C       10.110.0.0 is directly connected, FastEthernet0/0
B       10.100.0.0 [200/0] via 1.1.1.1, 00:11:31




(3)R1(AAAA株式会社本社側CEルータ)

Router1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     20.0.0.0/32 is subnetted, 1 subnets
O IA    20.20.20.20 [110/94] via 10.10.0.2, 00:18:53, Serial0/0
     10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
C       10.10.10.10/32 is directly connected, Loopback0
C       10.10.0.0/30 is directly connected, Serial0/0
O IA    10.20.0.0/30 [110/94] via 10.10.0.2, 00:18:53, Serial0/0

(4)Router5(AAAA株式会社支店側CEルータ)

Router5#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     20.0.0.0/32 is subnetted, 1 subnets
C       20.20.20.20 is directly connected, Loopback0
     10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
O IA    10.10.10.10/32 [110/94] via 10.20.0.2, 00:28:47, Serial0/0
O IA    10.10.0.0/30 [110/94] via 10.20.0.2, 00:28:47, Serial0/0
C       10.20.0.0/30 is directly connected, Serial0/0

(5)R6(AAAA株式会社支店側CEルータ)

Router6#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     100.0.0.0/32 is subnetted, 1 subnets
C       100.100.100.100 is directly connected, Loopback0
     110.0.0.0/32 is subnetted, 1 subnets
O IA    110.110.110.110 [110/40] via 10.100.0.2, 00:19:38, FastEthernet0/0
     10.0.0.0/30 is subnetted, 2 subnets
O IA    10.110.0.0 [110/40] via 10.100.0.2, 00:19:38, FastEthernet0/0
C       10.100.0.0 is directly connected, FastEthernet0/0

(6)R7(AAAA株式会社支店側CEルータ)

R7#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     100.0.0.0/32 is subnetted, 1 subnets
O IA    100.100.100.100 [110/40] via 10.110.0.2, 00:13:50, FastEthernet0/0
     110.0.0.0/32 is subnetted, 1 subnets
C       110.110.110.110 is directly connected, Loopback0
     10.0.0.0/30 is subnetted, 2 subnets
C       10.110.0.0 is directly connected, FastEthernet0/0
O IA    10.100.0.0 [110/40] via 10.110.0.2, 00:13:50, FastEthernet0/0



2.BGPテーブルの確認


(1)R2(通信事業者MPLSネットワーク本社側PEルータ)

Router2#show ip bgp vpnv4 vrf AAAA
BGP table version is 29, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 1:100 (default for vrf AAAA)
*> 10.10.0.0/30     0.0.0.0                  0         32768 ?
*> 10.10.10.10/32   10.10.0.1               65         32768 ?
*>i10.20.0.0/30     2.2.2.2                  0    100      0 ?
*>i20.20.20.20/32   2.2.2.2                 65    100      0 ?


Router2#show ip bgp vpnv4 vrf BBBB
BGP table version is 29, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 1:200 (default for vrf BBBB)
*> 10.100.0.0/30    0.0.0.0                  0         32768 ?
*>i10.110.0.0/30    2.2.2.2                  0    100      0 ?
*> 100.100.100.100/32
                    10.100.0.1              11         32768 ?
*>i110.110.110.110/32
                    2.2.2.2                 11    100      0 ?

(2)R4(通信事業者MPLSネットワーク支社側PEルータ)

Router4#show ip bgp vpnv4 vrf AAAA
BGP table version is 29, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 1:100 (default for vrf AAAA)
*>i10.10.0.0/30     1.1.1.1                  0    100      0 ?
*>i10.10.10.10/32   1.1.1.1                 65    100      0 ?
*> 10.20.0.0/30     0.0.0.0                  0         32768 ?
*> 20.20.20.20/32   10.20.0.1               65         32768 ?

Router4#show ip bgp vpnv4 vrf BBBB
BGP table version is 29, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 1:200 (default for vrf BBBB)
*>i10.100.0.0/30    1.1.1.1                  0    100      0 ?
*> 10.110.0.0/30    0.0.0.0                  0         32768 ?
*>i100.100.100.100/32
                    1.1.1.1                 11    100      0 ?
*> 110.110.110.110/32
                    10.110.0.1              11         32768 ?




3.拠点間で疎通確認

(1)R1(AAAA株式会社本社側CEルータ)

Router1#ping 20.20.20.20 source 10.10.10.10

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.20.20.20, timeout is 2 seconds:
Packet sent with a source address of 10.10.10.10
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 44/88/132 ms

Router1#ping 100.100.100.100 source 10.10.10.10

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.100.100.100, timeout is 2 seconds:
Packet sent with a source address of 10.10.10.10
U.U.U
Success rate is 0 percent (0/5)

Router1#ping 110.110.110.110 source 10.10.10.10

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 110.110.110.110, timeout is 2 seconds:
Packet sent with a source address of 10.10.10.10
U.U.U
Success rate is 0 percent (0/5)



(2)R5(AAAA株式会社支店側CEルータ)

Router5#ping 10.10.10.10 source 20.20.20.20

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.10, timeout is 2 seconds:
Packet sent with a source address of 20.20.20.20
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 120/139/164 ms

Router5#ping 100.100.100.100 source 20.20.20.20

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.100.100.100, timeout is 2 seconds:
Packet sent with a source address of 20.20.20.20
U.U.U
Success rate is 0 percent (0/5)

Router5#ping 110.110.110.110 source 20.20.20.20

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 110.110.110.110, timeout is 2 seconds:
Packet sent with a source address of 20.20.20.20
U.U.U
Success rate is 0 percent (0/5)

(3)R6(AAAA株式会社支店側CEルータ)

Router6#ping 110.110.110.110 source 100.100.100.100

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 110.110.110.110, timeout is 2 seconds:
Packet sent with a source address of 100.100.100.100
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/93/200 ms

Router6#ping 10.10.10.10 source 100.100.100.100

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.10, timeout is 2 seconds:
Packet sent with a source address of 100.100.100.100
U.U.U
Success rate is 0 percent (0/5)

Router6#ping 20.20.20.20 source 100.100.100.100

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.20.20.20, timeout is 2 seconds:
Packet sent with a source address of 100.100.100.100
U.U.U
Success rate is 0 percent (0/5)

(4)R7(AAAA株式会社支店側CEルータ)


Router7#ping 100.100.100.100 source 110.110.110.110

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.100.100.100, timeout is 2 seconds:
Packet sent with a source address of 110.110.110.110
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 64/116/200 ms

Router7#ping 10.10.10.10 source 110.110.110.110

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.10, timeout is 2 seconds:
Packet sent with a source address of 110.110.110.110
U.U.U
Success rate is 0 percent (0/5)

Router7#ping 20.20.20.20 source 110.110.110.110

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.20.20.20, timeout is 2 seconds:
Packet sent with a source address of 110.110.110.110
U.U.U
Success rate is 0 percent (0/5)

2012年1月10日火曜日

MPLS VPN lab(スタティックルーティング版)


MPLS VPN(スタティックルート版ラボ)




■ 目的

(1) MPLSネットワーク内を経由してAAAA株式会社の本社、支店同士で通信が出来るようにする事。
(2) MPLSネットワーク内を経由してBBBB株式会社の本社、支店同士で通信が出来るようにする事。
(3) AAAA株式会社とBBBB株式会社間は一切通信できない事。(ルーティング情報も含めて)


■ 設定コンフィグ

※ 基礎コマンドは除く


(1)R1(AAAA株式会社本社側CEルータ)

R1(config)# ip route 0.0.0.0 0.0.0.0 10.10.0.2


(2)R2(通信事業者MPLSネットワーク本社側PEルータ)


Router2(config)# ip cef
Router2(config)# ip vrf AAAA
Router2(config-vrf)# rd 1:100
Router2(config-vrf)# route-target both 1:100 
Router2(config-vrf)# exit
Router2(config)# interface ser0/0
Router2(config-if)# ip address 10.0.0.1 255.255.255.252
Router2(config-if)# mpls ip
Router2(config-if)# no shutdown
Router2(config)# interface ser0/1
Router2(config-if)# ip vrf forwarding AAAA
Router2(config-if)# ip address 10.10.0.2 255.255.255.252
Router2(config-if)# no shutdown
Router2(config)# interface loopback 0
Router2(config-if)# ip address 1.1.1.1 255.255.255.255
Router2(config-if)# no shutdown
Router2(config-if)# exit
Router2(config)# router bgp 100
Router2(config-router)# no bgp default ipv4-unicast
Router2(config-router)# neighbor 2.2.2.2 remote-as 100
Router2(config-router)# neighbor 2.2.2.2 update-source Loopback0
Router2(config-router)# address-family vpnv4
Router2(config-router-af)# neighbor 2.2.2.2 activate 
Router2(config)# ip route vrf AAAA 10.10.10.10 255.255.255.255 10.10.0.1
Router2(config)#router bgp 100
Router2(config-router)#address-family ipv4 vrf AAAA 
Router2(config-router-af)#redistribute static

Router2(config)# ip vrf BBBB
Router2(config-vrf)# rd 1:200
Router2(config-vrf)# route-target both 1:200 
Router2(config-vrf)# exit
Router2(config)# interface fa0/1
Router2(config-if)# ip vrf forwarding BBBB
Router2(config-if)# ip address 10.100.0.2 255.255.255.252
Router2(config-if)# no shutdown
Router2(config)# ip route vrf BBBB 100.100.100.100 255.255.255.255 10.100.0.1
Router2(config)#router bgp 100
Router2(config-router)#address-family ipv4 vrf BBBB 
Router2(config-router-af)#redistribute static

(3)R3(通信事業者MPLSネットワークPルータ)

Router3(config)# ip cef
Router3(config)# interface ser0/0
Router3(config-if)# ip address 10.0.0.2 255.255.255.252
Router3(config-if)# mpls ip
Router3(config-if)# no shut
Router3(config-if)# exit
Router3(config)# interface ser0/1
Router3(config-if)# ip address 10.0.0.6 255.255.255.252
Router3(config-if)# mpls ip
Router3(config-if)# no shut

(4)R4(通信事業者MPLSネットワーク支社側PEルータ)

Router4(config)# ip cef
Router4(config)# ip vrf AAAA
Router4(config-vrf)# rd 1:100
Router4(config-vrf)# route-target both 1:100 
Router4(config-vrf)# exit
Router4(config)# interface ser0/0
Router4(config-if)# ip address 10.0.0.5 255.255.255.252
Router4(config-if)# mpls ip
Router4(config-if)# no shutdown
Router4(config)# interface ser0/1
Router4(config-if)# ip vrf forwarding AAAA
Router4(config-if)# ip address 10.20.0.2 255.255.255.252
Router4(config-if)# no shutdown
Router4(config)# interface loopback 0
Router4(config-if)# ip address 2.2.2.2 255.255.255.255
Router4(config-if)# no shutdown
Router4(config-if)# exit
Router4(config)# router bgp 100
Router4(config-router)# no bgp default ipv4-unicast
Router4(config-router)# neighbor 1.1.1.1 remote-as 100
Router4(config-router)# neighbor 1.1.1.1 update-source Loopback0
Router4(config-router)# address-family vpnv4
Router4(config-router-af)# neighbor 1.1.1.1 activate 
Router4(config)# ip route vrf AAAA 20.20.20.20 255.255.255.255 10.20.0.1
Router4(config)#router bgp 1
Router4(config-router)#address-family ipv4 vrf AAAA 
Router4(config-router-af)#redistribute static

Router4(config)# ip vrf BBBB
Router4(config-vrf)# rd 1:200
Router4(config-vrf)# route-target both 1:200 
Router4(config-vrf)# exit
Router4(config)# interface fa0/1
Router4(config-if)# ip vrf forwarding BBBB
Router4(config-if)# ip address 10.110.0.2 255.255.255.252
Router4(config-if)# no shutdown
Router4(config)# ip route vrf BBBB 110.110.110.110 255.255.255.255 10.110.0.1
Router4(config)#router bgp 100
Router4(config-router)#address-family ipv4 vrf BBBB 
Router4(config-router-af)#redistribute static


(5)R5(AAAA株式会社支店側CEルータ)

R5(config)# ip route 0.0.0.0 0.0.0.0 10.20.0.2

(6)R6(AAAA株式会社支店側CEルータ)

R6(config)# ip route 0.0.0.0 0.0.0.0 10.100.0.2

(7)R7(AAAA株式会社支店側CEルータ)

R7(config)# ip route 0.0.0.0 0.0.0.0 10.110.0.2



■ 検証コマンド

1.ルーティングテーブルの確認

(1)R2(通信事業者MPLSネットワーク本社側PEルータ)


Router2# show ip route vrf AAAA

Routing Table: AAAA
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     20.0.0.0/32 is subnetted, 1 subnets
B       20.20.20.20 [200/0] via 2.2.2.2, 01:13:35
     10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
S       10.10.10.10/32 [1/0] via 10.10.0.1
C       10.10.0.0/30 is directly connected, Serial0/1


Router2# show ip route vrf BBBB

Routing Table: BBBB
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     100.0.0.0/32 is subnetted, 1 subnets
S       100.100.100.100 [1/0] via 10.100.0.1
     110.0.0.0/32 is subnetted, 1 subnets
B       110.110.110.110 [200/0] via 2.2.2.2, 01:07:13
     10.0.0.0/30 is subnetted, 1 subnets
C       10.100.0.0 is directly connected, FastEthernet0/0


(2)R4(通信事業者MPLSネットワーク支社側PEルータ)

Router4#show ip route vrf AAAA

Routing Table: AAAA
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     20.0.0.0/32 is subnetted, 1 subnets
S       20.20.20.20 [1/0] via 10.20.0.1
     10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
B       10.10.10.10/32 [200/0] via 1.1.1.1, 01:19:09
C       10.20.0.0/30 is directly connected, Serial0/1

Router4#show ip route vrf BBBB

Routing Table: BBBB
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     100.0.0.0/32 is subnetted, 1 subnets
B       100.100.100.100 [200/0] via 1.1.1.1, 01:17:36
     110.0.0.0/32 is subnetted, 1 subnets
S       110.110.110.110 [1/0] via 10.110.0.1
     10.0.0.0/30 is subnetted, 1 subnets
C       10.110.0.0 is directly connected, FastEthernet0/0


2.BGPテーブルの確認


(1)R2(通信事業者MPLSネットワーク本社側PEルータ)

Router2#show ip bgp vpnv4 vrf AAAA
BGP table version is 9, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 1:100 (default for vrf AAAA)
*> 10.10.10.10/32   10.10.0.1                0         32768 ?
*>i20.20.20.20/32   2.2.2.2                  0    100      0 ?


Router2#show ip bgp vpnv4 vrf BBBB
BGP table version is 9, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 1:200 (default for vrf BBBB)
*> 100.100.100.100/32
                    10.100.0.1               0         32768 ?
*>i110.110.110.110/32
                    2.2.2.2                  0    100      0 ?


(2)R4(通信事業者MPLSネットワーク支社側PEルータ)

Router4#show ip bgp vpnv4 vrf AAAA
BGP table version is 9, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 1:100 (default for vrf AAAA)
*>i10.10.10.10/32   1.1.1.1                  0    100      0 ?
*> 20.20.20.20/32   10.20.0.1                0         32768 ?

Router4#show ip bgp vpnv4 vrf BBBB
BGP table version is 9, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 1:200 (default for vrf BBBB)
*>i100.100.100.100/32
                    1.1.1.1                  0    100      0 ?
*> 110.110.110.110/32
                    10.110.0.1               0         32768 ?


3.拠点間で疎通確認

(1)R1(AAAA株式会社本社側CEルータ)

Router1#ping 20.20.20.20 source 10.10.10.10

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.20.20.20, timeout is 2 seconds:
Packet sent with a source address of 10.10.10.10
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 44/88/132 ms

Router1#ping 100.100.100.100 source 10.10.10.10

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.100.100.100, timeout is 2 seconds:
Packet sent with a source address of 10.10.10.10
U.U.U
Success rate is 0 percent (0/5)
Router1#ping 110.110.110.110 source 10.10.10.10

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 110.110.110.110, timeout is 2 seconds:
Packet sent with a source address of 10.10.10.10
U.U.U
Success rate is 0 percent (0/5)



(2)R5(AAAA株式会社支店側CEルータ)

Router5#ping 10.10.10.10 source 20.20.20.20

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.10, timeout is 2 seconds:
Packet sent with a source address of 20.20.20.20
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 120/139/164 ms

Router5#ping 100.100.100.100 source 20.20.20.20

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.100.100.100, timeout is 2 seconds:
Packet sent with a source address of 20.20.20.20
U.U.U
Success rate is 0 percent (0/5)

Router5#ping 110.110.110.110 source 20.20.20.20

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 110.110.110.110, timeout is 2 seconds:
Packet sent with a source address of 20.20.20.20
U.U.U
Success rate is 0 percent (0/5)

(3)R6(AAAA株式会社支店側CEルータ)

Router6#ping 110.110.110.110 source 100.100.100.100

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 110.110.110.110, timeout is 2 seconds:
Packet sent with a source address of 100.100.100.100
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/93/200 ms

Router6#ping 10.10.10.10 source 100.100.100.100

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.10, timeout is 2 seconds:
Packet sent with a source address of 100.100.100.100
U.U.U
Success rate is 0 percent (0/5)

Router6#ping 20.20.20.20 source 100.100.100.100

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.20.20.20, timeout is 2 seconds:
Packet sent with a source address of 100.100.100.100
U.U.U
Success rate is 0 percent (0/5)

(4)R7(AAAA株式会社支店側CEルータ)


Router7#ping 100.100.100.100 source 110.110.110.110

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.100.100.100, timeout is 2 seconds:
Packet sent with a source address of 110.110.110.110
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 64/116/200 ms

Router7#ping 10.10.10.10 source 110.110.110.110

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.10, timeout is 2 seconds:
Packet sent with a source address of 110.110.110.110
U.U.U
Success rate is 0 percent (0/5)

Router7#ping 20.20.20.20 source 110.110.110.110

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.20.20.20, timeout is 2 seconds:
Packet sent with a source address of 110.110.110.110
U.U.U
Success rate is 0 percent (0/5)

※ 解説は後ほど搭載します!!

2012年1月7日土曜日

プライベートVLANと保護ポート



プライベートVLAN(Private VLAN)と保護ポート


プライベートVLANとは、

VLANの中に複数のVLANを作る技術の事です。
プライベートVLANによって区切られたプライベートVLAN内でブロードキャストドメインを分割する事が出来ます。
又、従来では同一VALN間でトラフィック制御する際ACLなどを使用して制御が複雑になるなどの問題点がありましたが、プライベートVLANはその欠点を解消しております。





保護ポートとは、

保護ポートとは、プライベートVLANに比べてセカンダリVLANを設定せずにVLANのトラフィック制御をする事が出来る技術の事です。
保護ポートを設定したインターフェース同士は通信する事が出来ませんが、その他のポートとは通信する事が可能です。

■ 保護ポートの基本設定

Switch(config)# interface { インターフェース名 }
Switch(config-if)# switchport access vlan { VLAN番号 }
Switch(config-if)# switchport mode access
Switch(config-if)# switchport protected //保護ポートの設定

保護ポートの設定はとても簡単ですが、細かくトラフィック制御する事が出来ません。








■ プライベートVLANの用語



プライマリVLAN ・・・VLANドメイン全体の事。(従来通りのVLANの解釈)
セカンダリVLAN ・・・プライマリVLANに作成するVLANの事。セカンダリVLANは、独立VLANとコミュニティVLANに分類できます。
独立VLAN      ・・・プライマリVLAN内とのみ通信可能なVLANの事。同じセカンダリーVLAN同士も通信する事は出来ません。
コミュニティVLAN・・・同じコミュニティVLANとプライマリVLAN内とのみ通信可能なVLANの事。



■ 基本設定


①VTPをトランスペアレントモードにする

Switch(config)#vtp mode transparent

②プライマリVLANとセカンダリVLANの設定

Switch(config)# vlan { 作成するVLAN番号 }
Switch(config-vlan)#private-vlan { primary | isolated | community }


[ private-vlanのパラメータの詳細 ]
(1) プライマリVLAN

primary ・・・プライマリVLANの設定

例>
Switch(config)# vlan 50
Switch(config-vlan)# private-vlan primary 
Switch(config-vlan)# private-vlan association { セカンダリVLAN番号 }
※既にプライマリVLANの定義が終わっている場合は、以下のコマンドセカンダリVLANの追加、削除が可能。
Switch(config-vlan)# private-vlan association  [ add | remove ]  { セカンダリVLAN番号 }


(2) セカンダリVLAN

 ・ isolated(隔離モード) ・・・プライマリVLANと通信する事は出来るがセカンダリVLANを含むその他のVLANと通信する事は出来ない。
 ・ community(コミュニティモード) ・・・同じコミュニティとプライマリVLANとは通信する事が出来るが、その他のセカンダリVLANとは通信できない。


③各インターフェースの設定

(1) プライマリVLANの設定

Switch(config)# interface { インターフェース名 }
Switch(config-if)# switchport mode private-vlan primiscuous
Switch(config-if)# switchport private-vlan mapping { プライマリVLAN } [ add | remove ] {セカンダリVLAN}  //プライマリVLANとセカンダリVLANのマッピング




(2) セカンダリVLAN(独立VLAN、コミュニティVLAN)の設定

Switch(config)# interface { インターフェース名 }
Switch(config-if)# switchport mode private-vlan host
Switch(config-if)# switchport private-vlan host-association { プライマリVLAN } {セカンダリVLAN}   //プライマリVLANとセカンダリVLANの関連付け



■ プライベートVLANの設定例

(1) プライマリVLANの設定

Switch(config)#vtp mode transparent
Switch(config)# vlan 50
Switch(config-vlan)# private-vlan primary 
Switch(config-vlan)# private-vlan association 5,10,15
Switch(config-vlan)# exit
Switch(config)# vlan 5
Switch(config-vlan)#private-vlan isolated
Switch(config-vlan)# exit
Switch(config)# vlan 10
Switch(config-vlan)#private-vlan community
Switch(config-vlan)# exit
Switch(config)# vlan 15
Switch(config-vlan)#private-vlan community
Switch(config-vlan)# exit
Switch(config)# interface fa0/24
Switch(config-if)# switchport mode private-vlan primiscuous
Switch(config-if)# switchport private-vlan mapping 50 5,10,15
Switch(config-if)# exit
Switch(config)# interface fa0/1
Switch(config-if)# switchport mode private-vlan host
Switch(config-if)# switchport private-vlan host-association 50 5
Switch(config-if)# exit
Switch(config)# interface fa0/3
Switch(config-if)# switchport mode private-vlan host
Switch(config-if)# switchport private-vlan host-association 50 10
Switch(config-if)# exit
Switch(config)# interface fa0/5
Switch(config-if)# switchport mode private-vlan host
Switch(config-if)# switchport private-vlan host-association 50 15
Switch(config-if)# exit




2012年1月4日水曜日

VRRPの設定


VRRP ( Virtual Router Redundancy Protocol )


VRRPとは、

標準化されている冗長化プロトコルです。cisco独自ではない為、ciscoルータにも互換性があります。
1つのデフォルトゲートウェイのIPアドレスとMACアドレスを複数のルータで共有する事によって冗長化する事が出来ます。

用語

マスタールータ・・・仮想IPアドレスの代表としてルーティングするルータ。
バックアップルータ・・・アクティブルータがダウンした時に、アクティブルータの機能を受け継ぐルータ。
仮想IPアドレス・・・・複数のルータで共有する仮想IPアドレス
仮想MACアドレス ・・・複数のルータで共有する仮想MACアドレス。デフォルトは、[ 0000.005e.01?? ]
※ ??はVRRPグループ番号が入る。
VRRPプライオリティ・・優先度を決める数字。デフォルトで100が設定されている。高い値を持つルータがアクティブルータに選出される。
VRRPグループ・・・・・VRRPに参加する為のグループナンバー(バージョン1では[255]まで、バージョン2では[4095]まで指定可能。)




■ VRRP 基本設定



① 仮想IPアドレスの設定

Router(config)# int fa0/0
Router(config-if)# shutdown //強制ではない。
Router(config-if)# vrrp { グループナンバー } ip { IPアドレス } [secondary]
※上記のコマンドを設定する際は、事前にshutdownして下さい。

② プライオリティ設定

Router(config-if)# vrrp { グループナンバー } prirority { 優先値(プライオリティ値) }
※プライオリティ値のデフォルト設定は、100です。


③アクティブルータのインターフェースダウン時の切り替え設定

Router(config-if)#  track { オブジェクト番号 } interface { インターフェース名 } [ line-protocol | ip routing ] 
Router(config-if)# grrp { グループナンバー } track { オブジェクト番号 } decrement { 減少させるプライオリティ値 }

※VRRPでは、デフォルトでプリエンプトが有効になっております。しかし、プリエンプトの詳細設定をしたい時は以下のコマンドで可能です。

Router(config-if)# vrrp group preempt [ マスタールータへの切り替え時間(秒) ]


■設定例

①マスタールータの設定

VRRP1(config)# track 5 interface FastEthernet0/1 line-protocol
VRRP1(config)# interface FastEthernet0/0
VRRP1(config-if)# ip address 192.168.1.9 255.255.255.240
VRRP1(config-if)# vrrp 5 ip 192.168.1.14
VRRP1(config-if)# vrrp 5 priority 150
VRRP1(config-if)# vrrp 5 track 5 decrement 30
VRRP1(config-if)# no shutdown

②バックアップルータの設定

VRRP2(config)# interface FastEthernet0/0
VRRP2(config-if)# ip address 192.168.1.11 255.255.255.240
VRRP2(config-if)# vrrp 5 ip 192.168.1.14
VRRP2(config-if)# vrrp 5 priority 130
※fastethernet0/1がダウンした場合、プライオリティ値を20下げる(ダウン時、プライオリティ値は、130になりスタンバイルータに引き継ぐ)。
VRRP2(config-if)# no shutdown


③検証

1.show standyコマンド

(1)VRRP1側(マスター側)

VRRP1#show vrrp
FastEthernet0/0 - Group 5
  State is Master
  Virtual IP address is 192.168.1.14
  Virtual MAC address is 0000.5e00.0105
  Advertisement interval is 1.000 sec
  Preemption enabled
  Priority is 150
    Track object 5 state Up decrement 30
  Master Router is 192.168.1.10 (local), priority is 150
  Master Advertisement interval is 1.000 sec
  Master Down interval is 3.414 sec


(2)VRRP2側(バックアップルータ側)

VRRP2#show vrrp
FastEthernet0/0 - Group 5
  State is Backup
  Virtual IP address is 192.168.1.14
  Virtual MAC address is 0000.5e00.0105
  Advertisement interval is 1.000 sec
  Preemption enabled
  Priority is 130
  Master Router is 192.168.1.10, priority is 150
  Master Advertisement interval is 1.000 sec
  Master Down interval is 3.492 sec (expires in 3.376 sec)


2.VRRP1のinterface fastethernet0/1をダウン

VRRP1(config)# interface fastethernet0/1
VRRP1(config-if)# shutdown


(1)VRRP1側(バックアップルータ側)

*Mar  1 01:00:44.575: %VRRP-6-STATECHANGE: Fa0/0 Grp 5 state Master -> Backup

VRRP1のinterface fastethernet0/1がダウンした為、バックアップステートからマスターへ


(2)VRRP2側(バックアップルータ側)

*Mar  1 01:00:56.875: %VRRP-6-STATECHANGE: Fa0/0 Grp 5 state Backup -> Master

VRRP1のinterface fastethernet0/1がダウンした為、バックアップステートからマスターへ




3.show standyコマンド

(1)VRRP1側(マスタールータ→スタンバイルータ側)

VRRP1#show vrrp

FastEthernet0/0 - Group 5
  State is Backup
  Virtual IP address is 192.168.1.14
  Virtual MAC address is 0000.5e00.0105
  Advertisement interval is 1.000 sec
  Preemption enabled
  Priority is 120 (cfgd 150)                       //interface fa0/1がダウンした為、プライオリティが30ダウンし120になる。
    Track object 5 state Down decrement 30
  Master Router is 192.168.1.11, priority is 130
  Master Advertisement interval is 1.000 sec
  Master Down interval is 3.414 sec (expires in 3.042 sec)

(2)VRRP2側(スタンバイルータ→マスタールータ側)

VRRP2#show vrrp
FastEthernet0/0 - Group 5
  State is Master
  Virtual IP address is 192.168.1.14
  Virtual MAC address is 0000.5e00.0105
  Advertisement interval is 1.000 sec
  Preemption enabled
  Priority is 130
  Master Router is 192.168.1.11 (local), priority is 130
  Master Advertisement interval is 1.000 sec
  Master Down interval is 3.492 sec



4.RouterBのinterface fastethernet0/1をアップさせる

(1)VRRP1側(バックアップルータ→マスタールータ側)

*Mar  1 01:02:31.595: %VRRP-6-STATECHANGE: Fa0/0 Grp 5 state Backup -> Master

VRRP1のインターフェースがアップした為、プライオリティ値が150に戻り再びマスタールータへ戻る

(2)VRRP2側(マスタールータ→バックアップルータ側)

*Mar  1 01:02:44.115: %VRRP-6-STATECHANGE: Fa0/0 Grp 5 state Master -> Backup

VRRP1のインターフェースがアップした為、VRRP1のプライオリティ値が150に戻り自身は再びバックアップルータへ戻る

2012年1月3日火曜日

HSRPの設定

HSRP(Hot Standby Routing Protocol)とは

cisco独自の冗長化プロトコルです。1つのデフォルトゲートウェイのIPアドレスとMACアドレスを複数のルータで共有する事によって冗長化する事が出来ます。

>>オススメ記事:冗長化プロトコル(HSRP)の仕様・設定方法を図解解説
>>オススメ記事:HSRPのインターフェーストラッキングの必要性・設定方法を解説

用語


  • アクティブルータ・・・仮想IPアドレスの代表としてルーティングするルータ。
  • スタンバイルータ・・・アクティブルータがダウンした時に、アクティブルータの機能を受け継ぐルータ。
  • 仮想IPアドレス・・・・複数のルータで共有する仮想IPアドレス
  • 仮想MACアドレス ・・・複数のルータで共有する仮想MACアドレス。デフォルトは、[ 0000.0c07.ac?? ]※ ??はHSRPグループ番号が入る。

  • HSRPプライオリティ・・優先度を決める数字。デフォルトで100が設定されている。高い値を持つルータがアクティブルータに選出される。
  • HSRPグループ・・・・・HSRPに参加する為のグループナンバー(バージョン1では[255]まで、バージョン2では[4095]まで指定可能。)


■ HSRP 基本設定


① 仮想IPアドレスの設定


Router(config)# int fa0/0
Router(config-if)# shutdown //強制ではない。
Router(config-if)# standby { グループナンバー } ip { 仮想IPアドレス [secondary] }
※上記のコマンドを設定する際は、事前にshutdownして下さい。

② プライオリティ設定


Router(config-if)# standby { グループナンバー } prirority { 優先値(プライオリティ値) }
※プライオリティ値のデフォルト設定は、100です。

③ プリエンプト設定


Router(config-if)# standby { グループナンバー } preempt[ delay [ minimum seconds | reload seconds | sync seconds ]

※ デフォルトの設定では、切り替え機能が備わっていません。

④アクティブルータのインターフェースダウン時の切り替え設定


Router(config-if)# standby { グループナンバー } track { インターフェース } { 減少させるプライオリティ値 }


■設定例

①スタンバイルータの設定


RouterA(config)# interface FastEthernet0/0
RouterA(config-if)# ip address 192.168.1.9 255.255.255.240
RouterA(config-if)# standby 5 ip 192.168.1.14
RouterB(config-if)# standby 5 priority 140
RouterA(config-if)# standby 5 preempt
RouterA(config-if)# no shutdown

②アクティブルータの設定


RouterB(config)# interface FastEthernet0/0
RouterB(config-if)# ip address 192.168.1.11 255.255.255.240
RouterB(config-if)# standby 5 ip 192.168.1.14
RouterB(config-if)# standby 5 priority 150
RouterB(config-if)# standby 5 preempt
RouterB(config-if)# standby 5 track FastEthernet0/1 20
※fastethernet0/1がダウンした場合、プライオリティ値を20下げる(ダウン時、プライオリティ値は、130になりスタンバイルータに引き継ぐ)。
RouterB(config-if)# no shutdown


③検証



1.show standyコマンド



(1)RouterA側(スタンバイルータ側)

RouterA#show standby
FastEthernet0/0 - Group 5
  State is Standby
    4 state changes, last state change 00:56:48
  Virtual IP address is 192.168.1.14
  Active virtual MAC address is 0000.0c07.ac05
    Local virtual MAC address is 0000.0c07.ac05 (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 2.288 secs
  Preemption enabled
  Active router is 192.168.1.11, priority 150 (expires in 8.444 sec)
  Standby router is local
  Priority 140
  IP redundancy name is "hsrp-Fa0/0-5" (default)


(2)RouterB側(アクティブルータ側)


RouterB#show standby
FastEthernet0/0 - Group 5
  State is Active
    5 state changes, last state change 00:58:24
  Virtual IP address is 192.168.1.14
  Active virtual MAC address is 0000.0c07.ac05
    Local virtual MAC address is 0000.0c07.ac05 (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 2.392 secs
  Preemption enabled
  Active router is local
  Standby router is 192.168.1.9, priority 140 (expires in 7.292 sec)
  Priority 150 
    Track interface FastEthernet0/1 state Up decrement 20
  IP redundancy name is "hsrp-Fa0/0-5" (default)

2.RouterBのinterface fastethernet0/1をダウン


RouterB(config)# interface fastethernet0/1
RouterB(config-if)# shutdown

(1)RouterA側(スタンバイルータ側)



*Mar  1 01:23:37.243: %HSRP-5-STATECHANGE: FastEthernet0/0 Grp 5 state Standby -> Active

スタンバイルータからアクティブルータへ


(2)RouterB側(アクティブルータ側)



*Mar  1 01:23:46.547: %HSRP-5-STATECHANGE: FastEthernet0/0 Grp 5 state Active -> Speak
*Mar  1 01:23:56.547: %HSRP-5-STATECHANGE: FastEthernet0/0 Grp 5 state Speak -> Standby

アクティブステートからスピーク→スタンバイルータへ



3.show standyコマンド


(1)RouterA側(スタンバイルータ→アクティブルータ側)


RouterA#show standby
FastEthernet0/0 - Group 5
  State is Active      //アクティブルータへ
    5 state changes, last state change 00:09:15
  Virtual IP address is 192.168.1.14
  Active virtual MAC address is 0000.0c07.ac05
    Local virtual MAC address is 0000.0c07.ac05 (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 2.696 secs
  Preemption enabled
  Active router is local
  Standby router is 192.168.1.11, priority 130 (expires in 7.652 sec)     //interface fa0/1がダウンした為、プライオリティ値が20減少
  Priority 140 
  IP redundancy name is "hsrp-Fa0/0-5" (default)

(2)RouterB側(アクティブルータ→スタンバイルータ側)


RouterB#show standby
FastEthernet0/0 - Group 5
  State is Standby   //スタンバイルータへ
    7 state changes, last state change 00:11:44
  Virtual IP address is 192.168.1.14
  Active virtual MAC address is 0000.0c07.ac05
    Local virtual MAC address is 0000.0c07.ac05 (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 0.120 secs
  Preemption enabled
  Active router is 192.168.1.9, priority 140 (expires in 9.124 sec)
  Standby router is local
  Priority 130 (configured 150)      //interface fa0/1がダウンした為、プライオリティ値が20減少
    Track interface FastEthernet0/1 state Down decrement 20
  IP redundancy name is "hsrp-Fa0/0-5" (default)



4.RouterBのinterface fastethernet0/1をアップさせる


(1)RouterA側(スタンバイルータ→アクティブルータ側)


*Mar  1 01:40:19.503: %HSRP-5-STATECHANGE: FastEthernet0/0 Grp 5 state Active -> Speak
HSRP1#
*Mar  1 01:40:29.503: %HSRP-5-STATECHANGE: FastEthernet0/0 Grp 5 state Speak -> Standby

RouterBのインターフェースがアップした為、プライオリティ値が150に戻り再びスタンバイルータへ戻る

(2)RouterB側(アクティブルータ→スタンバイルータ側)


*Mar  1 01:40:28.595: %HSRP-5-STATECHANGE: FastEthernet0/0 Grp 5 state Standby -> Active

RouterBのインターフェースがアップした為、プライオリティ値が150に戻り再びアクティブルータへ戻る


>>オススメ記事:CCIEが語る!ネットワークエンジニアにオススメな本・参考書!
>>オススメ記事:ITエンジニア必見!失敗しない転職エージェントの選び方はこれだ!