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?

More than 1 year has passed since last update.

CiscoのNAPT(PAT)の設定

Last updated at Posted at 2022-01-29

Cisco Packet Tracerを使ってNAPT(PAT)ができるか検証がてら。
172.16.0.0/24の内側IPを10.0.0.1の外側IPに変換する。
napt.png

##OPGW(オンプレミス側ルータ)の設定

# 外側のIPアドレス
interface GigabitEthernet0/0/0
 ip address 10.0.0.1 255.255.255.252
 ip nat outside

# 内側のIPアドレス
interface GigabitEthernet0/0/1
 ip address 172.16.0.1 255.255.255.0
 ip nat inside

# 後述のaccess-list 1のIPアドレスの範囲をGig0/0/0のIPにNATする
ip nat inside source list 1 interface GigabitEthernet0/0/0 overload

# 宛先不明は全てGig0/0/0へ送出
ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0/0 

# NAPTする内側のIPアドレスの範囲
access-list 1 permit 172.16.0.0 0.0.0.255

##SVGW(サーバー側ルータ)の設定

# 外側のIPアドレス
interface GigabitEthernet0/0/0
 ip address 10.0.0.2 255.255.255.252

# 内側のIPアドレス
interface GigabitEthernet0/0/1
 ip address 192.168.1.1 255.255.255.0

PC0(172.16.0.2)とPC1(172.16.0.3)からSV(192.168.1.2)宛にPINGを投げてみる。
NATされているかの確認はshow ip nat translations で確認できる。
napt2.png

シミュレーションでSV到達時のPDUを確認すると、送信元が10.0.0.1となっており、正しくNATされているのが解る。
napt3.png

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?