cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1206
Views
18
Helpful
10
Replies

Router configuration help for NAT and DHCP

utawakevou
Level 4
Level 4

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 10

Roberto Salazar
Level 8
Level 8

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
Level 4
Level 4

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.

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

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 ?

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.

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

skhawari83
Level 1
Level 1

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

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

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

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

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: