Router configuration help for NAT and DHCP

Unanswered Question
Jun 20th, 2006
User Badges:

Want the setup to be in such away that the router will be doing:


NAT, inside might be 10.1.1.1/24 and outside will be IP issued by ISP - 202.62.x.x

Router to also act as a DHCP server issuing out IP to a workshop participants.


Do you have a template/docs anywhere that might be of any help


Please let me know


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.5 (4 ratings)
Loading.
Roberto Salazar Tue, 06/20/2006 - 20:36
User Badges:
  • Gold, 750 points or more

The following sample config should be self explanatory, however, if you have any specific questions, fire away:

ip dhcp excluded-address 10.1.1.1 10.1.1.99

!

ip dhcp pool private

network 10.1.1.0 255.255.255.0

domain-name anydomain.net

default-router 10.1.1.1

dns-server x.x.x.x y.y.y.y

lease 3

!

!

!

!

!

!

interface Ethernet0

ip address 10.1.1.1 255.255.255.0

ip nat inside

!

interface Ethernet1

ip address dhcp hostname blah

ip nat outside


!

ip nat inside source list 1 interface Ethernet1 overload

!


access-list 1 permit 10.1.1.0 0.0.0.255



Please rate helpful posts.

leonvd79 Tue, 06/20/2006 - 20:57
User Badges:
  • Silver, 250 points or more

Hello utawakevou,


Here you have a sample configuration. I do not know what the pool size of your public is, so I used a class "C" in this example.


ip dhcp pool workshop-dhcp

network 10.10.1.0 255.255.255.0

domain-name myworkshop.com

dns-server 10.10.1.x

ip dhcp exclude-address 10.10.1.1

ip dhcp exclude-address 10.10.1.x


ip nat pool workshop-nat 202.62.123.2 202.62.123.254 prefix-length 24

ip nat inside source list 1 pool workshop-nat


ip access-list standard 1

permit 10.10.1.0 0.0.0.255


interface FastEthernet 0/0

ip addr 10.1.1.1 255.255.255.0

ip nat inside


interface Serial 0/0

ip nat outside

202.62.123.1 255.255.255.0



Here are some helpful links to IOS configuration guides:


DHCP

http://www.cisco.com/univercd/cc/td/doc/product/software/ios124/124cg/hiad_c/ch10/index.htm


NAT

http://www.cisco.com/univercd/cc/td/doc/product/software/ios124/124cg/hiad_c/ch20/index.htm


HTH


--Leon


* Please rate posts.

leonvd79 Tue, 06/20/2006 - 21:45
User Badges:
  • Silver, 250 points or more

To avoid confusion, the configuration provided by bosalaza is for nat overloading, that is if you have a single public IP address.


If you want all hosts to have unique public IP address from a outside global perspective, the second solution will suit your needs.


Best of luck!


Leon

utawakevou Wed, 06/21/2006 - 13:10
User Badges:

I beleive this is what I need and thak you for that. We might be having one public IP issued by the ISP and about 30-40 private IP's for the workshop participants. As for the DNS, that will be a public one or a private one ?

Roberto Salazar Wed, 06/21/2006 - 14:53
User Badges:
  • Gold, 750 points or more

Usually, the ISP would provide you the ip addresses of their DNS but if you have DNS server, you can use that as well.


Please rate all posts.

utawakevou Wed, 06/21/2006 - 15:29
User Badges:

Thanks. That was what I was thinking of. I know the ISP DNS so I will use that one.

skhawari83 Wed, 03/01/2017 - 16:19
User Badges:

Did you manage to get this resolved. I want to setup something similar.

utawakevou Wed, 03/01/2017 - 16:42
User Badges:

Yes, it worked out and that was eleven years ago :)

skhawari83 Wed, 03/01/2017 - 17:05
User Badges:

Hehe. Do you mind sharing the running config please if available.

utawakevou Wed, 03/01/2017 - 18:40
User Badges:

Sorry, I don't have the running configuration as I told you that was 11 years ago. However I just follow the examples posted here. See if you can go through the examples on this thread and you should be good. Be good to draw things out first, allocate the IP address and subnets for your interface then you go ahead and configure it

Hope this helps

Actions

This Discussion