cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
8130
Views
0
Helpful
12
Replies

DHCP Host Problem

eschubauer
Level 1
Level 1

I have created a DHCP server with a router. I then created a switch that connections to the router. I have two hosts that connect to the switch. The first host obtained an IP address via DHCP. The second host will not obtain an IP address via DHCP server and says the DHCP server cannot be found. Why is this happening?

I have included my GNS3 file and screenshot of the topology. Any thoughts?

1 Accepted Solution

Accepted Solutions

Try to remove link and restart pc that not get ip 

Make sure to put speed and duplex on interface 

Also debuge ip dhcp traffic to see if any traffic reach ur router

View solution in original post

12 Replies 12

Hello,

I cannot open the Router you configured in GNS3, but check if the switchports on your switch connecting to the hosts are configured with 'spanning-tree portfast'...

Every switchport connecting to my hosts have been configured to spanning-tree portfast. Here's what happens.....

After adding a host to the switch I enter the console of the host. I enter "ip dhcp." Then it says it cannot reach the DHCP server.

Then I turn off the router, switch and hosts. I turn then back on. I then go into every console of each host and type "ip dhcp" and it finds an IP address via DHCP.

The problem occurs when I add hosts to the switch. Those newly added hosts cannot find the DHCP server until I turn off all of the devices and then turn all of them back on.

Thoughts anyone?

ALI ALMHDI
Level 1
Level 1

Nothing wrong with your configure as you do like this topology 

You say one pc get the IP second don't 

Did you use clouds connected to your pc ? Or you are used qume PC?

You can make sure everything is well by give the PC that not get ip static ip and ping the router if you can reach it just try to obtain from DHCP may be in simulations  this happens to you

The odd thing that happened was that I saved my project and exited. I went to lunch and came back re-opening the project via GNS3. I turned on all of the devices again and now PC2 is picking up a DHCP IP address. Maybe I wasn't being patient?

Earlier though I waited quite a while for it to pick up the DHCP and it never did.

So I added a third PC which is giving me the same problem. I decided to configure a static IP address abut when I try to ping the router/default gateway at 192.168.1.1 I am getting a "host (192.168.1.1) not reachable.

Try to remove link and restart pc that not get ip 

Make sure to put speed and duplex on interface 

Also debuge ip dhcp traffic to see if any traffic reach ur router

I was able to get all of my hosts to pick up an IP address via DHCP. I had to power down all of the devices and then turn everything back on. Then when I went from host (PC) to host and enabled DHCP, the clients found IP addresses via the DHCP server. Every time I add a host though I have to power down and re-config the hosts to obtain IP via DHCP.

I just have two questions for you. Am I configuring the speeds and duplex only on the router or do I do this for the switch too?

Hello,

since in GNS everything is virtual, I wonder if this is a GNS specific problem...

Either way, the link between your (Cisco) switch and router should be left to auto negotiation for speed and duplex, at least, that is what Cisco recommends...

I am starting to think the same thing. I noticed a few Cisco functions do not work with this program. Momentarily I am going to play with the speeds and duplex type.

Other than GNS3 do you recommend any other network topology programs that may be better? I am a student of the Cisco academy as well.

Honestly, GNS3 is by far the best (and free) simulator you can find. I guess you know about Packettracer...the link below has a few more...

http://www.9tut.com/free-router-simulators

I will probably stick with GNS3 then. I also have Packet Tracer but I found GNS3 to be more useful than Packet Tracer when doing certain functions. Thank you for the advice and I appreciate your time.

***Update***

Like I said when I turn off all of the devices and turn them back on the VPCS states it "Can't find the DHCP server" If I run the command:

ip dhcp

Then it finds an IP address again. Thoughts? Something on the startup? I still haven't played with the speeds or duplex settings yet. I do save the config on the hosts though after they have obtained an IP address via DHCP.

Hello,

can you post the config of the Corp router (for some reason I cannot load the running config in your GNS file)...

R1#show run
Building configuration...

Current configuration : 1429 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
no ip icmp rate-limit unreachable
ip cef
!
!
ip tcp synwait-time 5
ip dhcp excluded-address 192.168.1.1 192.168.1.2
!
ip dhcp pool CORP1
   network 192.168.1.0 255.255.255.0
   default-router 192.168.1.1
   lease infinite
!
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
 description Link to SW1
 ip address 192.168.1.1 255.255.255.0
 duplex auto
 speed auto
!
interface Serial0/0
 no ip address
 shutdown
 clock rate 2000000
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/1
 no ip address
 shutdown
 clock rate 2000000
!
interface Serial0/2
 no ip address
 shutdown
 clock rate 2000000
!
interface Serial0/3
 no ip address
 shutdown
 clock rate 2000000
!
interface Serial0/4
 no ip address
 shutdown
 clock rate 2000000
!
interface Serial0/5
 no ip address
 shutdown
 clock rate 2000000
!
interface FastEthernet1/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
ip classless
!
no ip http server
no ip http secure-server
!
no cdp log mismatch duplex
!
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
end

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:

Review Cisco Networking products for a $25 gift card