cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
10016
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

joseph.derrick
Level 1
Level 1

Hi,

Just to clarify some things here:

1. What is the interface used to connect to the external network ?

2. What is the interface used to connect to your LAN (home network) ?

If your answer to item 1 is eth0/0 then you probably should assign a private ip address to your internal network not unless you have some servers that needs to be accessed from the outside.

Thanks,

k0rg

Hello Christopher,

Here is a sample config for you. I am assuming you are using a dialer interface for outside interface. If you are not, switch dialer command in each line below with your outside interface

interface e0/0

ip nat inside

access-list 10 permit 172.168.1.0 0.0.0.31

ip nat inside source list 10 interface dialerx overload

interface dialerx

ip nat outside

Regards

The dailer is what Im confused on. In class we never had a router that used a dailer. Is the "dailerx" the interface I have to use?

Christopher,

This interface is generally used to dial ISP and/or provide username&password. It is a vitual interface and usually is bind to an ATM (PPPOA) or an ethernet (PPPOE) interface. The 8xx series are usually used for terminating internet connection in the ways I mentioned above, thats why I advised a config that contains dialer interface.

Please post your full config, and tell us what you exactly want to achieve. If it is a simple NAT to learn NAT in class, you dont need dialer interface.

Regards

I will be using my 870 at home to pratice configuring routers. So I guess I just want to setup a simple NAT configuration.

While I dont have the router in front of me, the only problems I have is configuring DHCP and NAT. I think I have DHCP done (except I want to assign IP by MAC Address) but I was confused on the NAT.

Please tell us more about the practise you are in right now, and a basic info about the practise lab (what connected to which interface etc), so we will be able to make more stable suggestions on where and how to perform NAT.

Well this isnt really a pratice lab, its a Cisco 870 I bought for home use to keep me up to date. Im going to have about 6 devices connected to it through a switch.

sorry it suppose to be a private address 172.16 instead of 172.168, my typo.

So will these clients connect internet via that router? Is that why you need NAT? You said that you had confusion in NAT part, I am trying to understand where do you want to NAT.

Yes these client will connect to the internet so I know that I have to use NAT Overload, but I dont know how to implement it on the 871.

Hi Chris,

Please give us an information of what do you want to achieve and the current interfaces and to which interfaces are these users.

This will allow us to give a precise answer to your inquiry.

Thanks,

k0rg

chrisblaze
Level 1
Level 1

how does this NAT config look:

router(config)#ip nat inside source static 172.16.1.1 76.86.132.210

router(config)int f0/0

router(config-if) ip nat inside

router(config-if)int f0/4

route(config-if) ip nat outside

or do is this configuration correct:

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

Your latest config will translate 172.16.0.0/16 network to interface IP of f0/4 if traffic is destined to a network or gateway connected to f0/4. If this is what you want, config is correct. If you have other networks connected to f0/0 than 172.16.0.0/16, then you can use 0.0.0.0 to include all trafic into translation.

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:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco