DynagenでCCIEを目指す
20100328 proxy-arp loopbackへの疎通
最終更新:
it_certification
-
view
目的
proxy ARPの様子を観察します。
構成
- 設定概要
- R1のデフォルトゲートウェイとして、R1 f0/0を指定します(IPアドレスではなくI/Fを指定します)
- 構成図

- netファイル
ghostios = True sparsemem = True model = 2620 [localhost] [[2620]] image = C:\Program Files\Dynamips\images\c2600-ipbasek9-mz.124-21.bin ram = 128 [[ROUTER R1]] f0/0 = R2 f0/0 [[ROUTER R2]]
- R1
Current configuration : 571 bytes ! version 12.4 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R1 ! boot-start-marker boot-end-marker ! ! no aaa new-model memory-size iomem 15 ip cef ! ! ! ! ! ! ! ! ! ! ! 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 duplex auto speed auto ! ip forward-protocol nd ip route 0.0.0.0 0.0.0.0 FastEthernet0/0 ! ip http server no ip http secure-server ! ! control-plane ! ! line con 0 line aux 0 line vty 0 4 login ! ! end
- R2
Current configuration : 530 bytes ! version 12.4 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R2 ! boot-start-marker boot-end-marker ! ! no aaa new-model memory-size iomem 15 ip cef ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.1.2 255.255.255.0 duplex auto speed auto ! ip forward-protocol nd ! ip http server no ip http secure-server ! ! control-plane ! ! line con 0 line aux 0 line vty 0 4 login ! ! end
検証1 proxy ARPの観察
- ARPのクリア
R1でarp cacheを消去します
R1#clear arp-cache
- デバッグの有効化
下記デバッグを有効にします
R1#debug ip packet IP packet debugging is on R1#debug arp ARP packet debugging is on
- パケットキャプチャの有効化
R1 f0/0でパケットキャプチャを有効にします。
=> capture R1 f0/0 cap_R1_00.cap
- ping送信
R1からR2のloopbak addressに対してpingを送信します。
R1#ping 2.2.2.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 16/61/168 ms
- デバッグメッセージの確認
R1から宛先がブロードキャストMACアドレスであるARPを送信します。それに対して、R2のloopbak 0ではなく、R2のf0/0がARPに対して代理で回答します。
*Mar 1 00:23:14.111: IP ARP: creating incomplete entry for IP address: 2.2.2.2 interface FastEthernet0/0 *Mar 1 00:23:14.115: IP ARP: sent req src 192.168.1.1 c800.01bc.0000, dst 2.2.2.2 0000.0000.0000 FastEthernet0/0 ↑ ARPリクエストです。宛先MACアドレスが0000.0000.0000になっているのは表示上のバグのせいでしょうか? 宛先MACアドレスはFFFF.FFFF.FFFFのはずです。 *Mar 1 00:23:14.387: IP ARP: rcvd rep src 2.2.2.2 c801.01bc.0000, dst 192.168.1.1 FastEthernet0/0 ↑ ARPレスポンスです。loopback 0ではなく、f0/0
- ARPの確認
R1のarp cacheを確認すると、192.168.1.2も2.2.2.2もR2 f0/0のMACアドレスが記載されています。
R1#show arp Protocol Address Age (min) Hardware Addr Type Interface Internet 2.2.2.2 8 c801.01bc.0000 ARPA FastEthernet0/0 Internet 192.168.1.1 - c800.01bc.0000 ARPA FastEthernet0/0 Internet 192.168.1.2 9 c801.01bc.0000 ARPA FastEthernet0/0
- パケットキャプチャの確認
パケットキャプチャの結果からもARPの様子が読み取れます。

検証2 proxy ARPの無効化
- proxy ARPの無効化
R2 f0/0でproxy ARPを無効にします。
R2(config)#interface FastEthernet 0/0 R2(config-if)#no ip proxy-arp
- ARPの消去
R1#clear arp-cache
- ping送信
R1からR2のloopback宛てにpingを送信します。
デバッグメッセージが読みやすいように、敢えて1回しか送信しません。
デバッグメッセージが読みやすいように、敢えて1回しか送信しません。
R1#ping 2.2.2.2 repeat 1 Type escape sequence to abort. Sending 1, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds: . Success rate is 0 percent (0/1)
- デバッグメッセージの確認
カプセル化に失敗したわけではないですが、「encapsulation failed」とデバッグメッセージが表示されます。
*Mar 1 00:39:28.595: IP: tableid=0, s=192.168.1.1 (local), d=2.2.2.2 (FastEthernet0/0), routed via RIB *Mar 1 00:39:28.599: IP: s=192.168.1.1 (local), d=2.2.2.2 (FastEthernet0/0), len 100, sending *Mar 1 00:39:28.603: IP ARP: sent req src 192.168.1.1 c800.01bc.0000, dst 2.2.2.2 0000.0000.0000 FastEthernet0/0 *Mar 1 00:39:28.607: IP: s=192.168.1.1 (local), d=2.2.2.2 (FastEthernet0/0), len 100, encapsulation failed.
- ARPの確認
R1のarp cacheを確認すると、2.2.2.2がIncompleteと表示されています。
R1#show arp Protocol Address Age (min) Hardware Addr Type Interface Internet 2.2.2.2 0 Incomplete ARPA Internet 192.168.1.1 - c800.01bc.0000 ARPA FastEthernet0/0 Internet 192.168.1.2 4 c801.01bc.0000 ARPA FastEthernet0/0
検証3 ARPをstaticに定義
- ARPの定義
R1でARPをstaticに定義します。2.2.2.2とR2 f0/0のMACアドレスを紐づけます。
R1(config)#arp 2.2.2.2 c801.01bc.0000 ARPA
- ARPの確認
R1のarp cacheを確認します。
R1#show arp Protocol Address Age (min) Hardware Addr Type Interface Internet 2.2.2.2 - c801.01bc.0000 ARPA Internet 192.168.1.1 - c800.01bc.0000 ARPA FastEthernet0/0 Internet 192.168.1.2 7 c801.01bc.0000 ARPA FastEthernet0/0
- ping確認
R1から2.2.2.2宛てにpingを送信します。ping応答が返ってくる事が確認できます。
R1#ping 2.2.2.2 repeat 1 Type escape sequence to abort. Sending 1, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds: ! Success rate is 100 percent (1/1), round-trip min/avg/max = 100/100/100 ms
添付ファイル