cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
10029
Views
0
Helpful
20
Replies

Configuring DHCP & NAT

chrisblaze
Level 1
Level 1

I am trying to configure DHCP and NAT at home on my Cisco 870. Here are the steps I used to create my DHCP:

Router(config)# interface ethernet0/0

Router(config-if)#ip address 172.168.1.1 255.255.255.224

Router(config)# ip dhcp exclude-address 172.168.1.1 172.168.1.4

Router(config)# ip dhcp pool Home

Router(dhcp-config)# network 172.168.1.0 255.255.255.224

Router(dhcp-config)#default-router 172.168.1.1

Router(dhcp-config)exit

But I cant get NAT configured on my 871. Can someone give me a step by step instruction on how this is done. Thanks in advance.

20 Replies 20

So to configure my router for DHCP and NAT is this correct?

Router(config)# interface ethernet0/0

Router(config-if)#ip address 172.16.1.1 255.255.255.224

Router(config)# ip dhcp exclude-address 172.16.1.1 172.16.1.4

Router(config)# ip dhcp pool Home

Router(dhcp-config)# network 172.16.1.0 255.255.255.224

Router(dhcp-config)#default-router 172.16.1.1

Router(dhcp-config)exit

and then NAT:

router(config)# access-list 1 permit 172.16.0.0 0.0.255.255 (or should I use 0.0.0.0)

router(config)#ip nat inside source list 1 int f0/4 overload

router(config)#int f0/0

router(config-if)#ip nat inside

router(config-if)#int f0/4

router(config-if)#ip nat outside

I assume the ethernet0/0 and the fa 0/0 is a typo? This should work fine.

You access list 1 does not really matter a lot since you have no other possible addresses you are trying to exclude. You could just use a PERMIT ANY. If you wanted to be exacting you should use PERMIT 172.16.1.0 0.0.0.31

when I tried to configure DHCP on one of the interfaces (F0-3), I got the error "% IP addresses may not be configured on L2 links". Can someone explain what that means?

After googling that error, I find out that the 871 (along with other 8 series) has an intergrated switch built into it. Some of the people suggest creating Vlans and assigning IP addresses to the Vlan, will this work? Also how would this work with NAT. Im confused :(

Hello Chris,

Yes you have to create vlan interface and assign IP to make DHCP work in this case. It is not that confusing, here is an example

interface ethernet0/0

no ip address 172.16.1.1 255.255.255.224

interface Vlan 10

ip address 172.16.1.1 255.255.255.224

ip nat inside

interface Fa 0

switchport mode access

switchport access vlan 10

interface Fa 1

switchport mode access

switchport access vlan 10

interface Fa 2

switchport mode access

switchport access vlan 10

interface Fa 3

switchport mode access

switchport access vlan 10

Please do not forget to rate the posts with 4 or above grades if resolved your issue.

Regards

with your example I am using Vlan10 to direct all traffic out of F0/0 correct? Well the other ports still work if I connect something to it?

How will this effect my DHCP?

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: