12-13-2016 08:04 AM - edited 03-08-2019 08:33 AM
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?
Solved! Go to Solution.
12-13-2016 09:24 PM
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
12-13-2016 09:23 AM
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'...
12-15-2016 08:00 AM
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?
12-13-2016 11:03 AM
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
12-13-2016 12:36 PM
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.
12-13-2016 09:24 PM
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
12-14-2016 05:28 AM
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?
12-14-2016 07:37 AM
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...
12-14-2016 07:40 AM
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.
12-14-2016 07:46 AM
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
12-14-2016 08:22 AM
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.
12-15-2016 08:18 AM
Hello,
can you post the config of the Corp router (for some reason I cannot load the running config in your GNS file)...
12-15-2016 08:41 AM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide