- Posts: 59
- Thank you received: 0
static natting configure with example
13 years 5 months ago #37062
by sais
static natting configure with example was created by sais
can anyone give me configuration regarding static nat configuration.
in my dynamic nat . i create pool. i apply interface also.?
but in static am bit confused . so any one give me example with static nat config. for ex 2 public ip . ?
in my dynamic nat . i create pool. i apply interface also.?
but in static am bit confused . so any one give me example with static nat config. for ex 2 public ip . ?
13 years 5 months ago #37063
by S0lo
Studying CCNP...
Ammar Muqaddas
Forum Moderator
www.firewall.cx
Replied by S0lo on topic Re: static natting configure with example
Assuming here that your using a Cisco router. After defining the inside and outside interfaces offcourse. All you have to do is use the ip nat. somthing like this:
ip nat inside source static tcp 192.168.1.100 80 20.1.1.100 80
This is a static nat for a web server. 192.168.1.100 is the web server's inside private IP. 80 is the http port. 20.1.1.100 is the web server's public IP (the one people will type in the browser). 80 again is http port.
In English, the line above tells the router: "When ever a packet comes from the outside, requesting a connection to 20.1.1.100 with port 80. Then replace the IP whith 192.168.1.100, keep the 80 port the same, and send the packet inside to 192.168.1.100"
ip nat inside source static tcp 192.168.1.100 80 20.1.1.100 80
This is a static nat for a web server. 192.168.1.100 is the web server's inside private IP. 80 is the http port. 20.1.1.100 is the web server's public IP (the one people will type in the browser). 80 again is http port.
In English, the line above tells the router: "When ever a packet comes from the outside, requesting a connection to 20.1.1.100 with port 80. Then replace the IP whith 192.168.1.100, keep the 80 port the same, and send the packet inside to 192.168.1.100"
Studying CCNP...
Ammar Muqaddas
Forum Moderator
www.firewall.cx
13 years 5 months ago #37064
by sais
Replied by sais on topic Re: static natting configure with example
thank u ....... if have 5 public ip. then i have repeat above command 5 time is it.....
13 years 5 months ago #37066
by S0lo
Studying CCNP...
Ammar Muqaddas
Forum Moderator
www.firewall.cx
Replied by S0lo on topic Re: static natting configure with example
No, one IP and port per server. For example, you can use one IP to route traffic to web,FTP and Telnet servers all at the same time using only one IP.
Another way, you can map an IP without using a port, to a server. So each server will have separate public IP.
Another way, you can map an IP without using a port, to a server. So each server will have separate public IP.
Studying CCNP...
Ammar Muqaddas
Forum Moderator
www.firewall.cx
13 years 5 months ago #37067
by sais
ip nat inside source static tcp 192.168.1.100 23 20.1.1.100 23--telnet
ip nat inside source static tcp 192.168.1.100 21 20.1.1.100 21
ftp
ip nat inside source static tcp 192.168.1.100 20.1.1.100
ip nat inside source static tcp 192.168.1.101 20.1.1.101
no need to create pool: like we create in dynamic nat
ip nat pool name 1.1.1.1 1.1.1.4 netmask 248 for static or we should create................
Replied by sais on topic Re: static natting configure with example
ip nat inside source static tcp 192.168.1.100 80 20.1.1.100 80No, one IP and port per server. For example, you can use one IP to route traffic to web,FTP and Telnet servers all at the same time using only one IP.
Another way, you can map an IP without using a port, to a server. So each server will have separate public IP.
ip nat inside source static tcp 192.168.1.100 23 20.1.1.100 23--telnet
ip nat inside source static tcp 192.168.1.100 21 20.1.1.100 21
ftp
ip nat inside source static tcp 192.168.1.100 20.1.1.100
ip nat inside source static tcp 192.168.1.101 20.1.1.101
no need to create pool: like we create in dynamic nat
ip nat pool name 1.1.1.1 1.1.1.4 netmask 248 for static or we should create................
13 years 5 months ago #37069
by S0lo
The above is correct.
loose the tcp in this case, like this:
ip nat inside source static 192.168.1.100 20.1.1.100
ip nat inside source static 192.168.1.101 20.1.1.101
And yes, you don't need to create a pool like in dynamic nat.
Studying CCNP...
Ammar Muqaddas
Forum Moderator
www.firewall.cx
Replied by S0lo on topic Re: static natting configure with example
ip nat inside source static tcp 192.168.1.100 80 20.1.1.100 80
ip nat inside source static tcp 192.168.1.100 23 20.1.1.100 23--telnet
ip nat inside source static tcp 192.168.1.100 21 20.1.1.100 21
ftp
The above is correct.
ip nat inside source static tcp 192.168.1.100 20.1.1.100
ip nat inside source static tcp 192.168.1.101 20.1.1.101
loose the tcp in this case, like this:
ip nat inside source static 192.168.1.100 20.1.1.100
ip nat inside source static 192.168.1.101 20.1.1.101
And yes, you don't need to create a pool like in dynamic nat.
Studying CCNP...
Ammar Muqaddas
Forum Moderator
www.firewall.cx
Time to create page: 0.141 seconds