メインコンテンツまでスキップ

動的NATの構築

nat

  • R2のeth0/0の入力をすべて100.1.1.10から100.1.1.20までを変換してeth0/1へ流す

  • R1とR2の設定は静的NATのものを参照してください

ノードインターフェース役割IPアドレス
R1Eth0/0内部LAN側192.168.1.1/24
R3Eth0/0外部サーバー100.1.1.254/24

R1とR3の設定

; R1ルーターのIPアドレスを指定
enable
configure terminal
interface eth0/0
ip address 192.168.1.1 255.255.255.0
no shutdown
exit

; デフォルトルートの設定
ip route 0.0.0.0 0.0.0.0 192.168.1.2
; R3ルーターのIPアドレスを指定
enable
configure terminal
interface eth0/0
ip address 100.1.1.254 255.255.255.0
no shutdown
exit

R2ルーター

enable
configure terminal
interface eth0/0
ip address 192.168.1.254 255.255.255.0
ip nat inside
interface eth0/1
ip address 100.1.1.10 255.255.255.0
ip nat outside

dinamicNAT

enable 
configre terminal
ip nat pool dynamic1 100.1.1.10 100.1.1.20 netmask 255.255.255.0
ip nat inside source list 1 pool dynamic1