NAT examples


NAT and PAT

Use below topology for the following examples

nat_examples

NAT Static

R2(config)#ip nat inside source static [Inside local IP address] [Inside global IP address]

R2(config)#in f0/0
R2(config-if)#ip address [ip address] [subnet mask]
R2(config-if)#ip nat inside

R2(config)#in s0/0
R2(config-if)#ip address [ip address] [subnet mask]
R2(config-if)#ip nat outside

NAT Dynamic

R2(config)#ip nat pool [pool name] [address range] netmask [network address mask]
R2(config)#ip nat inside source list [list #] pool [name of nat-pool]

R2(config)#in f0/0
R2(config-if)#ip address [ip address] [subnet mask]
R2(config-if)#ip nat inside

R2(config)#in s0/0
R2(config-if)#ip address [ip address] [subnet mask]
R2(config-if)#ip nat outside

R2(config)#access-list [same list # used above] permit [ip address] [wildcard mask]

PAT

R2(config)#in f0/0
R2(config-if)#ip address [ip address] [subnet mask]
R2(config-if)#ip nat inside

R2(config)#in s0/0
R2(config-if)#ip address [ip address] [subnet mask]
R2(config-if)#ip nat outside

R2(config)#ip nat inside source list [list #] interface s0/0 overload

R2(config)#access-list [list #] permit [network address] [subnet mask]
R2(config)#access-list [list #] permit [network address] [subnet mask]

Enjoy!

Tom