0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

NAT(NAPT)の設定方法

Posted at

スタティックNATの設定

スクリーンショット 2025-09-04 164320.png

Router1の設定

Router1(config)#interface GigabitEthernet 0/0
Router1(config-if)#ip nat inside
Router1(config-if)#exit
Router1(config)#interface GigabitEthernet 0/1
Router1(config-if)#ip nat outside
Router1(config-if)#exit
Router1(config)#ip nat inside source static 192.168.0.10 172.16.0.2

最後の行で内部ネットワークでローカルアドレスが192.168.0.1だったときにグローバルアドレスを172.16.0.2に変更する設定を行う。

ダイナミックNATの設定

スクリーンショット 2025-09-04 164329.png

Router10の設定

Router10(config)#interface GigabitEthernet 0/0
Router10(config-if)#ip nat inside
Router10(config-if)#exit
Router10(config)#interface GigabitEthernet 0/1
Router10(config-if)#ip nat outside
Router10(config-if)#exit
Router10(config)#access-list 10 permit 192.168.0.0 0.0.0.255
Router10(config)#ip nat pool natpool 172.16.0.2 172.16.0.4 netmask 255.255.255.248
Router10(config)#ip nat inside source list 10 pool natpool

8行目で172.16.0.2~172.16.0.4でアドレスプールを作成している。

NAPT(PAT)の設定

スクリーンショット 2025-09-04 164341.png

Router2の設定

Router2(config)#interface giga 0/0
Router2(config-if)#ip nat inside
Router2(config-if)#exit
Router2(config)#interface giga 0/1
Router2(config-if)#ip nat outside
Router2(config-if)#exit
Router2(config)#access-list 10 permit 192.168.20.0 0.0.0.255
Router2(config)#ip nat inside source list 10 interface GigabitEthernet 0/1 overload

NATテーブルの確認方法

NATが行われていた履歴は以下のコマンドで見ることができる。

#show ip nat translations

NATの統計情報の確認方法

NATの変換の統計情報は以下のコマンドで見ることができる。

#show ip nat statistics

参考

林口 裕志; 浦川 晃. シスコ技術者認定教科書 CCNA 完全合格テキスト&問題集[対応試験]200 -301. 株式会社 翔泳社.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?