Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

Router configuration help for NAT and DHCP

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

10 REPLIES

Re: Router configuration help for NAT and DHCP

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.

Silver

Re: Router configuration help for NAT and DHCP

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.

Silver

Re: Router configuration help for NAT and DHCP

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

Community Member

Re: Router configuration help for NAT and DHCP

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 ?

Re: Router configuration help for NAT and DHCP

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.

Community Member

Re: Router configuration help for NAT and DHCP

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

Community Member

Did you manage to get this

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

Community Member

Yes, it worked out and that

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

Community Member

Hehe. Do you mind sharing the

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

Community Member

Sorry, I don't have the

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

539
Views
18
Helpful
10
Replies
CreatePlease to create content