NAT with Route Maps

REFERENCE

IP Addressing Services Command Reference
ip nat inside source

MEMO

条件に応じてNATを使い分ける

  • R2のloopback が送信元でR2-R3のリンクから出る時は155.1.23.200に変換
  • R2のgi1/0.2が送信元でR2-R3のリンクから出る時はR2のインタフェースのアドレスに変換
ip access-list standard ADDRESS-LB
  permit 150.1.2.2
ip access-list standard ADDRESS-G2
  permit 155.1.2.2

route-map MAP-LB permit 10
  match ip add ADDRESS-LB
  match int gi1/0.23

route-map MAP-G2 deny 10 別ルートマップ条件を除外
  match ip add ADDRESS-LB
  match int gi1/0.23
route-map MAP-G2 permit 20
  match ip add ADDRESS-G2
  match int gi1/0.23

ip nat pool POOL 155.1.23.200 155.1.23.200 prefix-length 24
ip nat inside source route-map MAP-LB pool POOL overload

ip nat inside source route-map MAP-G2 int gi1/0.23 overload

コメント