Name

ip nat — interface

Synopsis

ip nat {inside | outside} [log {translations syslog}]
no ip nat {inside | outside} [log {translations syslog}]

Configures

IP Network Address Translation (NAT)

Default

Disabled

Description

This command configures an interface for NAT. The translation can occur for inside or outside addresses.

Example

In the following configuration, ethernet0 is our internal network with the internal IP address; serial0 is our external interface to the Internet. The NAT translation should be inside on ethernet0 and outside on serial0. The optional log command enables NAT logging. translations enables NAT logging translation. The syslog keyword enables syslog logging for NAT.

interface ethernet0
  ip address 10.10.1.1 255.255.255.0
  ip nat inside
interface serial0
  ip address 192.168.1.1 255.255.255.0
  ip nat outside

Get Cisco IOS in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.