キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 
cancel
1755
閲覧回数
5
いいね!
0
コメント
Naoya Yamagishi
Cisco Employee
Cisco Employee

NHRPに焦点を当てたシリーズです。
NHRP シリーズ : その1 NHRP とは?


その2、として実際の動作をMultipoint GRE(IPsecなしのDMVPN)構成で見ていきます。

NW構成は下記になります。fig3.png

 


基本動作の確認

各ルータの状況は下記の通りです。
NHRPでTunnelのIPとNBMA(物理)のIPアドレスの紐づけができています。
NHRPのサーバであるHubに登録された状況です。
Spoke同士のLoopback 192.168.3.3と192.168.4.4のNexthopはHubの10.10.10.2になっています。
Spoke同士が通信するにはHubを経由する状況です。

[Hub]
R2#sh ip route
<snip>
Gateway of last resort is not set
      10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C        10.10.0.0/24 is directly connected, GigabitEthernet0/0/3.10
L        10.10.0.2/32 is directly connected, GigabitEthernet0/0/3.10
C        10.10.10.0/24 is directly connected, Tunnel10
L        10.10.10.2/32 is directly connected, Tunnel10
      192.168.2.0/32 is subnetted, 1 subnets
C        192.168.2.2 is directly connected, Loopback10
      192.168.3.0/32 is subnetted, 1 subnets
D        192.168.3.3 [90/27008000] via 10.10.10.3, 00:14:52, Tunnel10
      192.168.4.0/32 is subnetted, 1 subnets
D        192.168.4.4 [90/27008000] via 10.10.10.4, 00:13:37, Tunnel10

R2#sh ip nhrp
10.10.10.3/32 via 10.10.10.3
   Tunnel10 created 00:16:39, expire 00:09:34
   Type: dynamic, Flags: registered nhop
   NBMA address: 10.10.0.3
10.10.10.4/32 via 10.10.10.4
   Tunnel10 created 00:15:37, expire 00:07:42
   Type: dynamic, Flags: registered nhop
   NBMA address: 10.10.0.4

R2#sh ip cef | in 192.168.
192.168.2.2/32       receive              Loopback10
192.168.3.3/32       10.10.10.3           Tunnel10
192.168.4.4/32       10.10.10.4           Tunnel10

[Spoke]
R3#sh ip route
<snip>
Gateway of last resort is not set
      10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C        10.10.0.0/24 is directly connected, GigabitEthernet0/0/3.10
L        10.10.0.3/32 is directly connected, GigabitEthernet0/0/3.10
C        10.10.10.0/24 is directly connected, Tunnel10
L        10.10.10.3/32 is directly connected, Tunnel10
      192.168.2.0/32 is subnetted, 1 subnets
D        192.168.2.2 [90/27008000] via 10.10.10.2, 00:17:10, Tunnel10
      192.168.3.0/32 is subnetted, 1 subnets
C        192.168.3.3 is directly connected, Loopback10
      192.168.4.0/32 is subnetted, 1 subnets
D        192.168.4.4 [90/28288000] via 10.10.10.2, 00:15:54, Tunnel10

R3#sh ip nhrp
10.10.10.2/32 via 10.10.10.2
   Tunnel10 created 00:17:48, never expire
   Type: static, Flags:
   NBMA address: 10.10.0.2

R3#sh ip cef | in 192.168.
192.168.2.2/32       10.10.10.2           Tunnel10
192.168.3.3/32       receive              Loopback10
192.168.4.4/32       10.10.10.2           Tunnel10

[Spoke]
R4#sh ip route
<snip>
Gateway of last resort is not set
      10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C        10.10.0.0/24 is directly connected, GigabitEthernet0/0/2.10
L        10.10.0.4/32 is directly connected, GigabitEthernet0/0/2.10
C        10.10.10.0/24 is directly connected, Tunnel10
L        10.10.10.4/32 is directly connected, Tunnel10
      192.168.2.0/32 is subnetted, 1 subnets
D        192.168.2.2 [90/27008000] via 10.10.10.2, 00:16:57, Tunnel10
      192.168.3.0/32 is subnetted, 1 subnets
D        192.168.3.3 [90/28288000] via 10.10.10.2, 00:16:57, Tunnel10
      192.168.4.0/32 is subnetted, 1 subnets
C        192.168.4.4 is directly connected, Loopback10

R4#sh ip nhrp
10.10.10.2/32 via 10.10.10.2
   Tunnel10 created 00:17:18, never expire
   Type: static, Flags:
   NBMA address: 10.10.0.2

R4#sh ip cef | in 192.168.
192.168.2.2/32       10.10.10.2           Tunnel10
192.168.3.3/32       10.10.10.2           Tunnel10 <<R2がNexthop
192.168.4.4/32       receive              Loopback10

NHRPの動作をみるために、
ここでR4からR3へTracerouteをしてみます。
Spoke同士なのでHubを経由しなくてはなりません。
初めはHubのR2を経由します。

R4#traceroute 192.168.3.3 so lo10
Type escape sequence to abort.
Tracing the route to 192.168.3.3
VRF info: (vrf in name/id, vrf out name/id)
  1 10.10.10.2 0 msec 1 msec 0 msec
  2 10.10.10.3 1 msec *  0 msec

2回目。
ここではR2:Hub:10.10.10.2を経由しなくなりました。

R4#traceroute 192.168.3.3 so lo10
Type escape sequence to abort.
Tracing the route to 192.168.3.3
VRF info: (vrf in name/id, vrf out name/id)
  1 10.10.10.3 0 msec *  0 msec

R4の状況を改めて確認してみましょう。
Routing tableには次のような変化があります。
H 10.10.10.3/32
D % 192.168.3.3
HはNHRPにより作られた新しいエントリです。
%はnext hop overrideでNHRPによりNexthopが上書きされます。

(sho ip routeにnext-hop-overrideのオプションを付けるとNHOの表示が出ます。)
R4#sho ip route next-hop-override
<snip>
      10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C        10.10.0.0/24 is directly connected, GigabitEthernet0/0/2.10
L        10.10.0.4/32 is directly connected, GigabitEthernet0/0/2.10
C        10.10.10.0/24 is directly connected, Tunnel10
H        10.10.10.3/32 is directly connected, 00:00:18, Tunnel10 <<
L        10.10.10.4/32 is directly connected, Tunnel10
      172.16.0.0/32 is subnetted, 1 subnets
D        172.16.3.3 [90/28288000] via 10.10.10.2, 00:02:05, Tunnel10
      192.168.2.0/32 is subnetted, 1 subnets
D        192.168.2.2 [90/27008000] via 10.10.10.2, 01:32:35, Tunnel10
      192.168.3.0/32 is subnetted, 1 subnets
D   %    192.168.3.3 [90/28288000] via 10.10.10.2, 01:32:35, Tunnel10
                     [NHO][90/255] via 10.10.10.3, 00:00:18, Tunnel10 <<
      192.168.4.0/32 is subnetted, 1 subnets
C        192.168.4.4 is directly connected, Loopback10

show ip nhrpではエントリが期限付きで追加されています。

R4#sh ip nhrp
10.10.10.2/32 via 10.10.10.2
   Tunnel10 created 00:27:50, never expire
   Type: static, Flags:
   NBMA address: 10.10.0.2
10.10.10.3/32 via 10.10.10.3 <<
   Tunnel10 created 00:00:25, expire 00:09:36
   Type: dynamic, Flags: router nhop rib
   NBMA address: 10.10.0.3
192.168.3.3/32 via 10.10.10.3 <<
   Tunnel10 created 00:00:25, expire 00:09:36
   Type: dynamic, Flags: router rib nho
   NBMA address: 10.10.0.3
192.168.4.4/32 via 10.10.10.4 <<
   Tunnel10 created 00:00:25, expire 00:09:36
   Type: dynamic, Flags: router unique local
   NBMA address: 10.10.0.4
    (no-socket)

CEFでもR3宛ての192.168.3.3のNexthopがHub経由ではなく、
R3に変更されています。

R4#sh ip cef | in 192.168.
192.168.2.2/32       10.10.10.2           Tunnel10
192.168.3.3/32       10.10.10.3           Tunnel10 <<R3がNexthopに上書き
192.168.4.4/32       receive              Loopback10

そのため2回目のtracerouteはHubのR2を経由せず、
直接R4からR3への通信するようになりました。
R3でも同様の変化が見られます。


Routing TableのHと%(next-hop-overrid)の違い

余談にはなりますが、
NHRPでRouting Tableに経路が追加される際に
Hと%(next-hop-overrid)の違いについて触れてみます。

この差はNHRPで学習した経路のPrefixによります。
NHRPで学習した経路がRouting Tableに持っている経路より、
Prefixが長い場合(よりSpecificな場合)にはHとしてRouting Tableには追加され、
同じかPrefixが短い場合は%(next-hop-overrid)として学習します。

先の例では192.168.3.3/32は元々Routing Tableにあったため、
同じ/32で学習した経路は%(next-hop-overrid)として学習しています。

ではこれを意図的にHとして学習するようにしてみましょう。
Routing Tableに/32よりPrefixが短いエントリを作ってやります。
要はR3の拠点のアドレスをサマリしてEIGRPで広報するような場合になります。
R3でEIGRPでSummaryします。

router3#sh run int tu10
interface Tunnel10
 ip address 10.10.10.3 255.255.255.0
 no ip redirects
 ip mtu 1400
 ip nhrp authentication w
 ip nhrp network-id 4
 ip nhrp nhs 10.10.10.2 nbma 10.10.0.2 multicast
 ip summary-address eigrp 10 192.168.3.0 255.255.255.0 << 追加
 tunnel source GigabitEthernet0/0/3.10
 tunnel mode gre multipoint
 tunnel key 10
end

R4のRouting Tableでは192.168.3.0/24になります。

route4#sh ip route
<snip>
Gateway of last resort is not set
      10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C        10.10.0.0/24 is directly connected, GigabitEthernet0/0/2.10
L        10.10.0.4/32 is directly connected, GigabitEthernet0/0/2.10
C        10.10.10.0/24 is directly connected, Tunnel10
L        10.10.10.4/32 is directly connected, Tunnel10
      192.168.2.0/32 is subnetted, 1 subnets
D        192.168.2.2 [90/27008000] via 10.10.10.2, 02:53:29, Tunnel10
      192.168.3.0/24 is subnetted, 1 subnets << /24になります。
D        192.168.3.0 [90/28288000] via 10.10.10.2, 00:00:07, Tunnel10
      192.168.4.0/32 is subnetted, 1 subnets
C        192.168.4.4 is directly connected, Loopback10

 ここでR4からR3にTracerouteしますと、
Routing TableにはHで192.168.3.3/32が追加されます。

route4#sh ip route
<snip>
Gateway of last resort is not set
      10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C        10.10.0.0/24 is directly connected, GigabitEthernet0/0/2.10
L        10.10.0.4/32 is directly connected, GigabitEthernet0/0/2.10
C        10.10.10.0/24 is directly connected, Tunnel10
H        10.10.10.3/32 is directly connected, 00:00:09, Tunnel10
L        10.10.10.4/32 is directly connected, Tunnel10
      192.168.2.0/32 is subnetted, 1 subnets
D        192.168.2.2 [90/27008000] via 10.10.10.2, 02:53:56, Tunnel10
      192.168.3.0/24 is variably subnetted, 2 subnets, 2 masks
D        192.168.3.0/24 [90/28288000] via 10.10.10.2, 00:00:34, Tunnel10
H        192.168.3.3/32 [250/255] via 10.10.10.3, 00:00:09, Tunnel10 <<
      192.168.4.0/32 is subnetted, 1 subnets
C        192.168.4.4 is directly connected, Loopback10

以上。
NHRPシリーズその3はDebugコマンドを使ってNHRPの動作を見ていきたいと思います。

Getting Started

検索バーにキーワード、フレーズ、または質問を入力し、お探しのものを見つけましょう

シスコ コミュニティをいち早く使いこなしていただけるよう役立つリンクをまとめました。みなさんのジャーニーがより良いものとなるようお手伝いします