cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5513
Views
5
Helpful
40
Replies

Need help with setting up IP routing and DHCP on packet tracer

V104
Level 1
Level 1

I am a beginner and I'm working with this packet tracer file, trying to practice DHCP and ip routing. These are very confusing topics to me so if anyone could help me figure out how to set this up and explain how it works that would be great. I attached the pkt file that I'm using.

40 Replies 40

Yes. And don’t forget the static route to get to the 172.16.9.0 network on R1

So I put "ip route 192.16.9.0 255.255.255.0 172.16.8.2" on R1, and then on R2 I put "ip route 10.19.8.0 255.255.255.0 g0/0/0" and I'm still unable to ping. Could there be something wrong somewhere else? Do I need to setup DHCP before the pings work or should they just work now?

I think you meant 172.16.9.0 255.255.255.0. Also make sure the sub interfaces have the helper address under each sub interface to reach the DHCP server.

 

interface GigabitEthernet0/0/1.10

description VLAN 10

encapsulation dot1Q 10

ip address 10.19.8.1 255.255.255.192

ip helper-address 172.16.9.9

ipv6 address FE80::1 link-local

ipv6 address 2001:DB8:ACAD:A::1/64

 

What are you pinging? From where to where? Make sure your clients are getting an IP address or they wont ping.

 

-David

Hm this is weird, I did all of that and still can't get pings to work. Here is what I get from the show ip route command, do you see anything weird in here?

 

R1 - 

"Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 6 subnets, 4 masks

C 10.19.8.0/26 is directly connected, GigabitEthernet0/0/1.10

L 10.19.8.1/32 is directly connected, GigabitEthernet0/0/1.10

C 10.19.8.64/27 is directly connected, GigabitEthernet0/0/1.20

L 10.19.8.65/32 is directly connected, GigabitEthernet0/0/1.20

C 10.19.8.96/29 is directly connected, GigabitEthernet0/0/1.30

L 10.19.8.97/32 is directly connected, GigabitEthernet0/0/1.30

172.16.0.0/16 is variably subnetted, 3 subnets, 3 masks

C 172.16.8.0/30 is directly connected, GigabitEthernet0/0/0

L 172.16.8.1/32 is directly connected, GigabitEthernet0/0/0

S 172.16.9.0/24 [1/0] via 172.16.8.2"

 

R2:

"Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

R 10.0.0.0/8 [120/1] via 172.16.8.1, 00:00:26, GigabitEthernet0/0/0

S 10.19.8.0/24 is directly connected, GigabitEthernet0/0/0

172.16.0.0/16 is variably subnetted, 4 subnets, 3 masks

C 172.16.8.0/30 is directly connected, GigabitEthernet0/0/0

L 172.16.8.2/32 is directly connected, GigabitEthernet0/0/0

C 172.16.9.0/24 is directly connected, GigabitEthernet0/0/1

L 172.16.9.1/32 is directly connected, GigabitEthernet0/0/1"

It looks like you have RIP running on R2 but not R1. I would take that off

 

no router rip

 

It advertises classful networks but you have the 10 network subnetted out. Do your clients have IP addresses from DHCP?

 

-David

I did no router rip and still not working. The PCs are set to use DHCP but right now it's not working so it says it's using APIPA.

edit: nvm it works now

I excluded the first 10 addresses earlier because i thought you had to do that, not exactly sure what that does though. I just undid it and it still doesn't work anyway.

 

edit: nvm it works now

 

nevermind I got it to work, I must've messed something up in that packer tracer earlier so I just opened a fresh one and put in the routes and it works. One more thing, how would you set up DHCP using a DHCP Pool instead of just putting the helper addresses in?

So say you wanted a dhcp pool of a /24 network with the first 10 addresses excluded from being given out, it would look like this

 

ip dhcp pool test
ip dhcp excluded-address 192.168.1.1 192.168.1.10 <-- this is the first 10 noted. This is a range. It will use the first and last address and everything in between and not give it out. You can create multiple excluded address ranges. This is done in GLOBAL config before you create the DHCP pool for each network you need to excluded addresses for. Then you go into DHCP configuration mode.


network 192.168.1.0 /24 (some IOS versions may not take / notation and you will have to write out the mask)
domain-name cisco.com
dns-server 192.168.1.5
default-router 192.168.1.1 <- default gateway clients will use to reach other networks. usually the interface IP of the router the clients use where you put the IP helper address
lease infinite

 

Some of these commands are optional. At a minimum I would configure the commands in bold. Just playing with the settings will help you learns the features. YOU would need one for each network. So if you wanted a DHCP pool for each of your sub interfaces you need 3 DHCP pools to hand them out.

 

Here is some CISCO documentation as well:

 

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr_dhcp/configuration/15-sy/dhcp-15-sy-book/config-dhcp-server.html#GUID-9DFE5A79-4529-4DD9-BB7B-CB46C10E9ABE

 

 

 

-David

 

 

I would use R2 to create the pools right?

I was going to include that in my original post. No you create the pools on the router with the hosts default gateways. So R1 would get 3 pools for the 10.19.8.0 network with their respective subnets. If hosts off of R2 need a DHCP pool then you would create theirs on R2. I created 1 DHCP pool for the g0/0/1.10 subinterface and shut down the link to R2. Then I did a release/renew on the client PC-PT Sales-A client and it pulled an IP from the pool I created.

 

You can verify with the show ip dhcp binding on R1 (or whatever router the pool is on)

 

ip dhcp excluded-address 10.19.8.1 10.19.8.10

!

ip dhcp pool test

network 10.19.8.0 255.255.255.192

default-router 10.19.8.1

!

 

Here is one pool I made for the first subnet on R1.

 

-David

When I set up that first one I got an error that said "%DHCPD-4-PING_CONFLICT: DHCP address conflict: server pinged 10.19.8.1." Can I just ignore that or is something wrong?

It means it pinged and found that address before it gave it out which means it’s available in the pool? Did you configure excluded addresses before creating the pool?

 

That address is the sunbInterface  IP. Refer to my example above. You have to excluded addresses you don’t want handed out to include those already in use. This is don’t in global config mode. Then you create the dhcp pool also showed above 

Ah yeah I forgot to do the excluded addresses. Just put that in

That’s fine. It’s not required.