ここでは最小構成、最小設定を見ていきます。
※InterfaceのIPアドレスの設定は掲載を省略します。
※ルータにルーティングの設定は必要ございません。
下記も合わせてご参照ください。
LISPの基本 その1:概要
LISPの基本 その3:トラブルシュートに使うコマンド
1) NW構成
ルータが2台あればLISPの動作を確認できます。
1台はMS/MR兼xTRになります。
片方のEIDには端末を他方はLoopback InterfaceをEIDとました。
(両方ともLoopback Interfaceでも構いません)
2) R200(xTR)の設定
R200をxTRとして設定します。
router lisp
database-mapping 10.0.0.0/24 IPv4-interface Ethernet0/2 priority 1 weight 100
ipv4 itr map-resolver 192.168.2.11
ipv4 itr
ipv4 etr map-server 192.168.2.11 key w
ipv4 etr
exit
2.1) EIDとRLCOのMapping設定
EID:10.0.0.0/24 をRLOC:Interface e0/2に紐づけています。
priorityやweightは複数のRLOCがあるときに優先順位や負荷分散の配分に使います。
database-mapping 10.0.0.0/24 IPv4-interface Ethernet0/2 priority 1 weight 100
2.2) ITRの設定
MRのアドレスとITRであることを設定します。
ipv4 itr map-resolver 192.168.2.11
ipv4 itr
2.3) ETRの設定
MSのアドレスとETRであることを設定します。
keyはMSにも設定します。MSと一致する必要があります。
ipv4 etr map-server 192.168.2.11 key w
ipv4 etr
3) R201(xTR&MS/MR)の設定
R201をxTR兼MS/MRとして設定します。
EID-RLOCのMappingの設定方法を変えています。
router lisp
locator-set R201_RLOC
IPv4-interface Ethernet0/2 priority 1 weight 100
exit
!
site R200
authentication-key w
eid-prefix 10.0.0.0/24
exit
!
site R201
authentication-key w
eid-prefix 172.19.0.11/32
exit
!
database-mapping 172.19.0.11/32 locator-set R201_RLOC
ipv4 map-server
ipv4 map-resolver
ipv4 itr map-resolver 192.168.2.11
ipv4 itr
ipv4 etr map-server 192.168.2.11 key w
ipv4 etr
exit
3.1) MS/MRの設定
EIDの情報を設定します。
authentication-keyはxTRのipv4 etr map-server x.x.x.x keyに一致させます。
site R200
authentication-key w
eid-prefix 10.0.0.0/24
exit
!
site R201
authentication-key w
eid-prefix 172.19.0.11/32
exit
MS、MRとして動作することを設定します。
ipv4 map-server
ipv4 map-resolver
3.2) xTRの設定
ここではEID-RLOCのMappingをlocator-setで定義しています。
locator-set R201_RLOC
IPv4-interface Ethernet0/2 priority 1 weight 100
exit
EIDとlocator-setを紐づけます。
database-mapping 172.19.0.11/32 locator-set R201_RLOC
内容としては下記と同じ設定になります。
database-mapping 172.19.0.11/32 IPv4-interface Ethernet0/2 priority 1 weight 100
ITR/ETRの設定はR200と同様です。
ipv4 itr map-resolver 192.168.2.11
ipv4 itr
ipv4 etr map-server 192.168.2.11 key w
ipv4 etr
4) 動作確認
4.1) MS/MR
xTRからのMap-RegisterでEIDとRLOCのMappingが登録されていることを確認します。
自動的にMappingは登録されます。
R201#sh lisp site
LISP Site Registration Information
* = Some locators are down or unreachable
Site Name Last Up Who Last Inst EID Prefix
Register Registered ID
R200 00:00:12 yes 192.168.2.10 10.0.0.0/24
R201 00:00:38 yes 192.168.2.11 172.19.0.11/32
未登録の場合は下記のようになります。
R201#sh lisp site
LISP Site Registration Information
* = Some locators are down or unreachable
Site Name Last Up Who Last Inst EID Prefix
Register Registered ID
R200 never no -- 10.0.0.0/24
R201 never no -- 172.19.0.11/32
4.2) xTR
ノートPC(R200のEID)から対向のEID(R201のLoopback0)にPingを送信します。
R200およびR201はお互いのEIDのアドレスに対してのルーティングは知りません。
始めのPingは失敗します。
これはR200がMap-cacheを持っていないためです。
通信が発生した際にMap-RequestとMap-Replyの交換が行われてMap-cacheが作成されます。
PC#ping 172.19.0.11
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.19.0.11, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/2/5 ms
Map-cacheは次のように確認できます。
0.0.0.0/0はDefault Routeのようなものです。
該当するEntryがないとMap‐requestを送信します。
R200#sh ip lisp map-cache
LISP IPv4 Mapping Cache for EID-table default (IID 0), 2 entries
0.0.0.0/0, uptime: 00:00:15, expires: never, via static send map-request
Negative cache entry, action: send-map-request
172.19.0.11/32, uptime: 00:00:05, expires: 23:59:54, via map-reply, complete
Locator Uptime State Pri/Wgt
192.168.2.11 00:00:05 up 1/100
以上、その2でした。