Share via


static ip works dhcp Assigned IP not work

Question

Friday, July 18, 2014 9:21 AM

environment:

1. D-link 7100 router provide internet service. DHCP enabled from 192.168.0.140 to 192.168.0.240

2. A DC setup to provide DNS and DHCP, server IP192.168.0.10. DHCP enabled from 192.168.0.20 to 192.168.0.100

3. a normal switch connect the router and DC. 

3. Client by default will get IP from DHCP (DC server) .

problem:

some computer got the IP from DHCP server but can't ping through the router, but if you change to manual Ip address it will work, or after restart the router also works. 

so any ideas? thanks a lot. 

Misnotm

All replies (12)

Friday, July 18, 2014 3:29 PM âś…Answered

Hello,

if all clients use the router also as Default Gateway, that is your problem with domain machines.

Default Gateway . . . . . . . . . : 192.168.0.1
DNS Servers . . . . . . . . . . . : 192.168.0.1

In a domain is the DNS server essential for correct working machines. So in your case the DC/DNS server from the internal domain is the ONLY one that should be used as DNS server on the NIC off all machines, doesn't matter if DHCP is the server or the router.

And in the DNS management console on the DC you have to configure the FORWARDERS on the DNS server properties with your ISPs DNS server for example. After the required changes reboot clients and run ipconfig /flushdns and ipconfig /registerdns on the DC/DNS server and restart the NETLOGON service on the DC or reboot the DC(not needed as restarting the Netlogon service is enough).

Best regards

Meinolf Weber
MVP, MCP, MCTS
Microsoft MVP - Directory Services
My Blog: http://msmvps.com/blogs/mweber/

Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.


Friday, July 18, 2014 9:30 AM

Hi

Why are you using DHCP on the router and on the DC?

When your clients gets the Dynamic IP are they getting correct DNS and Gateway IP.

Thanks


Friday, July 18, 2014 9:38 AM

Hello,

please post an unedited ipconfig /all from a problem machine, so we can verify some settings.

And you should use only ONE DHCP server, especially if the scopes are the same. I can see no need to use the router DHCP, less options if compared with the Windows Server.

Best regards

Meinolf Weber
MVP, MCP, MCTS
Microsoft MVP - Directory Services
My Blog: http://msmvps.com/blogs/mweber/

Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.


Friday, July 18, 2014 9:43 AM

thanks for your quick response, 

1. the reason using DHCP on the router and the DC, just in case the DC is down, and client can still go to internet. 

2. the clients can get IP from DC Dhcp with correct DNS and router, and can ping DC Ip is works but ping router or gateway(router and gateway are the same IP) is not working. and in my domain environment  some machine they get ip from the DC dhcp works and can got online. 

3. but after I restart the D-link router, all current client will be working, but after a while some new client or after the dhcp expired, some computer not got online again. 

very strange. 

Misnotm


Friday, July 18, 2014 9:51 AM

If you have only few cilents then you might just want to use static IP on those machines and use the Primary dns as ur DC and secondary the ones your router use. As internet should work using secondary dns if the dc goes down.

Could you please post the IPCONFIG /ALL result here from a working and form a problem machine.


Friday, July 18, 2014 10:00 AM

 Connection-specific DNS Suffix  . :
 Description . . . . . . . . . . . : Intel(R) PRO/1000 MT Network Connection
 Physical Address. . . . . . . . . : 00-0C-29-5A-79-87
 DHCP Enabled. . . . . . . . . . . : Yes
 Autoconfiguration Enabled . . . . : Yes
 Link-local IPv6 Address . . . . . : fe80::cc5:26b7:24f7:d301%11(Preferred)
 IPv4 Address. . . . . . . . . . . : 192.168.0.63(Preferred)
 Subnet Mask . . . . . . . . . . . : 255.255.255.0
 Lease Obtained. . . . . . . . . . : Thursday, July 31, 2014 5:31:59 PM
 Lease Expires . . . . . . . . . . : Friday, August 08, 2014 8:30:42 PM
 Default Gateway . . . . . . . . . : 192.168.0.1
 DHCP Server . . . . . . . . . . . : 192.168.0.10
 DHCPv6 IAID . . . . . . . . . . . : 234884137
 DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-19-72-15-E9-00-0C-29-5A-79-87

 DNS Servers . . . . . . . . . . . : 192.168.0.1
 NetBIOS over Tcpip. . . . . . . . : Enabled

this is my current machine before it's not working after restart the router and it works now. 

I have more than 30 client and DHCP is better. 

Misnotm


Friday, July 18, 2014 10:11 AM

I think you are making clients confused to offer same range of IP's from two devices. The way DHCP works is DORA.

Discover

Offer

Request

Acknowledgement

When a client comes alive it sends a discover message for DHCP server and all the available DHCP server sends offers (That i am a DHCP Server) and then Client Request the IP from the first DHCP who wins the offers request. Then DHCP server acknowledge it and that IP gets registred against that client.

I think in your senario clients are getting confused. For a test purpose stop the DCHP distribution on the router if you DC goes down every thing will stop work any way. If you really worry about this you might want to make another machine a DHCP server and either spllit the scope or offer different scope.

Turn the dhcp scope on the router

on problem client/clients run this

Ipconfig /release

Ipconfig /renew

ipconfig /flushdns

so they get IP only from your DC.

Also what is the lease time for DHCP clients?

I am sure once you switch off DHCP on your router everthing should work fine.

Thanks


Friday, July 18, 2014 10:12 AM

The problem is every a few days some client may no internet and I have to restart the D-link router. one month ago, before I setup the domain and enabled Dhcp on DC, I use the D-link router as dhcp and this problem never happens. 

thanks. 

Misnotm


Monday, July 21, 2014 1:58 AM

I agree it's the DNS address is part of the issue.

Another thing is if the clients are Windows 7 or newer, then you have the NLA to deal with, and even if it may have a correct ipconfig, it may configure the network as unknown.

I've seen this with two separate IT companies that have called me with issues regarding this. If you use the server's DHCP and disable DHCP on the router, as suggested previously in this thread, the issue will disappear.

Here's more on the NLA and how it work.

Network Location Awareness (NLA) and how it relates to Windows Firewall Profiles
http://blogs.technet.com/b/networking/archive/2010/09/08/network-location-awareness-nla-and-how-it-relates-to-windows-firewall-profiles.aspx

Ace Fekay
MVP, MCT, MCSE 2012, MCITP EA & MCTS Windows 2008/R2, Exchange 2013, 2010 EA & 2007, MCSE & MCSA 2003/2000, MCSA Messaging 2003
Microsoft Certified Trainer
Microsoft MVP - Directory Services
Complete List of Technical Blogs: http://www.delawarecountycomputerconsulting.com/technicalblogs.php

This posting is provided AS-IS with no warranties or guarantees and confers no rights.


Tuesday, July 22, 2014 5:47 AM

Hi,

Please confirm you router configured TCP IP is same with your DHCP scope, it must your router assign the incorrect DNS server option to your client.

More information:

 How the Lease Process Works

http://technet.microsoft.com/en-us/library/cc958892.aspx

Hope this helps.

We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place.


Friday, July 25, 2014 6:52 AM

yes, thanks very much for all the replies, I think is the dns problem, I assigned the wrong dns by mistake, the dns should be 192.168.0.10. 

Misnotm


Sunday, July 27, 2014 12:10 AM

yes, thanks very much for all the replies, I think is the dns problem, I assigned the wrong dns by mistake, the dns should be 192.168.0.10. 

Misnotm

I'm happy to hear our suggestions helped and fixed the problem. 

Ace Fekay
MVP, MCT, MCSE 2012, MCITP EA & MCTS Windows 2008/R2, Exchange 2013, 2010 EA & 2007, MCSE & MCSA 2003/2000, MCSA Messaging 2003
Microsoft Certified Trainer
Microsoft MVP - Directory Services
Complete List of Technical Blogs: http://www.delawarecountycomputerconsulting.com/technicalblogs.php

This posting is provided AS-IS with no warranties or guarantees and confers no rights.