このページで解説している内容は、以下の YouTube 動画の解説で見ることができます。
ネットワークの構成を Packet Tracer で一から設定していくのは大変かと思います。「ダウンロード」から演習で使用するファイルのダウンロードができます。ファイルは、McAfee インターネットセキュリティでウイルスチェックをしておりますが、ダウンロードは自己責任でお願いいたします。
演習ファイルのダウンロード
NATの検証コマンド
ここでは、NAT を検証するコマンドについて解説していきます。
ネットワークの構成は、下図の構成を用いていきます。

show ip nat translations
現在のNATテーブルを確認するには「show ip nat translations」コマンドを使います。
Router#show ip nat translations
●スタティックNATでの出力
R1#show ip nat translations
Pro Inside global Inside local Outside local Outside global
icmp 200.0.0.1:1 172.16.0.10:1 10.0.0.2:1 10.0.0.2:1
icmp 200.0.0.1:2 172.16.0.10:2 10.0.0.2:2 10.0.0.2:2
icmp 200.0.0.1:3 172.16.0.10:3 10.0.0.2:3 10.0.0.2:3
icmp 200.0.0.1:4 172.16.0.10:4 10.0.0.2:4 10.0.0.2:4
--- 200.0.0.1 172.16.0.10 --- ---
●ダイナミックNATでの出力
R1#show ip nat translations
Pro Inside global Inside local Outside local Outside global
icmp 200.0.0.2:5 172.16.0.10:5 20.0.0.1:5 20.0.0.1:5
icmp 200.0.0.2:6 172.16.0.10:6 20.0.0.1:6 20.0.0.1:6
icmp 200.0.0.2:7 172.16.0.10:7 20.0.0.1:7 20.0.0.1:7
icmp 200.0.0.2:8 172.16.0.10:8 20.0.0.1:8 20.0.0.1:8
icmp 200.0.0.3:5 172.16.0.20:5 20.0.0.1:5 20.0.0.1:5
icmp 200.0.0.3:6 172.16.0.20:6 20.0.0.1:6 20.0.0.1:6
icmp 200.0.0.3:7 172.16.0.20:7 20.0.0.1:7 20.0.0.1:7
icmp 200.0.0.3:8 172.16.0.20:8 20.0.0.1:8 20.0.0.1:8
●PAT(オーバーローディング)での出力
R1#show ip nat translations
Pro Inside global Inside local Outside local Outside global
icmp 10.0.0.1:1024 172.16.0.20:1 20.0.0.1:1 20.0.0.1:1024
icmp 10.0.0.1:1025 172.16.0.20:2 20.0.0.1:2 20.0.0.1:1025
icmp 10.0.0.1:1026 172.16.0.20:3 20.0.0.1:3 20.0.0.1:1026
icmp 10.0.0.1:1027 172.16.0.20:4 20.0.0.1:4 20.0.0.1:1027
icmp 10.0.0.1:1 172.16.0.10:1 20.0.0.1:1 20.0.0.1:1
icmp 10.0.0.1:2 172.16.0.10:2 20.0.0.1:2 20.0.0.1:2
icmp 10.0.0.1:3 172.16.0.10:3 20.0.0.1:3 20.0.0.1:3
icmp 10.0.0.1:4 172.16.0.10:4 20.0.0.1:4 20.0.0.1:4
clear ip nat translations *
現在のダイナミックNATの変換を全てクリアしたい場合や、ダイナミックNATの設定を途中で変更したい場合に使用するコマンドです。
Router#clear ip nat translations *
show ip nat statistics
「show ip nat statistics」コマンドは、アドレス変換に関する統計を表示します。
Router#show ip nat statistics
●「show ip nat statistics」コマンドの出力
R1#show ip nat statistics
Total translations: 12 (0 static, 12 dynamic, 12 extended)
Outside Interfaces: Serial0/0/0
Inside Interfaces: GigabitEthernet0/0
Hits: 14 Misses: 14
Expired translations: 0
Dynamic mappings:
debug ip nat
リアルタイムにアドレス変換を確認したい場合には、「debug ip nat」コマンドを使用します。
Router#debug ip nat
●「debug ip nat」コマンドの出力
R1#debug ip nat
IP NAT debugging is on
R1#
NAT: s=172.16.0.10->10.0.0.1, d=20.0.0.1 [9]
NAT*: s=20.0.0.1, d=10.0.0.1->172.16.0.10 [15]
NAT: s=172.16.0.10->10.0.0.1, d=20.0.0.1 [10]
NAT*: s=20.0.0.1, d=10.0.0.1->172.16.0.10 [16]
NAT: s=172.16.0.10->10.0.0.1, d=20.0.0.1 [11]
NAT*: s=20.0.0.1, d=10.0.0.1->172.16.0.10 [17]
NAT: s=172.16.0.10->10.0.0.1, d=20.0.0.1 [12]
NAT*: s=20.0.0.1, d=10.0.0.1->172.16.0.10 [18]
NAT: s=172.16.0.10->10.0.0.1, d=20.0.0.1 [9]
s : 送信元IPアドレス「172.16.1.2」
-> : 内部グローバルアドレス「10.1.1.1」に変換
d : 宛先IPアドレス「10.1.1.2」
を指します。