Procedure Configuring Network Address Translation Configuring Port Address Translation by Overloading an Interface Command or Action Purpose Step 1 enable Example: Switch> enable Enables privileged EXEC mode. Enter your password if prompted. Step 2 configure terminal Example: Switch# configure terminal Enters global configuration mode. Step 3 access-list access-list-number permit source [source-wildcard] Example: Switch(config)# access-list 1 permit 192.168.201.30 0.0.0.255 Defines a standard access list permitting those addresses that are to be translated. The access list must permit only those addresses that are to be translated.
(Note that there is an implicit “deny all” at the end of each access list.) Use of an access list that is too permissive can lead to unpredictable results. Step 4 ip nat inside source list access-list-number interface name overload Example: Switch(config)# ip nat inside source list 1 interface gigabitethernet0/0/2 overload Establishes dynamic source translation with overloading, specifying the access list defined in Step 3. Note For overloading, you can choose any Layer 3 interface that has a valid IP address and is in operational state. Step 5 interface type number Example: Switch(config)# interface gigabitethernet0/0/1 Specifies an interface and enters interface configuration mode.
Step 6 ip address ip-address mask [secondary] Example: Switch(config-if)# ip address 192.168.201.1 255.255.255.240 Sets a primary IP address for an interface. Step 7 ip nat inside Example: Switch(config-if)# ip nat inside Connects the interface to the inside network, which is subject to NAT. Step 8 exit Example: Switch(config-if)# exit Exits interface configuration mode and returns to global configuration mode. Configuring Network Address Translation 19