Pages

Showing posts with label NAT. Show all posts
Showing posts with label NAT. Show all posts

Assigning external IP address pool using dynamic NAT

In some cases, when you have more than one public IP address you may want to use dynamic allocation thereof to the local network computers can connect to the Internet. This is accomplished by configuring an IP address pool on the router that performs NAT.

The commands needed for this configuration are described below:

General configuration of NAT and public address pool
Router#configure terminal
Router(config)#access-list 15 permit 192.168.2.0 0.0.0.255
Router(config)#ip nat pool NATPOOL 172.16.1.100 172.16.1.150 netmask 255.255.255.0
Router(config)#ip nat inside source list 15 pool NATPOOL

Configuring the interface f0/0 (Internet)
Router(config)#interface FastEthernet 0/0
Router(config-if)#ip address 172.16.1.254 255.255.255.0
Router(config-if)#ip nat outside
Router(config-if)#exit

Configuring the interface f0/1 (Internal LAN)
Router(config)#interface FastEthernet 0/1
Router(config-if)#ip address 192.168.2.1 255.255.255.0
Router(config-if)#ip nat inside
Router(config-if)#exit

This is similar to the configuration required for a dynamic NAT with a single public IP address, with the only difference that it allows external devices to see more than one IP address on your network.

NAT pool example

Router(config)#ip nat pool NATPOOL 172.16.1.100 172.16.1.150 netmask 255.255.255.0
Router(config)#ip nat inside source list 15 pool NATPOOL

In the above commands, you can identify how you create the pool of public IP addresses and then how it is assigned to the NAT configuration line. In this case is no longer necessary overload keyword.

Read more

Basic Configuration of NAT in Cisco routers

In the basic configuration of NAT, all internal network computers will share the same IP address for the public interface. Cisco routers allow the NAT settings in a way quite simple.

NAT example

General Configuration of NAT (Access Control List)
--------------------------------------------
Router#configure terminal
Router(config)#access-list 90 permit 192.168.1.0 0.0.0.255
Router(config)#access-list 90 permit 192.168.2.0 0.0.0.255
Router(config)#ip nat inside source list 90 interface Ethernet0/0 overload 

Configuring the Interface F1/0 (LAN 1)
--------------------------------------------
Router(config)#interface FastEthernet1/0
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#ip nat inside
Router(config-if)#exit

Configuring the Interface F1/0 (LAN 2)
--------------------------------------------
Router(config)#interface FastEthernet1/1
Router(config-if)#ip address 192.168.2.1 255.255.255.0
Router(config-if)#ip nat inside
Router(config-if)#exit


Configuring the Interface F0/0 (Internet)
--------------------------------------------
Router(config)#interface FastEthernet0/0
Router(config-if)#ip address 172.16.10.1 255.255.255.252
Router(config-if)#ip nat outside
Router(config-if)#end
Router# 


In this example, the cisco router performs rewriting of the public IP address to all devices that are both internal networks (LAN1 and LAN2). When devices connect to computers on the Internet, they do appear with the IP address 172.16.10.1

The following command tells the router that will translate any address that matches the access control list 90. The router performs the translation of all devices with the address of the interface f0/0, or rather by the network interface connected to the public network.

Router(config)#ip nat inside source list 90 interface F0/0 overload

The overload keyword is not necessary to write because the router automatically configures the option.

The configuration or operation of NAT is confusing to some users because they usually relate to functions of a firewall.

Read more