<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
    <channel>
        <title>ネットワークのおべんきょしませんか？ Cisco CCNA/CCNP/CCIE、ネットワークスペシャリスト試験の勉強にピッタリ</title>
        <link>http://www.n-study.com/network/</link>
        <description>OSI参照モデル、LAN、WAN、TCP/IP、ネットワーク機器などITエンジニアとして身に付けておくべき、さまざまなネットワーク技術をわかりやすく解説。
Cisco CCNA/CCNP/CCIE、ネットワークスペシャリストなどネットワーク技術の資格取得のためにも活用してください。</description>
        <language>ja</language>
        <copyright>Copyright 2010</copyright>
        <lastBuildDate>Fri, 12 Mar 2010 12:45:44 +0900</lastBuildDate>
        <generator>http://www.sixapart.com/movabletype/</generator>
        <docs>http://www.rssboard.org/rss-specification</docs>
        
        <item>
            <title>MPLS-VPNのトラブル その1 【CCIEレベル】</title>
            <description><![CDATA[<h2>ネットワーク構成</h2>

<p>下記のネットワーク構成で、MPLS-VPNを通じてR4とR5間の通信ができるようにしたいと考えています。</p>


<p><span class="mt-enclosure mt-enclosure-image"
style="display: inline;"><a
href="http://www.n-study.com/network/image/mpls04.html"
onclick="window.open('http://www.n-study.com/network/image/mpls04.html','pop
up','width=648,height=455,scrollbars=no,resizable=no,toolbar=no,directories=
no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img
src="http://www.n-study.com/network/image/mpls04-thumb-400x280.jpg"
width="400" height="280" alt="mpls04.jpg" class="mt-image-none" style=""
/></a></span><br>
図 MPLS-VPN ネットワーク構成</p>

<p>ルータの役割は、次の通りです。</p>

<p>PEルータ:R1、R3<br>
Pルータ :R2<br>
CEルータ:R4、R5</p>

<p>PEルータであるR1、R3ではともにVRFとして次のように定義します。</p>

<p>VRF名:VPN<br>
RD:100:100<br>
Import RT:100:100<br>
Export RT:100:100</p>


<h2>設定概要</h2>

<p>各ルータで行われているMPLS-VPNでの通信に関連する設定は次の通りです。</p>

<pre>R1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ip vrf VPN
 rd 100:100
 route-target export 100:100
 route-target import 100:100
!
interface Loopback0
 ip address 192.168.0.1 255.255.255.255
!
interface FastEthernet0/0
 ip vrf forwarding VPN
 ip address 10.14.14.1 255.255.255.0
!
interface Serial1/0
 ip address 192.168.12.1 255.255.255.0
 encapsulation ppp
 mpls ip
 no peer neighbor-route
!
router ospf 14 vrf VPN
 log-adjacency-changes
 redistribute bgp 100 subnets
 network 10.14.14.1 0.0.0.0 area 0
!
router ospf 1
 log-adjacency-changes
 network 192.168.0.0 0.0.255.255 area 0
!
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 neighbor 192.168.0.3 remote-as 100
 neighbor 192.168.0.3 update-source Loopback0
 no auto-summary
 !
 address-family vpnv4
  neighbor 192.168.0.3 activate
  neighbor 192.168.0.3 send-community extended
 exit-address-family
 !
 address-family ipv4 vrf VPN
  redistribute ospf 14 vrf VPN
  no synchronization
 exit-address-family
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<pre>R2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
interface Loopback0
 ip address 192.168.0.2 255.255.255.255
!
interface Serial1/0
 ip address 192.168.12.2 255.255.255.0
 encapsulation ppp
 no peer neighbor-route
!
interface Serial1/1
 ip address 192.168.23.2 255.255.255.0
 encapsulation ppp
 mpls ip
 no peer neighbor-route
!
router ospf 1
 log-adjacency-changes
 network 192.168.0.0 0.0.255.255 area 0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<pre>R3
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ip vrf VPN
 rd 100:100
 route-target export 100:100
 route-target import 100:100
!
interface Loopback0
 ip address 192.168.0.3 255.255.255.255
!
interface FastEthernet0/0
 ip vrf forwarding VPN
 ip address 10.35.35.3 255.255.255.0
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 192.168.23.3 255.255.255.0
 encapsulation ppp
 mpls ip
 no peer neighbor-route
!
router ospf 35 vrf VPN
 log-adjacency-changes
 redistribute bgp 100 subnets
 network 10.35.35.3 0.0.0.0 area 0
!
router ospf 1
 log-adjacency-changes
 network 192.168.0.0 0.0.255.255 area 0
!
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 neighbor 192.168.0.1 remote-as 100
 neighbor 192.168.0.1 update-source Loopback0
 no auto-summary
 !
 address-family vpnv4
  neighbor 192.168.0.1 activate
  neighbor 192.168.0.1 send-community extended
 exit-address-family
 !
 address-family ipv4 vrf VPN
  redistribute ospf 35 vrf VPN
  no synchronization
 exit-address-family
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<pre>R4
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
interface Loopback0
 ip address 172.16.4.4 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0
 ip address 10.14.14.4 255.255.255.0
!
router ospf 1
 log-adjacency-changes
 network 10.14.14.4 0.0.0.0 area 0
 network 172.16.4.4 0.0.0.0 area 0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<pre>R5
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
interface Loopback0
 ip address 172.16.5.5 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0
 ip address 10.35.35.5 255.255.255.0
!
router ospf 1
 log-adjacency-changes
 network 10.35.35.5 0.0.0.0 area 0
 network 172.16.5.5 0.0.0.0 area 0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<h2>トラブルの症状</h2>

<p>R4、R5のルーティングテーブルを見ると、お互いのルートを確認できます。</p>

<pre>R4 show ip route
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R4#show ip route
～省略～

Gateway of last resort is not set

     172.16.0.0/24 is subnetted, 2 subnets
C       172.16.4.0 is directly connected, Loopback0
O E2    172.16.5.0 [110/2] via 10.14.14.1, 00:20:00, FastEthernet0/0
     10.0.0.0/24 is subnetted, 2 subnets
O E2    10.35.35.0 [110/1] via 10.14.14.1, 00:20:00, FastEthernet0/0
C       10.14.14.0 is directly connected, FastEthernet0/0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R5 show ip route
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R5#show ip route
～省略～

Gateway of last resort is not set

     172.16.0.0/24 is subnetted, 2 subnets
O E2    172.16.4.0 [110/2] via 10.35.35.3, 00:23:01, FastEthernet0/0
C       172.16.5.0 is directly connected, Loopback0
     10.0.0.0/24 is subnetted, 2 subnets
C       10.35.35.0 is directly connected, FastEthernet0/0
O E2    10.14.14.0 [110/1] via 10.35.35.3, 00:23:01, FastEthernet0/0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<p>ところが、実際には通信ができません。R4から172.16.5.5へPingすると失敗します。</p>


<pre>R4から172.16.5.5へPing
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R4#ping 172.16.5.5 source loopback 0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.5.5, timeout is 2 seconds:
Packet sent with a source address of 172.16.4.4
.....
Success rate is 0 percent (0/5)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<p>CEルータであるR4、R5でお互いのルートが確認できているので、R4とR5には設定ミスがないことが明らかです。そこで、MPLS-VPNバックボーンを構成するR1、R2、R3でそれぞれ次のshowコマンドで原因の切り分けを行いました。</p>

<pre>R1
show mpls interface
show mpls ldp neighbor
show ip bgp summary
show ip bgp vpnv4 all
show ip route vrf VPN
show ip cef vrf VPN 172.16.5.0

R2
show mpls interface
show mpls ldp neighbor
show mpls forwarding-table

R3
show mpls interface
show mpls ldp neighbor
show ip bgp summary
show ip bgp vpnv4 all
show ip route vrf VPN
show ip cef vrf VPN 172.16.4.0</pre>


<pre>R1 showコマンドの結果
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#show mpls interface
Interface              IP            Tunnel   Operational
Serial1/0              Yes (ldp)     No       Yes
R1#show mpls ldp neighbor

R1#show ip bgp summary
BGP router identifier 192.168.0.1, local AS number 100
BGP table version is 1, main routing table version 1

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.0.3     4   100      43      43        1    0    0 00:33:52        0
R1#show ip bgp vpnv4 all
BGP table version is 9, local router ID is 192.168.0.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: 100:100 (default for vrf VPN)
*> 10.14.14.0/24    0.0.0.0                  0         32768 ?
*>i10.35.35.0/24    192.168.0.3              0    100      0 ?
*> 172.16.4.0/24    10.14.14.4               2         32768 ?
*>i172.16.5.0/24    192.168.0.3              2    100      0 ?
R1#show ip route vrf VPN

Routing Table: VPN
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

     172.16.0.0/24 is subnetted, 2 subnets
O       172.16.4.0 [110/2] via 10.14.14.4, 00:35:16, FastEthernet0/0
B       172.16.5.0 [200/2] via 192.168.0.3, 00:33:31
     10.0.0.0/24 is subnetted, 2 subnets
B       10.35.35.0 [200/0] via 192.168.0.3, 00:33:31
C       10.14.14.0 is directly connected, FastEthernet0/0
R1#show ip cef vrf VPN 172.16.5.0
172.16.5.0/24, version 14, epoch 0, cached adjacency to Serial1/0
0 packets, 0 bytes
  tag information set
    local tag: VPN-route-head
    fast tag rewrite with
        Recursive rewrite via 192.168.0.3/32, tags imposed {21}
  via 192.168.0.3, 0 dependencies, recursive
    next hop 192.168.12.2, Serial1/0 via 192.168.0.3/32
    valid cached adjacency
    tag rewrite with
        Recursive rewrite via 192.168.0.3/32, tags imposed {21}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<pre>R2 showコマンドの結果
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R2#show mpls interface
Interface              IP            Tunnel   Operational
Serial1/1              Yes (ldp)     No       Yes
R2#show mpls ldp neighbor
    Peer LDP Ident: 192.168.0.3:0; Local LDP Ident 192.168.0.2:0
        TCP connection: 192.168.0.3.48691 - 192.168.0.2.646
        State: Oper; Msgs sent/rcvd: 89/90; Downstream
        Up time: 01:12:09
        LDP discovery sources:
          Serial1/1, Src IP addr: 192.168.23.3
        Addresses bound to peer LDP Ident:
          192.168.23.3    192.168.0.3
R2#show mpls forwarding-table
Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop
tag    tag or VC   or Tunnel Id      switched   interface
16     Untagged    192.168.0.1/32    3317       Se1/0      point2point
17     Pop tag     192.168.0.3/32    2809       Se1/1      point2point
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<pre>R3 showコマンドの結果
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R3#show mpls interface
Interface              IP            Tunnel   Operational
Serial1/0              Yes (ldp)     No       Yes
R3#show mpls ldp neighbor
    Peer LDP Ident: 192.168.0.2:0; Local LDP Ident 192.168.0.3:0
        TCP connection: 192.168.0.2.646 - 192.168.0.3.48691
        State: Oper; Msgs sent/rcvd: 90/90; Downstream
        Up time: 01:12:51
        LDP discovery sources:
          Serial1/0, Src IP addr: 192.168.23.2
        Addresses bound to peer LDP Ident:
          192.168.12.2    192.168.23.2    192.168.0.2
R3#show ip bgp summary
BGP router identifier 192.168.0.3, local AS number 100
BGP table version is 1, main routing table version 1

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.0.1     4   100      45      45        1    0    0 00:35:25        0
R3#show ip bgp vpnv4 all
BGP table version is 9, local router ID is 192.168.0.3
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: 100:100 (default for vrf VPN)
*>i10.14.14.0/24    192.168.0.1              0    100      0 ?
*> 10.35.35.0/24    0.0.0.0                  0         32768 ?
*>i172.16.4.0/24    192.168.0.1              2    100      0 ?
*> 172.16.5.0/24    10.35.35.5               2         32768 ?
R3#show ip route vrf VPN

Routing Table: VPN
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

     172.16.0.0/24 is subnetted, 2 subnets
B       172.16.4.0 [200/2] via 192.168.0.1, 00:35:09
O       172.16.5.0 [110/2] via 10.35.35.5, 00:36:41, FastEthernet0/0
     10.0.0.0/24 is subnetted, 2 subnets
C       10.35.35.0 is directly connected, FastEthernet0/0
B       10.14.14.0 [200/0] via 192.168.0.1, 00:35:09
R3#show ip cef vrf VPN 172.16.4.0
172.16.4.0/24, version 14, epoch 0, cached adjacency to Serial1/0
0 packets, 0 bytes
  tag information set
    local tag: VPN-route-head
    fast tag rewrite with Se1/0, point2point, tags imposed: {16 22}
  via 192.168.0.1, 0 dependencies, recursive
    next hop 192.168.23.2, Serial1/0 via 192.168.0.1/32
    valid cached adjacency
    tag rewrite with Se1/0, point2point, tags imposed: {16 22}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<p>R1～R3のshowコマンドによって設定ミスがわかったので修正すると、正常にMPLS-VPNを通じてR4-R5間の通信ができるようになりました。</p>


<h2>問題</h2>

<ul>
	<li>R4、R5ではお互いのルートを学習できているのになぜ通信できないのですか？</li>
	<li>MPLS-VPN経由でR4-R5間の通信ができるようにするためには、どのように設定を修正すればよいですか？</li>
</ul>
]]></description>
            <link>http://www.n-study.com/network/2010/03/mplsvpn_1_ccie.html</link>
            <guid>http://www.n-study.com/network/2010/03/mplsvpn_1_ccie.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">IPルーティング</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">シスコ</category>
            
            
            <pubDate>Fri, 12 Mar 2010 12:45:44 +0900</pubDate>
        </item>
        
        <item>
            <title>MPLSのトラブル その2  解答と解説 【CCIEレベル】</title>
            <description><![CDATA[<h2>解答</h2>

・R1とR3間の通信でラベルスイッチングができていない原因はなんですか？

<p>R2のSerial1/0でLDPが有効化されていないため</p>


・R1とR3間でラベルスイッチングできるようにするためには、どのように設定
  を修正すればよいですか？

<pre>R2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
interface serial1/0
 mpls ip
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<h2>ワンポイント</h2>

<p>MPLSに限らず基本的なshowコマンドをきちんと確認することが重要！</p>


<h2>解説</h2>

<p>MPLSによるラベルスイッチングを行うために、ラベルの割り当てと配布を行うためのプロトコルがLDP(Labe Distribution Protocol)です。LDPネイバーを確立した上で、ネイバー間でFEC(Forwarding Equivalent Class)に対してラベルを割り当てて配布します。
LDPを有効化するためには、インタフェースコンフィグレーションモードで、次のコマンドを入力します。</p>


<pre>(config-if)#mpls ip</pre>


<p>LDPネイバーを確立するすべてのインタフェースでLDPを有効化しなければいけません。もし、LDPが有効化されていなければLDPネイバーを確立することができません。すると、ラベルの配布もされずにパケットの転送は、ラベルスイッチングではなくなってしまいます。LDPが有効化されていて、LDPネイバーを確立できているかどうかは、ラベルスイッチングを行う上で、一番基本的でかつ重要です。<br>
インタフェースでLDPが有効化されているかは、show mpls interfaceで確認します。また、LDPネイバーはshow mpls ldp neighborで確認します。今回の問題は、この基本的なLDPの確認コマンドが読めるかどうかにフォーカスしています。R1～R3でshow mpls interfaceとshow mpls ldp neighborの結果を見ていくと、R2の設定ミスがすぐにわかります。</p>

<pre>R2 show mpls interface/show mpls ldp neighbor
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R2#show mpls interfaces
Interface              IP            Tunnel   Operational
Serial1/1              Yes (ldp)     No       Yes
R2#show mpls ldp neighbor
    Peer LDP Ident: 192.168.23.3:0; Local LDP Ident 192.168.0.2:0
        TCP connection: 192.168.23.3.39603 - 192.168.0.2.646
        State: Oper; Msgs sent/rcvd: 39/42; Downstream
        Up time: 00:20:25
        LDP discovery sources:
          Serial1/1, Src IP addr: 192.168.23.3
        Addresses bound to peer LDP Ident:
          192.168.23.3    192.168.0.3
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<p>上記のR2のshow mpls interfaceとshow mpls ldp neighborでは、Serial1/1でしかLDPが有効化されていません。そのため、R1とR2の間でLDPネイバーを確立できていないことがわかります。この問題を解決するためには、R2のSerial1/0でもLDPを有効化します。</p>


<pre>R2 Serial1/0でLDPの有効化
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
interface serial1/0
 mpls ip
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<p>R2のSerial1/0でLDPを有効化したあとで、show mpls interfaceとshow mpls ldp neighborを見ると、次のようになります。</p>


<pre>R2 show mpls interface/show mpls ldp neighbor
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R2#show mpls interfaces
Interface              IP            Tunnel   Operational
Serial1/0              Yes (ldp)     No       Yes
Serial1/1              Yes (ldp)     No       Yes
R2#show mpls ldp neighbor
    Peer LDP Ident: 192.168.0.3:0; Local LDP Ident 192.168.0.2:0
        TCP connection: 192.168.0.3.30379 - 192.168.0.2.646
        State: Oper; Msgs sent/rcvd: 13/13; Downstream
        Up time: 00:02:16
        LDP discovery sources:
          Serial1/1, Src IP addr: 192.168.23.3
        Addresses bound to peer LDP Ident:
          192.168.23.3    192.168.0.3
    Peer LDP Ident: 192.168.0.1:0; Local LDP Ident 192.168.0.2:0
        TCP connection: 192.168.0.1.646 - 192.168.0.2.54171
        State: Oper; Msgs sent/rcvd: 11/11; Downstream
        Up time: 00:00:12
        LDP discovery sources:
          Serial1/0, Src IP addr: 192.168.12.1
        Addresses bound to peer LDP Ident:
          192.168.12.1    192.168.0.1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<p>R2はR1およびR3とLDPネイバーを確立できていることがわかります。すると、R1、R2、R3の間でそれぞれのFEC(ルーティングテーブルエントリ)に対してラベルの割り当てと配布を行います。</p>

<p>具体的に、ラベルを確認しましょう。R1でR3の192.168.0.3に対するラベルを
show ip cef 192.168.0.3で確認します。</p>


<pre>R1から192.168.0.3へ転送するときのラベル
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#show ip cef 192.168.0.3
192.168.0.3/32, version 22, epoch 0, cached adjacency to Serial1/0
0 packets, 0 bytes
  tag information set
    local tag: 20
    fast tag rewrite with Se1/0, point2point, tags imposed: {19}
  via 192.168.12.2, Serial1/0, 0 dependencies
    next hop 192.168.12.2, Serial1/0
    valid cached adjacency
    tag rewrite with Se1/0, point2point, tags imposed: {19}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<p>R1は、192.168.0.3へパケットを転送するときにラベル19を付けてSerial1/0から出力することが分かります。</p>

<p>このようにMPLS(LDP)の基本的なshowコマンドをしっかりと見ることができれば、単純な設定ミスはすぐに原因がわかるようになります。show running-configだけではなく、各プロトコルに応じた適切なshowコマンドを把握しておくことはとても重要です。</p>



<p>本題からそれますが、もう少しラベルスイッチングの動作を確認しておきましょう。</p>
<p>R2はラベル19が付加されているパケットをラベルスイッチングします。どのようにラベルスイッチングするかは、show mpls forwarding-tableでLFIBテーブルを見るとわかります。</p>


<pre>R2 show mpls forwarding-table
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R2#show mpls forwarding-table
Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop
tag    tag or VC   or Tunnel Id      switched   interface
18     Pop tag     192.168.0.1/32    0          Se1/0      point2point
19     Pop tag     192.168.0.3/32    0          Se1/1      point2point
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<p>R2はラベル19が付加されているパケットを受信すると、ラベルを取り除いて(Pop tag
Serial1/1から出力します。R3にはラベルが付加されていない通常のIPパケットが届くことになります。</p>

<p>※R2でラベルを取り除く動作をPHP(Penultimate Hop Popping)と呼びます。</p>

<p>次の図は、R1からR3の192.168.0.3へパケットを転送していく様子を図にしたものです。</p>


<p><span class="mt-enclosure mt-enclosure-image"
style="display: inline;"><a
href="http://www.n-study.com/network/image/mpls03.html"
onclick="window.open('http://www.n-study.com/network/image/mpls03.html','pop
up','width=538,height=237,scrollbars=no,resizable=no,toolbar=no,directories=
no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img
src="http://www.n-study.com/network/image/mpls03-thumb-400x176.jpg"
width="400" height="176" alt="mpls03.jpg" class="mt-image-none" style=""
/></a></span><br>
図 R1から192.168.0.3へのパケット転送</p>
]]></description>
            <link>http://www.n-study.com/network/2010/03/mpls_2_ccie_1.html</link>
            <guid>http://www.n-study.com/network/2010/03/mpls_2_ccie_1.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">IPルーティング</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">シスコ</category>
            
            
            <pubDate>Wed, 03 Mar 2010 14:02:27 +0900</pubDate>
        </item>
        
        <item>
            <title>MPLSのトラブル その2 【CCIEレベル】</title>
            <description><![CDATA[<h2>ネットワーク構成</h2>

<p>下記のネットワーク構成でMPLSによるラベルスイッチングができるようにします。</p>


<p><span class="mt-enclosure mt-enclosure-image"
style="display: inline;"><a
href="http://www.n-study.com/network/image/mpls02.html"
onclick="window.open('http://www.n-study.com/network/image/mpls02.html','pop
up','width=599,height=256,scrollbars=no,resizable=no,toolbar=no,directories=
no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img
src="http://www.n-study.com/network/image/mpls02-thumb-400x170.jpg"
width="400" height="170" alt="mpls02.jpg" class="mt-image-none" style=""
/></a></span><br>
図 MPLSネットワーク構成</p>


<h2>設定概要</h2>

<p>R1～R3でMPLSに関連する設定の抜粋は次の通りです。</p>


<pre>R1 
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ip cef
!
interface Loopback0
 ip address 192.168.0.1 255.255.255.255
!
interface Serial1/0
 ip address 192.168.12.1 255.255.255.0
 encapsulation ppp
 mpls ip
 no peer neighbor-route
!
!
router ospf 1
 log-adjacency-changes
 network 192.168.0.0 0.0.255.255 area 0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R2 
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ip cef
!
interface Loopback0
 ip address 192.168.0.2 255.255.255.0
!
interface Serial1/0
 ip address 192.168.12.2 255.255.255.0
 encapsulation ppp
 no peer neighbor-route
!
interface Serial1/1
 ip address 192.168.23.2 255.255.255.0
 encapsulation ppp
 mpls ip
 no peer neighbor-route
!
router ospf 1
 log-adjacency-changes
 network 192.168.0.0 0.0.255.255 area 0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R3 
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ip cef
!
interface Loopback0
 ip address 192.168.0.3 255.255.255.255
!
interface Serial1/0
 ip address 192.168.23.3 255.255.255.0
 encapsulation ppp
 mpls ip
 no peer neighbor-route
!
router ospf 1
 log-adjacency-changes
 network 192.168.0.0 0.0.255.255 area 0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<h2>トラブルの症状</h2>

<p>R1からR3のLoopback0(192.168.0.3)へパケットを送信するときに付加されるラベルを確認するためにCEFテーブルを見たところ、ラベルの情報がありませんでした。</p>

<pre>R1 show ip cef 192.168.0.3
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#show ip cef 192.168.0.3
192.168.0.3/32, version 21, epoch 0, cached adjacency to Serial1/0
0 packets, 0 bytes
  tag information set
    local tag: 20
  via 192.168.12.2, Serial1/0, 0 dependencies
    next hop 192.168.12.2, Serial1/0
    valid cached adjacency
    tag rewrite with Se1/0, point2point, tags imposed: {}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<p>R1からR3のLoopback0(192.168.0.3)への通信はできていますが、ラベルスイッチングではなく通常のIPパケットのスイッチングを行っていることになっています。<br>
この原因を調べるために、R1～R3でshow mpls interfaceとshow mpls ldp neighgobrコマンドを実行すると、次のような出力結果になりました。</p>

<pre>R1 show mpls interface/show mpls ldp neighbor
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#show mpls interfaces
Interface              IP            Tunnel   Operational
Serial1/0              Yes (ldp)     No       Yes
R1#show mpls ldp neighbor

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R2 show mpls interface/show mpls ldp neighbor
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R2#show mpls interfaces
Interface              IP            Tunnel   Operational
Serial1/1              Yes (ldp)     No       Yes
R2#show mpls ldp neighbor
    Peer LDP Ident: 192.168.23.3:0; Local LDP Ident 192.168.0.2:0
        TCP connection: 192.168.23.3.39603 - 192.168.0.2.646
        State: Oper; Msgs sent/rcvd: 39/42; Downstream
        Up time: 00:20:25
        LDP discovery sources:
          Serial1/1, Src IP addr: 192.168.23.3
        Addresses bound to peer LDP Ident:
          192.168.23.3    192.168.0.3
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R3 show mpls interface/show mpls ldp neighbor
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R3#show mpls interfaces
Interface              IP            Tunnel   Operational
Serial1/0              Yes (ldp)     No       Yes
R3#show mpls ldp neighbor
    Peer LDP Ident: 192.168.0.2:0; Local LDP Ident 192.168.23.3:0
        TCP connection: 192.168.0.2.646 - 192.168.23.3.39603
        State: Oper; Msgs sent/rcvd: 42/40; Downstream
        Up time: 00:20:56
        LDP discovery sources:
          Serial1/0, Src IP addr: 192.168.23.2
        Addresses bound to peer LDP Ident:
          192.168.12.2    192.168.23.2    192.168.0.2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>
<h2>※以下の点について、修正と追記しています。</h2>

<ul>
	<li>R2のLoopback0インタフェースのサブネットマスクを/24→/32に</li>
	<li>問題の追加</li>
	
</ul>
<h3>ネットワーク構成</h3>

<p>下記のネットワーク構成でMPLSによるラベルスイッチングができるようにします。</p>


<p><span class="mt-enclosure mt-enclosure-image"
style="display: inline;"><a
href="http://www.n-study.com/network/image/mpls02.html"
onclick="window.open('http://www.n-study.com/network/image/mpls02.html','pop
up','width=599,height=256,scrollbars=no,resizable=no,toolbar=no,directories=
no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img
src="http://www.n-study.com/network/image/mpls02-thumb-400x170.jpg"
width="400" height="170" alt="mpls02.jpg" class="mt-image-none" style=""
/></a></span>
<br>図 MPLSネットワーク構成</p>


<h3>設定概要</h3>

<p>R1～R3でMPLSに関連する設定の抜粋は次の通りです。</p>


<pre>R1 
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ip cef
!
interface Loopback0
 ip address 192.168.0.1 255.255.255.255
!
interface Serial1/0
 ip address 192.168.12.1 255.255.255.0
 encapsulation ppp
 mpls ip
 no peer neighbor-route
!
!
router ospf 1
 log-adjacency-changes
 network 192.168.0.0 0.0.255.255 area 0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R2 
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ip cef
!
interface Loopback0
 ip address 192.168.0.2 255.255.255.255
!
interface Serial1/0
 ip address 192.168.12.2 255.255.255.0
 encapsulation ppp
 no peer neighbor-route
!
interface Serial1/1
 ip address 192.168.23.2 255.255.255.0
 encapsulation ppp
 mpls ip
 no peer neighbor-route
!
router ospf 1
 log-adjacency-changes
 network 192.168.0.0 0.0.255.255 area 0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R3 
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ip cef
!
interface Loopback0
 ip address 192.168.0.3 255.255.255.255
!
interface Serial1/0
 ip address 192.168.23.3 255.255.255.0
 encapsulation ppp
 mpls ip
 no peer neighbor-route
!
router ospf 1
 log-adjacency-changes
 network 192.168.0.0 0.0.255.255 area 0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<h3>トラブルの症状</h3>

<p>R1からR3のLoopback0(192.168.0.3)へパケットを送信するときに付加されるラベルを確認するためにCEFテーブルを見たところ、ラベルの情報がありませんでした。</p>

<pre>R1 show ip cef 192.168.0.3
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#show ip cef 192.168.0.3
192.168.0.3/32, version 21, epoch 0, cached adjacency to Serial1/0
0 packets, 0 bytes
  tag information set
    local tag: 20
  via 192.168.12.2, Serial1/0, 0 dependencies
    next hop 192.168.12.2, Serial1/0
    valid cached adjacency
    tag rewrite with Se1/0, point2point, tags imposed: {}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<p>R1からR3のLoopback0(192.168.0.3)への通信はできていますが、ラベルスイッチングではなく通常のIPパケットのスイッチングを行っていることになっています。<br>
この原因を調べるために、R1～R3でshow mpls interfaceとshow mpls ldp neighgobrコマンドを実行すると、次のような出力結果になりました。</p>

<pre>R1 show mpls interface/show mpls ldp neighbor
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#show mpls interfaces
Interface              IP            Tunnel   Operational
Serial1/0              Yes (ldp)     No       Yes
R1#show mpls ldp neighbor

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R2 show mpls interface/show mpls ldp neighbor
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R2#show mpls interfaces
Interface              IP            Tunnel   Operational
Serial1/1              Yes (ldp)     No       Yes
R2#show mpls ldp neighbor
    Peer LDP Ident: 192.168.23.3:0; Local LDP Ident 192.168.0.2:0
        TCP connection: 192.168.23.3.39603 - 192.168.0.2.646
        State: Oper; Msgs sent/rcvd: 39/42; Downstream
        Up time: 00:20:25
        LDP discovery sources:
          Serial1/1, Src IP addr: 192.168.23.3
        Addresses bound to peer LDP Ident:
          192.168.23.3    192.168.0.3
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R3 show mpls interface/show mpls ldp neighbor
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R3#show mpls interfaces
Interface              IP            Tunnel   Operational
Serial1/0              Yes (ldp)     No       Yes
R3#show mpls ldp neighbor
    Peer LDP Ident: 192.168.0.2:0; Local LDP Ident 192.168.23.3:0
        TCP connection: 192.168.0.2.646 - 192.168.23.3.39603
        State: Oper; Msgs sent/rcvd: 42/40; Downstream
        Up time: 00:20:56
        LDP discovery sources:
          Serial1/0, Src IP addr: 192.168.23.2
        Addresses bound to peer LDP Ident:
          192.168.12.2    192.168.23.2    192.168.0.2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<h2>問題</h2>

<ul>
	<li>R1とR3間の通信でラベルスイッチングができていない原因はなんですか？</li>
	<li>R1とR3間でラベルスイッチングできるようにするためには、どのように設定を修正すればよいですか？</li>
</ul>


]]></description>
            <link>http://www.n-study.com/network/2010/03/mpls_2_ccie.html</link>
            <guid>http://www.n-study.com/network/2010/03/mpls_2_ccie.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">IPルーティング</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">シスコ</category>
            
            
            <pubDate>Wed, 03 Mar 2010 13:51:57 +0900</pubDate>
        </item>
        
        <item>
            <title>MPLSのトラブル 解答と解説【CCIEレベル】</title>
            <description><![CDATA[<h2>解答</h2>

<ul>
	<li>R2との間でLDPネイバーを確立できない原因は何ですか？</li>
</ul>

<p>R2の200.200.200.200/32との接続性がないため</p>


<ul>
	<li>R2との間でLDPネイバーを確立するためにどのように設定を行えばよいですか</li>
</ul>

<pre>R2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
router ospf 1
 network 200.200.200.200 0.0.0.0 area 0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<p>または
<br><br>
<pre>R2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
mpls ldp router-id loopback0 force
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


</h2>ワンポイント</h2>

<p>LDPルータIDに対するIP接続性が必要</p>


<h2>解説</h2>

<p>MPLSで利用するラベルを配布するための代表的なプロトコルがLDP(Label Distribution Protocol)です。LDPによって、ルータ間でラベルを配布してラベルスイッチングできるようにします。LDPでは、<br><br>

<ul>
	<li>TCPポート646</li>
	<li>UDPポート646</li>
	
</ul><br>
を利用します。</p>

<p>UDPによって、LDPネイバーを発見します。そしてLDPネイバーとの間でTCPコネクションを確立してラベルの配布を行います。ラベルを配布する対象をFEC(Forwarding Equivalent Class)と呼びます。簡単に言えば、同じように転送するパケットの集まりです。同じように転送するパケットには、同じラベルを割り当ててラベルスイッチングを行います。このFECの代表的な例は、ルーティングテーブルのルート情報です。LDPでもOSPFのようにルータIDを決定します。ルータIDの決定方法は、次のようになります。</p>

<ul>
	<li>Loopbackインタフェースの最大IPアドレス</li>
	<li>アクティブなインタフェースの最大IPアドレス</li>
	
</ul>
<p>LDPのルータIDは、単純にルータの識別だけに使うのではなく、TCPコネクションを確立する際のアドレスとして使います。そのため、LDPネイバーを正常に確立するためには、ルータIDのIPアドレスに対しての接続性がなければいけません。今回の構成において、各ルータのLDPルータIDは次のようになっています。</p>

<pre>
R1:192.168.0.1(Loopback0)
R2:200.200.200.200(Loopback200)
R3:192.168.0.3(Loopback0)</pre>


<p>R2のOSPFの設定では、Loopback200をアドバタイズしていません。そのため、R1とR3からは200.200.200.200に対する接続性がありません。これがR2との間で、LDPネイバーを確立できない理由です。</p>

<p>R1のルーティングテーブルは次のようになっています。</p>

<pre>R1 show ip route
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#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

C    192.168.12.0/24 is directly connected, Serial1/0
O    192.168.23.0/24 [110/128] via 192.168.12.2, 00:14:38, Serial1/0
     192.168.0.0/32 is subnetted, 3 subnets
C       192.168.0.1 is directly connected, Loopback0
O       192.168.0.2 [110/65] via 192.168.12.2, 00:14:38, Serial1/0
O       192.168.0.3 [110/129] via 192.168.12.2, 00:14:38, Serial1/0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<p>また、R1でLDPの情報を確認するためにshow mpls ldp discoveryを見ると、次のようになっています。</p>

<pre>R1 show mpls ldp discovery
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#sh mpls ldp discovery
 Local LDP Identifier:
    192.168.0.1:0
    Discovery Sources:
    Interfaces:
        Serial1/0 (ldp): xmit/recv
            LDP Id: 200.200.200.200:0; no route
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<p>R1ではSerial1/0上にルータID 200.200.200.200を認識しているのですが、「no route」なのでLDPネイバーを正常に確立することができません。</p>


<p>トラブルの原因が分かったところで、解決方法を考えましょう。R2との間でLDPネイバーを正常に確立するためには、<br><br>

<ul>
	<li>Loopback200をOSPFでアドバタイズする</li>
	<li>LDPルータIDをLoopback0のIPアドレスに変更する</li>
	
</ul><br>
のどちらかで解決できます。</p>

<p>Loopback200をOSPFでアドバタイズする設定は次の通りです。</p>


<pre>R2 Loopback200をOSPFでアドバタイズ
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
router ospf 1
 network 200.200.200.200 0.0.0.0 area 0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<p>R2 LoopbackをOSPFでアドバタイズした場合、R2でshow mpls ldp neighborは次のような表示になります。</p>


<pre>R2 show mpls ldp neighbor
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R2#sh mpls ldp neighbor
    Peer LDP Ident: 192.168.0.1:0; Local LDP Ident 200.200.200.200:0
        TCP connection: 192.168.0.1.646 - 200.200.200.200.24393
        State: Oper; Msgs sent/rcvd: 9/9; Downstream
        Up time: 00:00:11
        LDP discovery sources:
          Serial1/0, Src IP addr: 192.168.12.1
        Addresses bound to peer LDP Ident:
          192.168.12.1    192.168.0.1
    Peer LDP Ident: 192.168.0.3:0; Local LDP Ident 200.200.200.200:0
        TCP connection: 192.168.0.3.646 - 200.200.200.200.32858
        State: Oper; Msgs sent/rcvd: 9/9; Downstream
        Up time: 00:00:11
        LDP discovery sources:
          Serial1/1, Src IP addr: 192.168.23.3
        Addresses bound to peer LDP Ident:
          192.168.23.3    192.168.0.3
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>



<p>また、LDPルータIDをLoopback0のIPアドレスに変更するには次のように設定します。</p>


<pre>R2 LDPルータIDをLoopback0に変更
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
mpls ldp router-id loopback0 force
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<p>R2でルータIDを変更した場合のshow mpls ldp neighborは次のようになります。</p>


<pre>R2 show mpls ldp neighbor
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R2#show mpls ldp neighbor
    Peer LDP Ident: 192.168.0.3:0; Local LDP Ident 192.168.0.2:0
        TCP connection: 192.168.0.3.27096 - 192.168.0.2.646
        State: Oper; Msgs sent/rcvd: 9/9; Downstream
        Up time: 00:00:11
        LDP discovery sources:
          Serial1/1, Src IP addr: 192.168.23.3
        Addresses bound to peer LDP Ident:
          192.168.23.3    192.168.0.3
    Peer LDP Ident: 192.168.0.1:0; Local LDP Ident 192.168.0.2:0
        TCP connection: 192.168.0.1.646 - 192.168.0.2.12446
        State: Oper; Msgs sent/rcvd: 9/9; Downstream
        Up time: 00:00:11
        LDP discovery sources:
          Serial1/0, Src IP addr: 192.168.12.1
        Addresses bound to peer LDP Ident:
          192.168.12.1    192.168.0.1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>



<p>※詳細は割愛しますが、R2で次のように設定してもLDPネイバーを確立することができます。TCPコネクションを確立するIPアドレスとして、インタフェースのIPアドレスを利用するという設定です。</p>

<pre>R2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
interface serial 1/0
 mpls ldp discovery transport-address interface
!
interface serial 1/1
 mpls ldp discovery transport-address interface
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

]]></description>
            <link>http://www.n-study.com/network/2010/03/mpls_ccie_1.html</link>
            <guid>http://www.n-study.com/network/2010/03/mpls_ccie_1.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">IPルーティング</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">シスコ</category>
            
            
            <pubDate>Wed, 03 Mar 2010 13:11:45 +0900</pubDate>
        </item>
        
        <item>
            <title>MPLSのトラブル 【CCIEレベル】</title>
            <description><![CDATA[<h2>ネットワーク構成</h2>

<p>下記のネットワーク構成でMPLSによるラベルスイッチングができるようにします。</p>


<p><span class="mt-enclosure mt-enclosure-image"
style="display: inline;"><a
href="http://www.n-study.com/network/image/mpls01.html"
onclick="window.open('http://www.n-study.com/network/image/mpls01.html','pop
up','width=538,height=208,scrollbars=no,resizable=no,toolbar=no,directories=
no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img
src="http://www.n-study.com/network/image/mpls01-thumb-400x154.jpg"
width="400" height="154" alt="mpls01.jpg" class="mt-image-none" style=""
/></a></span><br>
～図 MPLS ネットワーク構成～</p>


<h2>設定概要</h2>

<p>R1～R3でMPLSに関連する設定の抜粋は次の通りです。</p>

<pre>R1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
interface Loopback0
 ip address 192.168.0.1 255.255.255.255
!
interface Serial1/0
 ip address 192.168.12.1 255.255.255.0
 encapsulation ppp
 mpls ip
 no peer neighbor-route
!
router ospf 1
 router-id 192.168.0.1
 log-adjacency-changes
 network 192.168.0.1 0.0.0.0 area 0
 network 192.168.12.1 0.0.0.0 area 0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
interface Loopback0
 ip address 192.168.0.2 255.255.255.255
!
interface Loopback200
 ip address 200.200.200.200 255.255.255.255
!
interface Serial1/0
 ip address 192.168.12.2 255.255.255.0
 encapsulation ppp
 mpls ip
 no peer neighbor-route
!
interface Serial1/1
 ip address 192.168.23.2 255.255.255.0
 encapsulation ppp
 mpls ip
 no peer neighbor-route
!
router ospf 1
 router-id 192.168.0.2
 log-adjacency-changes
 network 192.168.0.2 0.0.0.0 area 0
 network 192.168.12.2 0.0.0.0 area 0
 network 192.168.23.2 0.0.0.0 area 0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
interface Loopback0
 ip address 192.168.0.3 255.255.255.255
!
interface Serial1/0
 ip address 192.168.23.3 255.255.255.0
 encapsulation ppp
 mpls ip
 no peer neighbor-route
!
router ospf 1
 router-id 192.168.0.3
 log-adjacency-changes
 network 192.168.0.3 0.0.0.0 area 0
 network 192.168.23.3 0.0.0.0 area 0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<h2>トラブルの症状</H2>

<P>次のように各ルータのインタフェースでMPLSを有効化しています。</P>

<pre>R1 show mpls interface
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#show mpls interfaces
Interface              IP            Tunnel   Operational
Serial1/0              Yes (ldp)     No       Yes
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R2 show mpls interface
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R2#show mpls interfaces
Interface              IP            Tunnel   Operational
Serial1/0              Yes (ldp)     No       Yes
Serial1/1              Yes (ldp)     No       Yes
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R3 show mpls interface
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R3#show mpls interfaces
Interface              IP            Tunnel   Operational
Serial1/0              Yes (ldp)     No       Yes
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<p>ところが、R2との間でLDPネイバーを確立することができていません。R2でshow mpls ldp neighborを見ると、次のようになります。</p>

<pre>R2 show mpls ldp neighbor
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R2#show mpls ldp neighbor

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<p>R2との間でLDPネイバーを確立できないので、ラベル配布ができていません。通信はできるもののラベルスイッチングではなく、通常のIPルーティングになってしまっています。</p>

<h2>問題</h2>

<ul>
	<li>R2との間でLDPネイバーを確立できない原因は何ですか？</li>
	<li>R2との間でLDPネイバーを確立するためにどのように設定を行えばよいですか?</li>
</ul>]]></description>
            <link>http://www.n-study.com/network/2010/02/mpls_ccie.html</link>
            <guid>http://www.n-study.com/network/2010/02/mpls_ccie.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">IPルーティング</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">シスコ</category>
            
            
            <pubDate>Fri, 12 Feb 2010 14:35:14 +0900</pubDate>
        </item>
        
        <item>
            <title>IPSecのトラブル その3 解答と解説 【CCNPレベル】</title>
            <description><![CDATA[<h2>解答</h2>

<pre>R1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
access-list 100 permit ip 192.168.3.0 0.0.0.255 192.168.2.0 0.0.0.255
access-list 101 permit ip 192.168.2.0 0.0.0.255 192.168.3.0 0.0.0.255
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<h2>ワンポイント</h2>

<p>ハブ＆スポークでIPSec VPNを構築するときはハブルータでの暗号ACLに要注意</p>


<h2>解説</h2>

<p>ハブ＆スポーク構成でIPSec VPNを構築するときには暗号ACLの設定に注意が必要です。特にハブとなるルータでの暗号ACLに注意が必要です。ネットワーク構成を再度確認しておきましょう。</p>


<p>
<span class="mt-enclosure mt-enclosure-image"
style="display: inline;"><a
href="http://www.n-study.com/network/image/IPSec04.html"
onclick="window.open('http://www.n-study.com/network/image/IPSec04.html','po
pup','width=817,height=306,scrollbars=no,resizable=no,toolbar=no,directories
=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img
src="http://www.n-study.com/network/image/IPSec04-thumb-400x149.jpg"
width="400" height="149" alt="IPSec04.jpg" class="mt-image-none" style=""
/></a></span><br>
図 IPSec-VPN ネットワーク構成</p>


<p>このネットワーク構成において、本社のR1を中心としてハブ＆スポークでIPSec VPNを構築します。つまり、SAはR1-R2間、R1-R3間で確立します。それぞれのSAで転送するIPパケットをまとめると、次のようになります。</p>


<p>R1-R2間のSA<br>
192.168.1.0/24 ←→ 192.168.2.0/24  (本社LANと支社1LAN間)<br>
192.168.3.0/24  →  192.168.2.0/24  (支社2LANから支社1LAN)</p>

<p>R1-R3間のSA<br>
192.168.1.0/24 ←→ 192.168.3.0/24  (本社LANと支社2LAN間)<br>
192.168.2.0/24  →  192.168.3.0/24  (支社1LANから支社2LAN)</p>


<p>ここで、要注意なのが支社1と支社2間の通信です。たとえば、支社1から支社2への通信を考えます。支社1から支社2へのIPパケットのIPアドレス情報は、次のようになります。</p>

<p>送信先IPアドレス:192.168.3.3<br>
送信元IPアドレス:192.168.2.2</p>

<p>このIPパケットがIPSecで暗号化されR1-R2間のSAを通じて、R1へ転送されます。R1は、いったん受信したパケットを復号します。そして、再度IPSecで暗号化してR1-R3間のSAを通じてR3へ転送します。</p>


<p><span class="mt-enclosure mt-enclosure-image"
style="display: inline;"><a
href="http://www.n-study.com/network/image/IPSec05.html"
onclick="window.open('http://www.n-study.com/network/image/IPSec05.html','po
pup','width=817,height=290,scrollbars=no,resizable=no,toolbar=no,directories
=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img
src="http://www.n-study.com/network/image/IPSec05-thumb-400x141.jpg"
width="400" height="141" alt="IPSec05.jpg" class="mt-image-none" style=""
/></a></span><br>
図 支社1から支社2への通信</p>


<p>このような通信フローを踏まえて、暗号ACLの設定をしなければいけません。R2とR3では暗号ACLの設定は問題ありません。しかし、R1で上記の通信フローを考慮した暗号ACLの設定になっていません。R1の暗号ACLは次のようになっています。</p>


<pre>R1 show access-list
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#show access-lists
Extended IP access list 100
    10 permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255
Extended IP access list 101
    10 permit ip 192.168.1.0 0.0.0.255 192.168.3.0 0.0.0.255
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<p>R1の暗号ACLはACL100とACL101です。ACL100はR1-R2間のSAに通すIPパケットを指定し、ACL101はR1-R3間のSAに通すIPパケットを指定しています。それぞれ本社から支社あてのIPパケットが一致するように条件が設定されています。ですが、支社間の通信を指定する条件はありません。これが支社間で通信できない原因です。<br>
支社間の通信をR1を経由して行うためには、R1-R2間のSAに通すIPパケットを指定するACL100に送信元IPアドレスが支社2LAN、送信先IPアドレスが支社1LANの条件を追加します。同様に、R1-R3間のSAに通すIPパケットを指定するACL101に送信元IPアドレスが支社1LAN、送信元IPアドレスが支社2LANの条件を追加します。</p>


<pre>R1 暗号ACLの追加
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
access-list 100 permit ip 192.168.3.0 0.0.0.255 192.168.2.0 0.0.0.255
access-list 101 permit ip 192.168.2.0 0.0.0.255 192.168.3.0 0.0.0.255
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<p>R1で暗号ACLの条件を追加した後、支社1から支社2への通信を行います。すると、正常に通信できるようになります。</p>


<pre>R2 R3へPing
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R2#ping 192.168.3.3 source 192.168.2.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.3, timeout is 2 seconds:
Packet sent with a source address of 192.168.2.2
..!!!
Success rate is 60 percent (3/5), round-trip min/avg/max = 76/100/140 ms
R2#ping 192.168.3.3 source 192.168.2.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.3, timeout is 2 seconds:
Packet sent with a source address of 192.168.2.2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/72/124 ms
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<p>※最初のPingの2回分のタイムアウトは、IPSec SAを確立するために時間がかかっているためです。</p>

]]></description>
            <link>http://www.n-study.com/network/2010/02/ipsec_3_ccnp_1.html</link>
            <guid>http://www.n-study.com/network/2010/02/ipsec_3_ccnp_1.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">シスコ</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">ネットワークセキュリティ</category>
            
            
            <pubDate>Fri, 12 Feb 2010 14:14:44 +0900</pubDate>
        </item>
        
        <item>
            <title>IPSecのトラブル その3 【CCNPレベル】</title>
            <description><![CDATA[<h2>ネットワーク構成</h2>

<p>次のネットワーク構成で、IPSec-VPNにより拠点間の通信を行いたいと考えています。</p>

<p><span class="mt-enclosure mt-enclosure-image"
style="display: inline;"><a
href="http://www.n-study.com/network/image/IPSec04.html"
onclick="window.open('http://www.n-study.com/network/image/IPSec04.html','po
pup','width=817,height=306,scrollbars=no,resizable=no,toolbar=no,directories
=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img
src="http://www.n-study.com/network/image/IPSec04-thumb-400x149.jpg"
width="400" height="149" alt="IPSec04.jpg" class="mt-image-none" style=""
/></a></span>
<br>図 IPSec-VPN ネットワーク構成</p>

<p>R1の拠点内(本社)には192.168.1.0/24のネットワークがあります。また、R2の拠点内(支社1)には192.168.2.0/24、R3の拠点内(支社2)には192.168.3.0/24のネットワークがあります。R1、R2、R3をVPNゲートウェイとして拠点間の通信のパケットをIPSecで暗号化します。拠点間の通信は、本社を中心としたハブ＆スポーク構成で行います。つまり、支社間の通信はいったん本社を経由して行うことにしています。</p>

<p>また、インターネットへ接続するためにR1、R2、R3でNATによって拠点内のプライベートアドレスをISPに接続しているグローバルアドレスに変換できるようにしています。なお、インターネットへ通信確認は150.1.1.100のIPアドレスで行うものとします。</p>


<h2>設定概要</h2>

<p>下記の設定は、R1、R2、R3で現在行っている設定の抜粋です。</p>

<pre>R1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
crypto isakmp policy 1
 encr 3des
 hash md5
 authentication pre-share
 group 2
crypto isakmp key cisco address 100.2.2.2
crypto isakmp key cisco address 100.3.3.3
crypto isakmp keepalive 30 periodic
!
crypto ipsec transform-set myset esp-3des esp-sha-hmac
!
crypto map IPSEC 10 ipsec-isakmp
 set peer 100.2.2.2
 set transform-set myset
 match address 100
crypto map IPSEC 20 ipsec-isakmp
 set peer 100.3.3.3
 set transform-set myset
 match address 101
!
interface Loopback0
 ip address 192.168.1.1 255.255.255.0
 ip nat inside
!
interface FastEthernet0/0.101
 encapsulation dot1Q 101
 ip address 100.1.1.1 255.255.255.0
 ip nat outside
 crypto map IPSEC
!
ip route 0.0.0.0 0.0.0.0 100.1.1.100
!
ip nat inside source route-map NO_NAT interface FastEthernet0/0.101 overload
!
access-list 100 permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255
access-list 101 permit ip 192.168.1.0 0.0.0.255 192.168.3.0 0.0.0.255
!
route-map NO_NAT deny 10
 match ip address 100 101
!
route-map NO_NAT permit 100
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
crypto isakmp policy 1
 encr 3des
 hash md5
 authentication pre-share
 group 2
crypto isakmp key cisco address 100.1.1.1
crypto isakmp keepalive 30 periodic
!
crypto ipsec transform-set myset esp-3des esp-sha-hmac
!
crypto map IPSEC 10 ipsec-isakmp
 set peer 100.1.1.1
 set transform-set myset
 match address 100
!
interface Loopback0
 ip address 192.168.2.2 255.255.255.0
 ip nat inside
!
interface FastEthernet0/0.102
 encapsulation dot1Q 102
 ip address 100.2.2.2 255.255.255.0
 ip nat outside
 crypto map IPSEC
!
ip route 0.0.0.0 0.0.0.0 100.2.2.100
!
ip nat inside source route-map NO_NAT interface FastEthernet0/0.102 overload
!
access-list 100 permit ip 192.168.2.0 0.0.0.255 192.168.1.0 0.0.0.255
access-list 100 permit ip 192.168.2.0 0.0.0.255 192.168.3.0 0.0.0.255
!
route-map NO_NAT deny 10
 match ip address 100
!
route-map NO_NAT permit 100
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R3
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
crypto isakmp policy 1
 encr 3des
 hash md5
 authentication pre-share
 group 2
crypto isakmp key cisco address 100.1.1.1
crypto isakmp keepalive 30 periodic
!
crypto ipsec transform-set myset esp-3des esp-sha-hmac
!
crypto map IPSEC 10 ipsec-isakmp
 set peer 100.1.1.1
 set transform-set myset
 match address 100
!
interface Loopback0
 ip address 192.168.3.3 255.255.255.0
 ip nat inside
!
interface FastEthernet0/0.103
 encapsulation dot1Q 103
 ip address 100.3.3.3 255.255.255.0
 ip nat outside
 crypto map IPSEC
!
ip route 0.0.0.0 0.0.0.0 100.3.3.100
!
ip nat inside source route-map NO_NAT interface FastEthernet0/0.103 overload
!
access-list 100 permit ip 192.168.3.0 0.0.0.255 192.168.1.0 0.0.0.255
access-list 100 permit ip 192.168.3.0 0.0.0.255 192.168.2.0 0.0.0.255
!
route-map NO_NAT deny 10
 match ip address 100
!
route-map NO_NAT permit 100
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<h2>トラブルの症状</h2>

<p>本社と支社間の通信は正常に行うことができますが、支社間の通信ができません。</p>

<p>たとえば、R1からR2およびR3へのPingは下記のように成功します。</p>

<pre>R1 R2およびR3への通信確認
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#ping 192.168.2.2 source 192.168.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:
Packet sent with a source address of 192.168.1.1
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 56/72/100 ms
R1#ping 192.168.3.3 source 192.168.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.3, timeout is 2 seconds:
Packet sent with a source address of 192.168.1.1
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 8/52/80 ms
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<p>ところが、R2からR3へPingを行うと失敗します。</p>

<pre>R2 R3への通信確認
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R2#ping 192.168.3.3 source 192.168.2.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.3, timeout is 2 seconds:
Packet sent with a source address of 192.168.2.2
.....
Success rate is 0 percent (0/5)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<h2>問題</h2>
<p><ul>
	<li>本社と支社間の通信ができるのにもかかわらず、支社間の通信ができない原因は何ですか？</li>
	<li>支社間の通信ができるようにするためには、どのように設定を修正すればよいですか？支社間の通信はフルメッシュではなく、ハブ＆スポークで行うものとします。</li>
</ul></p>]]></description>
            <link>http://www.n-study.com/network/2010/01/ipsec_3_ccnp.html</link>
            <guid>http://www.n-study.com/network/2010/01/ipsec_3_ccnp.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">シスコ</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">ネットワークセキュリティ</category>
            
            
            <pubDate>Fri, 29 Jan 2010 13:08:22 +0900</pubDate>
        </item>
        
        <item>
            <title>IPSecのトラブル その2 解答と解説 【CCNPレベル】</title>
            <description><![CDATA[<h2>解答</h2>

<pre>R1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
no access-list 100
access-list 100 permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<h2>ワンポイント</h2>

<p>IPSecで暗号化する対象パケットを指定するアクセスリストは、ミラーACLになることに注意！</p>


<h2>解説</h2>

<p>IPSecで暗号化する対象パケットは、拡張アクセスリストで指定します。このアクセスリストを特に暗号ACLと呼びます。暗号ACLは、対向のVPNゲートウェイ同士で送信元アドレスと送信先アドレスが反転したアクセスリストになります。</p>

<p>具体的に今回のネットワーク構成で考えてみましょう。</p>

<p><span class="mt-enclosure mt-enclosure-image"
style="display: inline;"><a
href="http://www.n-study.com/network/image/IPSec01.html"
onclick="window.open('http://www.n-study.com/network/image/IPSec01.html','po
pup','width=817,height=148,scrollbars=no,resizable=no,toolbar=no,directories
=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img
src="http://www.n-study.com/network/image/IPSec01-thumb-400x72.jpg"
width="400" height="72" alt="IPSec01.jpg" class="mt-image-none" style=""
/></a></span><br>
図 IPSec-VPNネットワーク構成</p>

<p>R1から見るとIPSecで暗号化するパケットは、
<br><br>
送信先IPアドレス:192.168.2.0/24<br>
送信元IPアドレス:192.168.1.0/24<br>
<br>
というアドレスです。<br>
一方、R2から見るとIPSecで暗号化するパケットは、
<br><br>
送信先IPアドレス:192.168.1.0/24<br>
送信元IPアドレス:192.168.2.0/24<br><br>

というアドレスです。<br>
これを拡張アクセスで指定します。R1とR2で指定するべき拡張アクセスリストは、次のようになります。</p>

<pre>R1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
access-list 100 permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
access-list 100 permit ip 192.168.2.0 0.0.0.255 192.168.1.0 0.0.0.255
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<p>このように暗号ACLは、対向のVPNゲートウェイで送信先と送信元を入れ替えたものになっていることが分かります。こういった送信先と送信元を入れ替えた関係のアクセスリストを「ミラーACL」と呼びます。</p>

<p>注意しなければいけないことは、正しくIPSec SAを確立するためにはミラーACLになっていなければいけないということです。前回の問題ではR1の暗号ACLとして、<br><br>

<pre>R1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
access-list 100 permit ip 192.168.1.0 0.0.0.255 192.168.0.0 0.0.255.255
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>
<br>
という設定をしていました。</p>

<p>送信先アドレス部分のワイルドカードマスクを変更してより広いIPアドレスの範囲を指定しています。これでも192.168.1.0/24から192.168.2.0/24あてのパケットはIPSecで暗号化する対象パケットとなりますが、R2で設定している暗号ACLとミラーACLになっていません。ISAKMP SAの確立には問題ありませんが、暗号ACLがミラーACLになっていないので、R1-R2間でIPSec SAを正常に確立することができなくなっています。</p>

<p>解答のようにR1とR2の暗号ACLをミラーACLになるように設定を行えば、IPSec SAを正常に確立して拠点間の通信ができるようになります。</p>

]]></description>
            <link>http://www.n-study.com/network/2010/01/ipsec_2_ccnp_1.html</link>
            <guid>http://www.n-study.com/network/2010/01/ipsec_2_ccnp_1.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">シスコ</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">ネットワークセキュリティ</category>
            
            
            <pubDate>Wed, 20 Jan 2010 13:14:32 +0900</pubDate>
        </item>
        
        <item>
            <title>IPSecのトラブル その2 【CCNPレベル】</title>
            <description><![CDATA[<h2>ネットワーク構成</h2>

<p>次のネットワーク構成で、IPSec-VPNにより拠点間の通信を行いたいと考えています。</p>


<p><span class="mt-enclosure mt-enclosure-image"
style="display: inline;"><a
href="http://www.n-study.com/network/image/IPSec01.html"
onclick="window.open('http://www.n-study.com/network/image/IPSec01.html','po
pup','width=817,height=148,scrollbars=no,resizable=no,toolbar=no,directories
=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img
src="http://www.n-study.com/network/image/IPSec01-thumb-400x72.jpg"
width="400" height="72" alt="IPSec01.jpg" class="mt-image-none" style=""
/></a></span><br>
図 IPSec-VPNネットワーク構成</p>


<p>R1の拠点内には192.168.1.0/24のネットワークがあります。また、R2の拠点内には192.168.2.0/24のネットワークがあります。R1、R2をVPNゲートウェイとして拠点間の通信のパケットをIPSecで暗号化します。また、インターネットへ接続するためにR1、R2でNATによって拠点内のプライベートアドレスをISPに接続しているグローバルアドレスに変換できるようにしています。なお、インターネットへ通信確認は150.1.1.100のIPアドレスで行うものとします。</P>


<h2>設定概要</h2>

<p>R1、R2で下記の設定を行っています。</p>


<pre>R1 設定抜粋
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
crypto isakmp policy 1
 encr 3des
 hash md5
 authentication pre-share
 group 2
crypto isakmp key cisco address 100.2.2.2
crypto isakmp keepalive 30 periodic
!
crypto ipsec transform-set myset esp-3des esp-sha-hmac
!
crypto map IPSEC 10 ipsec-isakmp
 set peer 100.2.2.2
 set transform-set myset
 match address 100
!
interface Loopback0
 ip address 192.168.1.1 255.255.255.0
 ip nat inside
!
interface FastEthernet0/0.101
 encapsulation dot1Q 101
 ip address 100.1.1.1 255.255.255.0
 ip nat outside
 crypto map IPSEC
!
ip route 0.0.0.0 0.0.0.0 100.1.1.100
!
ip nat inside source route-map NO_NAT interface FastEthernet0/0.101 overload
!
access-list 100 permit ip 192.168.1.0 0.0.0.255 192.168.0.0 0.0.255.255
!
route-map NO_NAT deny 10
 match ip address 100
!
route-map NO_NAT permit 100
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R2 設定抜粋
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
crypto isakmp policy 1
 encr 3des
 hash md5
 authentication pre-share
 group 2
crypto isakmp key cisco address 100.1.1.1
crypto isakmp keepalive 30 periodic
!
crypto ipsec transform-set myset esp-3des esp-sha-hmac
!
crypto map IPSEC 10 ipsec-isakmp
 set peer 100.1.1.1
 set transform-set myset
 match address 100
!
interface Loopback0
 ip address 192.168.2.2 255.255.255.0
 ip nat inside
!
interface FastEthernet0/0.102
 encapsulation dot1Q 102
 ip address 100.2.2.2 255.255.255.0
 ip nat outside
 crypto map IPSEC
!
ip route 0.0.0.0 0.0.0.0 100.2.2.100
!
ip nat inside source route-map NO_NAT interface FastEthernet0/0.102 overload
!
access-list 100 permit ip 192.168.2.0 0.0.0.255 192.168.1.0 0.0.0.255
!
route-map NO_NAT deny 10
 match ip address 100
!
route-map NO_NAT permit 100
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<h2>トラブルの症状</h2>

<p>R1やR2からはインターネットへの接続は問題なく行うことができます。R1からインターネット(150.1.1.100)へPingすると次のように成功します。</p>

<pre>R1 インターネット(150.1.1.100)への通信
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#ping 150.1.1.100

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 150.1.1.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/23/56 ms
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<p>ところが、R1とR2の拠点間のIPSecの通信ができません。</p>

<pre>R1 拠点間の通信
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#ping 192.168.2.2 source 192.168.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:
Packet sent with a source address of 192.168.1.1
.....
Success rate is 0 percent (0/5)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<p>IPSec SAを確認すると、R1とR2間でIPSec SAが確立できていないようです。</p>

<pre>R1 show crypto ipsec sa
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#show crypto ipsec sa

interface: FastEthernet0/0.101
    Crypto map tag: IPSEC, local addr 100.1.1.1

   protected vrf: (none)
   local  ident (addr/mask/prot/port): (192.168.1.0/255.255.255.0/0/0)
   remote ident (addr/mask/prot/port): (192.168.0.0/255.255.0.0/0/0)
   current_peer 100.2.2.2 port 500
     PERMIT, flags={origin_is_acl,}
    #pkts encaps: 0, #pkts encrypt: 0, #pkts digest: 0
    #pkts decaps: 0, #pkts decrypt: 0, #pkts verify: 0
    #pkts compressed: 0, #pkts decompressed: 0
    #pkts not compressed: 0, #pkts compr. failed: 0
    #pkts not decompressed: 0, #pkts decompress failed: 0
    #send errors 10, #recv errors 0

     local crypto endpt.: 100.1.1.1, remote crypto endpt.: 100.2.2.2
     path mtu 1500, ip mtu 1500, ip mtu idb FastEthernet0/0.101
     current outbound spi: 0x0(0)

     inbound esp sas:

     inbound ah sas:

     inbound pcp sas:

     outbound esp sas:

     outbound ah sas:

     outbound pcp sas:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<p>IPSec SAは確立できていないのですが、ISAKAMP SAは確立できています。</p>

<pre>R1 show crypto isakmp sa
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#show crypto isakmp sa
dst             src             state          conn-id slot status
100.2.2.2       100.1.1.1       QM_IDLE              3    0 ACTIVE

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<h2>問題</h2>

<ul>
	<li>拠点間の通信ができない原因はなんですか？</li>
	<li>これを解決するためには、R1でどのように設定を変更すればよいですか？</li>
</ul>

]]></description>
            <link>http://www.n-study.com/network/2010/01/ipsec_2_ccnp.html</link>
            <guid>http://www.n-study.com/network/2010/01/ipsec_2_ccnp.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">シスコ</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">ネットワークセキュリティ</category>
            
            
            <pubDate>Wed, 20 Jan 2010 13:01:45 +0900</pubDate>
        </item>
        
        <item>
            <title>IPSecのトラブル 解答と解説 【CCNPレベル】</title>
            <description><![CDATA[<h2>解答</h2>

<pre>R1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
no ip nat inside source list 1 interface FastEthernet0/0.101 overload
ip nat inside source route-map NO_NAT interface FastEthernet0/0.101 overload
!
access-list 100 permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255
!
route-map NO_NAT deny 10
 match ip address 100
!
route-map NO_NAT permit 100
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
no ip nat inside source list 1 interface FastEthernet0/0.102 overload
ip nat inside source route-map NO_NAT interface FastEthernet0/0.102 overload
!
access-list 100 permit ip 192.168.2.0 0.0.0.255 192.168.1.0 0.0.0.255
!
route-map NO_NAT deny 10
 match ip address 100
!
route-map NO_NAT permit 100
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<h2>解説</h2>

<p>IPSec VPNの設定を行うときには、NATとの関連も注意する必要があります。拠点内のホストは基本的に、プライベートアドレスでアドレッシングされています。そのため、インターネットへ通信するときには、NATでプライベートアドレスとグローバルアドレスの変換が必要です。</p>

<p>IPSec VPNで拠点間の通信を行うパケット、つまりIPSecで暗号化するパケットに対しては、NATの変換をしてはいけません。</p>


<p><span class="mt-enclosure mt-enclosure-image"
style="display: inline;"><a
href="http://www.n-study.com/network/image/IPSec02.html"
onclick="window.open('http://www.n-study.com/network/image/IPSec02.html','po
pup','width=417,height=197,scrollbars=no,resizable=no,toolbar=no,directories
=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img
src="http://www.n-study.com/network/image/IPSec02-thumb-400x188.jpg"
width="400" height="188" alt="IPSec02.jpg" class="mt-image-none" style=""
/></a></span><br>
図 IPSec VPNとNAT</p>

<p>もし、IPSecで暗号化するパケットをNAT変換すると、次のような問題点が出てきます。</p>


<ul>
	<li>ルーティングできない</li>
	<li>IPSecで暗号化するべきパケットが暗号化されなくなる</li>
</ul>

<p>拠点内はプライベートアドレスでアドレッシングされています。拠点間の通信なのにNATでグローバルアドレス変換をしてしまうと、ルーティングがうまくできなくなる可能性があります。<br>
また、IPSecで暗号化する対象のパケットをcrypto map内のアクセスリストで指定します。拠点間の通信なのにNATでアドレス変換してしまうと、crypto mapのアクセスリストに一致しなくなります。つまり、IPSecで暗号化するべきパケットなのに暗号化されずにそのままインターネットへ転送されることになります。</p>


<p>今回のトラブルについては、たとえ拠点間の通信のパケットをNAT変換してしまってもルーティングは大丈夫です。R1、R2ではデフォルトルートがあるからです。ですが、crypto map内のアクセスリストに一致しなくなり、暗号化せずにインターネットへ転送されてしまいます。拠点間の通信のパケットは、送信先IPアドレスとしてプライベートアドレスが指定されています。これをそのままインターネットに転送しても、当然、ISPでルーティングしません。</p>

<p>解決するためには、NATの設定を変更します。<br>
R1、R2のNATの設定を振り返ります。すると、送信元IPアドレスがそれぞれの拠点内のアドレスになっているパケットをすべてアドレス変換の対象としています。</p>


<pre>R1 NAT設定抜粋
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ip nat inside source list 1 interface FastEthernet0/0.101 overload
!
access-list 1 permit 192.168.1.0 0.0.0.255
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<p>この設定を変更して、拠点間の通信はNATによるアドレス変換の対象から除外します。このために、新しく拡張アクセスリストを作ってもいいのですが、crypto map内でIPSec化対象パケットを指定する拡張アクセスリストがすでにあります。これを流用してルートマップを使って次のように設定できます。</p>


<pre>R1 NAT設定の変更
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
no ip nat inside source list 1 interface FastEthernet0/0.101 overload
ip nat inside source route-map NO_NAT interface FastEthernet0/0.101 overload
!
access-list 100 permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255
!
route-map NO_NAT deny 10
 match ip address 100
!
route-map NO_NAT permit 100
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<p>アクセスリスト100は、crypto mapで適用しているIPSec化対象パケットを指定する拡張アクセスリストです。IPSecで暗号化するパケットはNATの変換対象からはずすために、ルートマップ「NO_NAT」を作っています。NO_NATのシーケンス10のmatch条件でアクセスリスト100を関連づけて、これをdeny、つまりNATの変換対象からはずすようにしています。そして、シーケンス100ではそれ以外のすべてのパケットをNATの変換対象にしています。このルートマップ「NO_NAT」をip nat inside sourceコマンドで適用しています。R2でも、R1と同様に拠点間の通信、つまりIPSecで暗号化する対象パケットをNAT変換の対象からはずす設定を行います。</p>


<p><span class="mt-enclosure mt-enclosure-image"
style="display: inline;"><a
href="http://www.n-study.com/network/image/IPSec03.html"
onclick="window.open('http://www.n-study.com/network/image/IPSec03.html','po
pup','width=582,height=352,scrollbars=no,resizable=no,toolbar=no,directories
=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img
src="http://www.n-study.com/network/image/IPSec03-thumb-400x241.jpg"
width="400" height="241" alt="IPSec03.jpg" class="mt-image-none" style=""
/></a></span><br>
図 R1でのNAT設定変更のまとめ</p>


<p>このようにNATの設定を変更すると、インターネットへの通信も拠点間の通信もすべて問題なく行うことができます。</p>

<pre>R1 インターネット、拠点間の通信の確認とIPSec SA
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#ping 150.1.1.100

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 150.1.1.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/25/64 ms
R1#ping 192.168.2.2 source 192.168.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:
Packet sent with a source address of 192.168.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/28/72 ms
R1#show crypto ipsec sa

interface: FastEthernet0/0.101
    Crypto map tag: IPSEC, local addr 100.1.1.1

   protected vrf: (none)
   local  ident (addr/mask/prot/port): (192.168.1.0/255.255.255.0/0/0)
   remote ident (addr/mask/prot/port): (192.168.2.0/255.255.255.0/0/0)
   current_peer 100.2.2.2 port 500
     PERMIT, flags={origin_is_acl,}
    #pkts encaps: 10, #pkts encrypt: 10, #pkts digest: 10
    #pkts decaps: 10, #pkts decrypt: 10, #pkts verify: 10
    #pkts compressed: 0, #pkts decompressed: 0
    #pkts not compressed: 0, #pkts compr. failed: 0
    #pkts not decompressed: 0, #pkts decompress failed: 0
    #send errors 5, #recv errors 0

     local crypto endpt.: 100.1.1.1, remote crypto endpt.: 100.2.2.2
     path mtu 1500, ip mtu 1500, ip mtu idb FastEthernet0/0.101
     current outbound spi: 0x86F25C31(2264030257)

     inbound esp sas:
      spi: 0xAE57D550(2924991824)
        transform: esp-3des esp-sha-hmac ,
        in use settings ={Tunnel, }
        conn id: 2001, flow_id: SW:1, crypto map: IPSEC
        sa timing: remaining key lifetime (k/sec): (4553498/3580)
        IV size: 8 bytes
        replay detection support: Y
        Status: ACTIVE

     inbound ah sas:

     inbound pcp sas:

     outbound esp sas:
      spi: 0x86F25C31(2264030257)
        transform: esp-3des esp-sha-hmac ,
        in use settings ={Tunnel, }
        conn id: 2002, flow_id: SW:2, crypto map: IPSEC
        sa timing: remaining key lifetime (k/sec): (4553498/3579)
        IV size: 8 bytes
        replay detection support: Y
        Status: ACTIVE

     outbound ah sas:

     outbound pcp sas:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>
]]></description>
            <link>http://www.n-study.com/network/2010/01/ipsec_ccnp_1.html</link>
            <guid>http://www.n-study.com/network/2010/01/ipsec_ccnp_1.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">シスコ</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">ネットワークセキュリティ</category>
            
            
            <pubDate>Fri, 08 Jan 2010 11:10:59 +0900</pubDate>
        </item>
        
        <item>
            <title>IPSecのトラブル 【CCNPレベル】</title>
            <description><![CDATA[<h2>ネットワーク構成</h2>

<p>次のネットワーク構成で、IPSec-VPNにより拠点間の通信を行いたいと考えています。</p>


<p><span class="mt-enclosure mt-enclosure-image"
style="display: inline;"><a
href="http://www.n-study.com/network/image/IPSec01.html"
onclick="window.open('http://www.n-study.com/network/image/IPSec01.html','po
pup','width=817,height=148,scrollbars=no,resizable=no,toolbar=no,directories
=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img
src="http://www.n-study.com/network/image/IPSec01-thumb-400x72.jpg"
width="400" height="72" alt="IPSec01.jpg" class="mt-image-none" style=""
/></a></span><br>
図 IPSec-VPNネットワーク構成</p>


<p>R1の拠点内には192.168.1.0/24のネットワークがあります。また、R2の拠点内には192.168.2.0/24のネットワークがあります。R1、R2をVPNゲートウェイとして拠点間の通信のパケットをIPSecで暗号化します。また、インターネットへ接続するためにR1、R2でNATによって拠点内のプライベートアドレスをISPに接続しているグローバルアドレスに変換できるようにしています。なお、インターネットへ通信確認は150.1.1.100のIPアドレスで行うものとします。</p>


<h2>設定概要</h2>

<p>R1、R2で下記の設定を行っています。</p>


<pre>R1 
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
crypto isakmp policy 1
 encr 3des
 hash md5
 authentication pre-share
 group 2
crypto isakmp key cisco address 100.2.2.2
crypto isakmp keepalive 30 periodic
!
crypto ipsec transform-set myset esp-3des esp-sha-hmac
!
crypto map IPSEC 10 ipsec-isakmp
 set peer 100.2.2.2
 set transform-set myset
 match address 100
!
interface Loopback0
 ip address 192.168.1.1 255.255.255.0
 ip nat inside
!
interface FastEthernet0/0.101
 encapsulation dot1Q 101
 ip address 100.1.1.1 255.255.255.0
 ip nat outside
 crypto map IPSEC
!
ip route 0.0.0.0 0.0.0.0 100.1.1.100
!
ip nat inside source list 1 interface FastEthernet0/0.101 overload
!
access-list 1 permit 192.168.1.0 0.0.0.255
access-list 100 permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R2 
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
crypto isakmp policy 1
 encr 3des
 hash md5
 authentication pre-share
 group 2
crypto isakmp key cisco address 100.1.1.1
crypto isakmp keepalive 30 periodic
!
crypto ipsec transform-set myset esp-3des esp-sha-hmac
!
crypto map IPSEC 10 ipsec-isakmp
 set peer 100.1.1.1
 set transform-set myset
 match address 100
!
interface Loopback0
 ip address 192.168.2.2 255.255.255.0
 ip nat inside
!
interface FastEthernet0/0.102
 encapsulation dot1Q 102
 ip address 100.2.2.2 255.255.255.0
 ip nat outside
 crypto map IPSEC
!
ip route 0.0.0.0 0.0.0.0 100.2.2.100
!
ip nat inside source list 1 interface FastEthernet0/0.102 overload
!
access-list 1 permit 192.168.2.0 0.0.0.255
access-list 100 permit ip 192.168.2.0 0.0.0.255 192.168.1.0 0.0.0.255
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<h2>トラブルの症状</h2>

<p>R1やR2からはインターネットへの接続は問題なく行うことができます。R1からインターネット(150.1.1.100)へPingすると次のように成功します。</p>

<pre>R1 インターネット(150.1.1.100)への通信
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#ping 150.1.1.100 source 192.168.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 150.1.1.100, timeout is 2 seconds:
Packet sent with a source address of 192.168.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/23/64 ms
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<p>ところが、R1とR2の拠点間のIPSecの通信ができません。</p>

<pre>R1 拠点間の通信
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#ping 192.168.2.2 source 192.168.1.1

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

<p>IPSec SAを確認すると、R1とR2間でIPSec SAが確立できていないようです。</p>

<pre>R1 show crypto ipsec sa
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#show crypto ipsec sa

interface: FastEthernet0/0.101
    Crypto map tag: IPSEC, local addr 100.1.1.1

   protected vrf: (none)
   local  ident (addr/mask/prot/port): (192.168.1.0/255.255.255.0/0/0)
   remote ident (addr/mask/prot/port): (192.168.2.0/255.255.255.0/0/0)
   current_peer 100.2.2.2 port 500
     PERMIT, flags={origin_is_acl,}
    #pkts encaps: 0, #pkts encrypt: 0, #pkts digest: 0
    #pkts decaps: 0, #pkts decrypt: 0, #pkts verify: 0
    #pkts compressed: 0, #pkts decompressed: 0
    #pkts not compressed: 0, #pkts compr. failed: 0
    #pkts not decompressed: 0, #pkts decompress failed: 0
    #send errors 0, #recv errors 0

     local crypto endpt.: 100.1.1.1, remote crypto endpt.: 100.2.2.2
     path mtu 1500, ip mtu 1500, ip mtu idb FastEthernet0/0.101
     current outbound spi: 0x0(0)

     inbound esp sas:

     inbound ah sas:

     inbound pcp sas:

     outbound esp sas:

     outbound ah sas:

     outbound pcp sas:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<h2>問題</h2>
<br><ul>
	<li>拠点間の通信ができない原因はなんですか？</li>
	<li>これを解決するためには、R1とR2でどのように設定を変更すればよいですか？</li>
</ul><br>]]></description>
            <link>http://www.n-study.com/network/2009/12/ipsec_ccnp.html</link>
            <guid>http://www.n-study.com/network/2009/12/ipsec_ccnp.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">シスコ</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">ネットワークセキュリティ</category>
            
            
            <pubDate>Fri, 25 Dec 2009 12:32:26 +0900</pubDate>
        </item>
        
        <item>
            <title>OSPFのトラブル 解答と解説 【CCNP～CCIEレベル】</title>
            <description><![CDATA[<h2>解答</h2>

<pre>R1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
router ospf 1
 area 12 virtual-link 2.2.2.2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
router ospf 1
 area 12 virtual-link 1.1.1.1
 area 23 virtual-link 3.3.3.3
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R3
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
router ospf 1
 area 23 virtual-link 2.2.2.2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<h2>解説</h2>

<p>OSPFのエリア構成は、バックボーンエリア(エリア0)を中心とした2階層構造が原則です。すべてのエリアは原則として、バックボーンエリアに接続していなければいけません。</p>

<p>物理的な配置上、バックボーンエリアに接続することができないエリアがある場合、バーチャルリンクが必要です。バーチャルリンクによって、仮想的にバックボーンエリアに接続することができます。</p>


<P><span class="mt-enclosure mt-enclosure-image"
style="display: inline;"><a
href="http://www.n-study.com/network/image/ospf_trouble02.html"
onclick="window.open('http://www.n-study.com/network/image/ospf_trouble02.ht
ml','popup','width=796,height=175,scrollbars=no,resizable=no,toolbar=no,dire
ctories=no,location=no,menubar=no,status=no,left=0,top=0'); return
false"><img
src="http://www.n-study.com/network/image/ospf_trouble02-thumb-400x87.jpg"
width="400" height="87" alt="ospf_trouble02.jpg" class="mt-image-none"
style="" /></a></span><br>
図 ネットワーク構成</p>


<p>問題のネットワーク構成を見ると、エリア23とエリア3がバックボーンエリアに接続されていません。すると、このエリア23とエリア3に含まれるネットワークのルート情報を正しく学習できなくなります。エリア23とエリア3をバックボーンエリアに接続するために、バーチャルリンクの設定が必要です。</p>


<p>【エリア23をエリア0に接続】</p>

<p>エリア23をバーチャルリンクによってエリア0に接続します。そのためには、R1とR2間でバーチャルリンクを設定します。バーチャルリンクの設定は、エリア0に接続しているABRとエリア0に接続していないエリアのABR間で行います。この場合は、エリア0に接続しているABRはR1です。また、エリア0に接続していないエリア(エリア23)のABRはR2です。<br>
バーチャルリンクを設定するルータは、同じエリアに所属していなければいけません。バーチャルリンクを設定するルータが所属しているエリアがトランジットエリアです。R1とR2が所属しているエリア12がトランジットエリアとなります。</p>

<p>エリア23をエリア0に接続するためにR1とR2でのバーチャルリンクの設定は次のように行います。</p>

<pre>R1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
router ospf 1
 area 12 virtual-link 2.2.2.2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
router ospf 1
 area 12 virtual-link 1.1.1.1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<p>バーチャルリンクにより、R1とR2は仮想的にポイントツーポイント接続されます。そして、仮想的なポイントツーポイントインタフェースは、エリア0のインタフェースです。また、バーチャルリンクを介してネイバーを確立します。R2はバーチャルリンクによってエリア0のABRにもなります。</p>

<p>バーチャルリンクの確認は、show ip ospf virtual-linksやshow ip ospf interfaceコマンドなどで行います。R1でshow ip ospf virtual-links/show ip ospf interface/show ip ospf neighborを見ると、次のようになります。</p>

<pre>R1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#show ip ospf virtual-links
Virtual Link OSPF_VL0 to router 2.2.2.2 is up
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 12, via interface Serial1/0, Cost of using 64
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:05
    Adjacency State FULL (Hello suppressed)
    Index 1/2, retransmission queue length 0, number of retransmission 0
    First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
    Last retransmission scan length is 0, maximum is 0
    Last retransmission scan time is 0 msec, maximum is 0 msec
R1#show ip ospf interface
Loopback0 is up, line protocol is up
  Internet Address 192.168.1.1/24, Area 0
～省略～
OSPF_VL0 is up, line protocol is up
  Internet Address 192.168.12.1/24, Area 0
  Process ID 1, Router ID 1.1.1.1, Network Type VIRTUAL_LINK, Cost: 64
  Configured as demand circuit.
  Run as demand circuit.
  DoNotAge LSA allowed.
  Transmit Delay is 1 sec, State POINT_TO_POINT
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:02
  Supports Link-local Signaling (LLS)
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 2.2.2.2  (Hello suppressed)
  Suppress hello for 1 neighbor(s)
Serial1/0 is up, line protocol is up
  Internet Address 192.168.12.1/24, Area 12
～省略～
R1#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           0   FULL/  -           -        192.168.12.2    OSPF_VL0
2.2.2.2           0   FULL/  -        00:00:34    192.168.12.2    Serial1/0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<p>【エリア33をエリア0に接続】</p>

<p>エリア3もエリア0に接続しなければいけません。R1とR2間のバーチャルリンクによってR2はエリア0のABRになっています。R2と同じエリア23内に所属しているR3がエリア3のABRなので、R2とR3間でバーチャルリンクを設定します。トランジットエリアは、エリア23です。そのための設定は次のように行います。</p>

<pre>R2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
router ospf 1
 area 23 virtual-link 3.3.3.3
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R3
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
router ospf 1
 area 23 virtual-link 2.2.2.2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<p>R2とR3間もバーチャルリンクにより仮想的にエリア0のポイントツーポイントリンクで接続されることになります。</p>

<p>R1-R2間、そしてR2-R3間でバーチャルリンクを設定することで、すべてのエリアがエリア0を中心とした2階層構造になります。バーチャルリンクを考慮したエリア構成をまとめたものが次の図です。</p>

<p><span class="mt-enclosure mt-enclosure-image"
style="display: inline;"><a
href="http://www.n-study.com/network/image/ospf_trouble03.html"
onclick="window.open('http://www.n-study.com/network/image/ospf_trouble03.ht
ml','popup','width=796,height=209,scrollbars=no,resizable=no,toolbar=no,dire
ctories=no,location=no,menubar=no,status=no,left=0,top=0'); return
false"><img
src="http://www.n-study.com/network/image/ospf_trouble03-thumb-400x105.jpg"
width="400" height="105" alt="ospf_trouble03.jpg" class="mt-image-none"
style="" /></a></span><br>
図 バーチャルリンク設定後のエリア構成</p>


<p>そして、次のようにR1はエリア23、エリア3のルートを学習できるようになります。</p>

<pre>━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#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

C    192.168.12.0/24 is directly connected, Serial1/0
O IA 192.168.23.0/24 [110/128] via 192.168.12.2, 00:32:02, Serial1/0
C    192.168.1.0/24 is directly connected, Loopback0
O    192.168.2.0/24 [110/65] via 192.168.12.2, 00:32:12, Serial1/0
O IA 192.168.3.0/24 [110/129] via 192.168.12.2, 00:32:02, Serial1/0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<br>
<hr>
<br>
<u><em><strong><big><font color="blue">OSPFをしっかり身に付けるなら！</font></big></strong></em></u>
<br><br><br>
<ul>
	<li><a href="http://www.n-study.com/library/2005/11/ccnaccnpccieospfospf.html">「究めるOSPF」</a></li>
	<li><a href="http://www.n-study.com/library/2009/05/_011.html">NE向けセミナー「OSPFの基礎をしっかり身に付ける！」教材セット</a></li>
	<li><a href="http://www.n-study.com/library/2009/06/neospf.html">NE向けセミナー「OSPFの高度な機能をばっちり使えるようになる」教材セット</a></li>
</ul>]]></description>
            <link>http://www.n-study.com/network/2009/12/ospf_ccnpccie_3.html</link>
            <guid>http://www.n-study.com/network/2009/12/ospf_ccnpccie_3.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">IPルーティング</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">シスコ</category>
            
            
            <pubDate>Fri, 18 Dec 2009 12:35:57 +0900</pubDate>
        </item>
        
        <item>
            <title>OSPFのトラブル 【CCNP～CCIEレベル】</title>
            <description><![CDATA[<h2>ネットワーク構成</h2>

<p>下記のネットワーク構成でOSPFによるダイナミックルーティングを行います。</p>


<p><span class="mt-enclosure mt-enclosure-image"
style="display: inline;"><a
href="http://www.n-study.com/network/image/ospf_trouble02.html"
onclick="window.open('http://www.n-study.com/network/image/ospf_trouble02.ht
ml','popup','width=796,height=175,scrollbars=no,resizable=no,toolbar=no,dire
ctories=no,location=no,menubar=no,status=no,left=0,top=0'); return
false"><img
src="http://www.n-study.com/network/image/ospf_trouble02-thumb-400x87.jpg"
width="400" height="87" alt="ospf_trouble02.jpg" class="mt-image-none"
style="" /></a></span><br>
図 ネットワーク構成</p>


<h2>初期設定</h2>

<pre>R1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
interface Loopback0
 ip address 192.168.1.1 255.255.255.0
 ip ospf network point-to-point
!
interface Serial1/0
 ip address 192.168.12.1 255.255.255.0
!
router ospf 1
 router-id 1.1.1.1
 log-adjacency-changes
 network 192.168.1.1 0.0.0.0 area 0
 network 192.168.12.1 0.0.0.0 area 12
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
interface Loopback0
 ip address 192.168.2.2 255.255.255.0
 ip ospf network point-to-point
!
interface Serial1/0
 ip address 192.168.12.2 255.255.255.0
!
interface Serial1/1
 ip address 192.168.23.2 255.255.255.0
!
router ospf 1
 router-id 2.2.2.2
 log-adjacency-changes
 network 192.168.2.2 0.0.0.0 area 12
 network 192.168.12.2 0.0.0.0 area 12
 network 192.168.23.2 0.0.0.0 area 23
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R3
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
interface Loopback0
 ip address 192.168.3.3 255.255.255.0
 ip ospf network point-to-point
!
interface Serial1/0
 ip address 192.168.23.3 255.255.255.0
!
router ospf 1
 router-id 3.3.3.3
 log-adjacency-changes
 network 192.168.3.3 0.0.0.0 area 3
 network 192.168.23.3 0.0.0.0 area 23
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<h2>問題</h2>

<p>R1でルーティングテーブルをみると、次のように192.168.2.0/24のルートしかOSPFで学習できていません。</p>

<pre>R1 show ip route
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#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

C    192.168.12.0/24 is directly connected, Serial1/0
C    192.168.1.0/24 is directly connected, Loopback0
O    192.168.2.0/24 [110/65] via 192.168.12.2, 00:07:31, Serial1/0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<p>エリア構成を変えないで、必要なネットワークのルート情報が各ルータのルーティングテーブルに登録されるようにしたいと考えています。</p>

<p>どのように設定すればよいですか？</p>
<br>
<hr>
<br>
<u><em><strong><big><font color="blue">OSPFをしっかり身に付けるなら！</font></big></strong></em></u>
<br><br><br>
<ul>
	<li><a href="http://www.n-study.com/library/2005/11/ccnaccnpccieospfospf.html">「究めるOSPF」</a></li>
	<li><a href="http://www.n-study.com/library/2009/05/_011.html">NE向けセミナー「OSPFの基礎をしっかり身に付ける！」教材セット</a></li>
	<li><a href="http://www.n-study.com/library/2009/06/neospf.html">NE向けセミナー「OSPFの高度な機能をばっちり使えるようになる」教材セット</a></li>
</ul>]]></description>
            <link>http://www.n-study.com/network/2009/12/ospf_ccnpccie_2.html</link>
            <guid>http://www.n-study.com/network/2009/12/ospf_ccnpccie_2.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">IPルーティング</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">シスコ</category>
            
            
            <pubDate>Fri, 11 Dec 2009 12:20:17 +0900</pubDate>
        </item>
        
        <item>
            <title>BGPのトラブル【CCNPレベル】解答と解説</title>
            <description><![CDATA[ <h2>解答</h2>

<pre>R1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ip route 2.2.2.2 255.255.255.255 10.1.1.2
ip route 2.2.2.2 255.255.255.255 10.2.2.2

router bgp 1
 neighbor 2.2.2.2 update-source loopback0
 neighbor 2.2.2.2 ebgp-multihop
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━


R2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ip route 1.1.1.1 255.255.255.255 10.1.1.1
ip route 1.1.1.1 255.255.255.255 10.2.2.1

router bgp 2
 neighbor 1.1.1.1 update-source loopback0
 neighbor 1.1.1.1 ebgp-multihop
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<h2>解説</h2>

<p>EBGPネイバーは、直接接続のIPアドレスを利用して確立することが一般的です。直接接続のIPアドレスを利用していれば、あまり難しいことは考えなくても大丈夫です。普通にneighbor remote-asコマンドでお互いの直接接続のIPアドレスを指定すれば、問題なくネイバーを確立できます。<br>
ところが、直接接続ではないIPアドレスでEBGPネイバーを確立するときには、単にneighbor remote-asコマンドだけ設定してもネイバーがEstablished状態になりません。</p>

<p>直接接続ではないIPアドレスでEBGPネイバーを確立するときには、次の3点に注意してください。</p>

<ol>
	<li>相手のIPアドレスへルーティング可能であること</li>
	<li>送信元IPアドレスを相手が指定したネイバーのIPアドレスと一致させること</li>
	<li>TTLを増やすこと</li>
</ol>

<p>以降では、この3点についてどのように設定すればいいかを見ていきます。</p>



<p><strong>1.相手のIPアドレスへルーティング可能であること</strong></p>

<p>まず、相手のIPアドレスへルーティングできなければ話になりません。BGPでは、指定したネイバーのIPアドレスに対してまずTCPコネクションを確立します。ネイバーのIPアドレスへルーティングできなければTCPコネクションの確立すらできなくなってしまいます。<br>
AS間ではOSPFなどのルーティングプロトコルを利用することは、あまりないのでスタティックルートの設定を行います。R1、R2が2本のシリアルリンクで接続されているので、お互いのLoopback0へのスタティックルートを2つずつ設定して、ロードバランスできるようにします。</p>

<pre>R1 スタティックルートの設定
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ip route 2.2.2.2 255.255.255.255 10.1.1.2
ip route 2.2.2.2 255.255.255.255 10.2.2.2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R2 スタティックルートの設定
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ip route 1.1.1.1 255.255.255.255 10.1.1.1
ip route 1.1.1.1 255.255.255.255 10.2.2.1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<p>スタティックルートを設定したあとのR1、R2のルーティングテーブルは次のようになります。</p>

<pre>R1 show ip route
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#show ip route
～省略～

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     2.0.0.0/32 is subnetted, 1 subnets
S       2.2.2.2 [1/0] via 10.2.2.2
                [1/0] via 10.1.1.2
     10.0.0.0/24 is subnetted, 2 subnets
C       10.2.2.0 is directly connected, Serial1/1
C       10.1.1.0 is directly connected, Serial1/0
C    192.168.1.0/24 is directly connected, FastEthernet0/0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R2 show ip route
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#show ip route
～省略～

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
S       1.1.1.1 [1/0] via 10.2.2.1
                [1/0] via 10.1.1.1
     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback0
     10.0.0.0/24 is subnetted, 2 subnets
C       10.2.2.0 is directly connected, Serial1/1
C       10.1.1.0 is directly connected, Serial1/0
C    192.168.2.0/24 is directly connected, FastEthernet0/0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<p><strong>2.送信元IPアドレスを相手が指定したネイバーのIPアドレスと一致させること</strong></p>

<p>BGPネイバーを確立するには、受信したBGPパケットの送信元IPアドレスが自身で設定しているネイバーのIPアドレスと一致しなければいけません。お互いが正しくネイバーとして相手を認識していることを確認しています。デフォルトでは、BGPパケットの送信元IPアドレスはパケットを出力するインタフェースのIPアドレスとなります。すると、Loopback0のIPアドレスを利用してネイバーを確立しようとしても、送信元IPアドレスの不一致でネイバーの確立ができません。<br>
このようなとき、neighbor update-sourceコマンドを使います。ネイバーに送信するBGPパケットの送信元IPアドレスとして、指定したインタフェースのIPアドレスを利用します。</p>

<p>※ネイバーの確認はAS番号の一致でも行っています。</p>

<p>次のようにR1とR2で、それぞれが送信するBGPパケットの送信元IPアドレスをLoopback0のIPアドレスにします。</p>

<pre>R1 BGPパケットの送信元IPアドレスをLoopback0に
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
router bgp 1
 neighbor 2.2.2.2 update-source loopback0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R2 BGPパケットの送信元IPアドレスをLoopback0に
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
router bgp 2
 neighbor 1.1.1.1 update-source loopback0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<p>なお、送信元IPアドレスの不一致でネイバーを確立できないとき、ネイバーのステータスはずっと「Active」状態のままになります。</p>


<p><strong>3.TTLを増やすこと</strong></p>

<p>ここまでの1.および2.については、EBGPネイバーもIBGPネイバーも共通の注意点です。EBGPネイバーでもIBGPネイバーでも直接接続ではないIPアドレスを利用するときに、1.および2.について注意しなければいけません。3.のTTLを増やすのは、EBGPネイバーを直接接続ではないIPアドレスで確立するときに考慮しなければいけない注意点です。IBGPネイバーの場合は関係ありません。</p>

<p>EBGPネイバーは直接接続のIPアドレスを利用して確立することを前提としています。そのため、EBGPネイバーへ送信するBGPパケットのIPヘッダのTTLは1となっています。TTLが1では直接接続ではないインタフェースに到達できません。そのため、直接接続のIPアドレスのEBGPネイバーへBGPパケットを送信するためには、IPヘッダのTTLを増やさなければいけません。そのためのコマンドがneighbor ebgp-multihopコマンドです。R1とR2でそれぞれ次のようにneighbor ebgp-multihopコマンドを設定します。</p>

<pre>R1 2.2.2.2あてのBGPパケットのTTLを増やす
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
router bgp 1
 neighbor 2.2.2.2 ebgp-multihop
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R2 1.1.1.1あてのBGPパケットのTTLを増やす
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
router bgp 2
 neighbor 1.1.1.1 ebgp-multihop
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>

<p>なお、IBGPネイバーの場合は直接接続ではないIPアドレスを利用することが前提です。IBGPネイバーへ送信するBGPパケットのTTLは255です。また、Ciscoルータでは直接接続のIPアドレスのEBGPネイバーで上記のneighbor ebgp-multihopコマンドが設定されていなければ、そもそもBGPパケットを送信しなくなります。その結果、ネイバーのステータスはずっと「Idle」のままになってしまいます。</p>


<p>1.～3.までの設定を追加すると、R1とR2間でのEBGPネイバーがEstablished状態になります。</p>

<pre>R1 BGPネイバーの確認 show ip bgp summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#sh ip bgp summary
BGP router identifier 1.1.1.1, local AS number 1
BGP table version is 1, main routing table version 1

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
2.2.2.2         4     2       4       4        1    0    0 00:00:07        0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R2 BGPネイバーの確認 show ip bgp summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R2#show ip bgp summary
BGP router identifier 2.2.2.2, local AS number 2
BGP table version is 1, main routing table version 1

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
1.1.1.1         4     1       4       4        1    0    0 00:00:52        0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>
]]></description>
            <link>http://www.n-study.com/network/2009/12/bgpccnp.html</link>
            <guid>http://www.n-study.com/network/2009/12/bgpccnp.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">IPルーティング</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">シスコ</category>
            
            
            <pubDate>Fri, 04 Dec 2009 11:17:00 +0900</pubDate>
        </item>
        
        <item>
            <title>BGPのトラブル 【CCNPレベル】</title>
            <description><![CDATA[<h2>ネットワーク構成</h2>
<p>下記のネットワーク構成で、R1とR2間でEBGPネイバーを確立しようとしています。</p>

<p><span class="mt-enclosure mt-enclosure-image"
style="display: inline;"><a
href="http://www.n-study.com/network/image/BGP_trouble01.html"
onclick="window.open('http://www.n-study.com/network/image/BGP_trouble01.htm
l','popup','width=649,height=214,scrollbars=no,resizable=no,toolbar=no,direc
tories=no,location=no,menubar=no,status=no,left=0,top=0'); return
false"><img
src="http://www.n-study.com/network/image/BGP_trouble01-thumb-400x131.jpg"
width="400" height="131" alt="BGP_trouble01.jpg" class="mt-image-none"
style="" /></a></span><br>
図 ネットワーク構成</p>


<h2>EBGPネイバー確立のトラブル</h2>

<p>R1およびR2で、次のようにEBGPネイバーをお互いのLoopback0のIPアドレスで確立する設定を行いました。</p>


<pre>R1 設定抜粋
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.1.1 255.255.255.0
!
interface Serial1/0
 ip address 10.1.1.1 255.255.255.0
!
interface Serial1/1
 ip address 10.2.2.1 255.255.255.0
!
router bgp 1
 no synchronization
 bgp log-neighbor-changes
 neighbor 2.2.2.2 remote-as 2
 no auto-summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━


R2 設定抜粋
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.2.2 255.255.255.0
!
interface Serial1/0
 ip address 10.1.1.2 255.255.255.0
!
interface Serial1/1
 ip address 10.2.2.2 255.255.255.0
!
router bgp 2
 no synchronization
 bgp log-neighbor-changes
 neighbor 1.1.1.1 remote-as 1
 no auto-summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<p>上記のようにEBGPネイバーの設定を行ったのですが、R1とR2間のEBGPネイバーはいつまで経っても確立されません。R1でshow ip bgp summaryを見ると、ずっとIdle状態のままです。</p>


<pre>R1 show ip bgp summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#show ip bgp summary
BGP router identifier 1.1.1.1, local AS number 1
BGP table version is 1, main routing table version 1

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
2.2.2.2         4     2       0       0        0    0    0 never    Idle
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre>


<h2>問題</h2>


<ul>
	<li>この原因はなんですか？</li>
	<li>解決するためにはどのように設定をすればよいですか？</li>
</ul>

<hr>
<br>
<p><big><em><u><strong>※BGP学習お勧めコンテンツ※</strong></u></em></big></p>
<ul>
	<li><a href="http://www.n-study.com/library/2008/07/bgp_for_ccie_lab.html">「究めるBGP」</a></li>
	<li><a href="http://www.n-study.com/library/2009/06/bgp.html">「BGPの基本を学ぶ」セミナー教材セット</a></li>
	<li><a href="http://www.n-study.com/library/2009/06/bgp_1.html">「高度なBGPの設定」セミナー教材セット</a></li>
</ul>]]></description>
            <link>http://www.n-study.com/network/2009/11/bgp_ccnp.html</link>
            <guid>http://www.n-study.com/network/2009/11/bgp_ccnp.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">IPルーティング</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">シスコ</category>
            
            
            <pubDate>Fri, 27 Nov 2009 12:30:52 +0900</pubDate>
        </item>
        
    </channel>
</rss>
