static IP, DNS through DHCP?

S

stevenkobes

Sorry if this is a FAQ, or if I'm not making any sense...

I have a PC running XP Pro. I want it to have a static IP address, but
get its DNS servers from my router using DHCP. Why does Windows
gray-out the option to "Obtain DNS server address automatically" in the
TCP/IP Properties dialog when I select the static IP option above it?

Thanks,
Steve
 
S

Steve Winograd [MVP]

Sorry if this is a FAQ, or if I'm not making any sense...

I have a PC running XP Pro. I want it to have a static IP address, but
get its DNS servers from my router using DHCP. Why does Windows
gray-out the option to "Obtain DNS server address automatically" in the
TCP/IP Properties dialog when I select the static IP option above it?

Thanks,
Steve

When you select the static IP option, you're telling Windows not to
contact a DHCP server. That prevents it from getting DNS server
addresses from DHCP.

Here are two possible solutions:

1. Many home broadband routers act as DNS servers, so that you can
assign the router's LAN IP address as the computer's DNS server
address.

2. See if your router has a "static DHCP" option, which tells it to
always assign the same, fixed IP address to a particular computer. My
D-Link DI-604 has that option, based on the MAC address of the
computer's network adapter.
--
Best Wishes,
Steve Winograd, MS-MVP (Windows Networking)

Please post any reply as a follow-up message in the news group
for everyone to see. I'm sorry, but I don't answer questions
addressed directly to me in E-mail or news groups.

Microsoft Most Valuable Professional Program
http://mvp.support.microsoft.com
 
Q

q_q_anonymous

Sorry if this is a FAQ, or if I'm not making any sense...

I have a PC running XP Pro. I want it to have a static IP address, but
get its DNS servers from my router using DHCP. Why does Windows
gray-out the option to "Obtain DNS server address automatically" in the
TCP/IP Properties dialog when I select the static IP option above it?

Thanks,
Steve

'cos when you tell it you don't want an IP add automatically, it thinks
you don't want DHCP, hence don't want DNS server addresses automaticaly
either.

You haven't said whether you're behind a 'home router' i.e. with NAT

Why don't you Look at what DNS addresses you are given automatically.
And write them down. Or, call your ISP and get the addresses of them.

Then tell windows you'll assign your own IP address. Type in the DNS
server addresses manually, according to what your ISP gives you. Or
according to what you've seen DHCP give you. (ipconfig /all will show
them)

Besides. I don't think typing in an IP is getting what you want.
Because
a)if your computer is behind a NATTING 'home router', your comp needs a
Private IP. That is not seen on the internet anyway. The IP seen on the
internet is your router's public IP.
b)if your comp is not behind a NATTING 'home router', e.g. it's using a
Broadband PCI DSL Modem, then you'll have to be assigned an IP. If you
try to give yourself an IP then that's naughty, and fireworks might go
off. I just tried it with a dial up account, it said my IP was
rejected by the server!


As the MVP said, maybe a static DHCP option or whatever exists.

Maybe you can just Stay connected. Then your IP won't change.

Maybe there are other ways to do what you want to do, even when your IP
changes.
If you want to run a server then maybe this thing will help (seems
free)
https://www.dyndns.com/services/dns/dyndns/
Looking at it, it seems that it lets you have a domain, and its DNS
service works for whatever your current IP is. so, domain + a kind of
dynamic dns. I'm no expert though.
 
S

stevenkobes

Steve said:
When you select the static IP option, you're telling Windows not to
contact a DHCP server. That prevents it from getting DNS server
addresses from DHCP.

Here are two possible solutions:

1. Many home broadband routers act as DNS servers, so that you can
assign the router's LAN IP address as the computer's DNS server
address.

2. See if your router has a "static DHCP" option, which tells it to
always assign the same, fixed IP address to a particular computer. My
D-Link DI-604 has that option, based on the MAC address of the
computer's network adapter.

Thanks for the response. I have a Linksys WRT54GS, and unfortunately
it can't do IP address reservations as far as I can tell. So I need to
have a static private IP on the PC since it's running a web server
(with the router forwarding certain ports to it).

I tried using the router's private IP as the DNS server, and that sort
of worked but caused major performance degradation (nslookup times out
about half the time). Why would that happen?

I set the DNS server addresses on the PC to the addresses my router got
(by DHCP) from my ISP. It's nice and fast again, but what if my ISP
changes their DNS servers? I'd rather get them dynamically than
hard-code them. But perhaps that's just not possible given my
equipment and setup...
 
S

stevenkobes

You haven't said whether you're behind a 'home router' i.e. with NAT

Yes, I am behind a NAT. The PC has a static LAN IP (192.168.0.101) so
the router can forward ports to it. (See my response to Steve W.)
Why don't you Look at what DNS addresses you are given automatically.
And write them down. Or, call your ISP and get the addresses of them.

That's what I'm doing for now, I was just hoping there was a better
way.
If you want to run a server then maybe this thing will help (seems
free)
https://www.dyndns.com/services/dns/dyndns/

Yeah, actually I use FreeDNS for that (http://freedns.afraid.org/), it
looks like the same kind of thing.

Steve
 
S

Steve Winograd [MVP]

Thanks for the response. I have a Linksys WRT54GS, and unfortunately
it can't do IP address reservations as far as I can tell. So I need to
have a static private IP on the PC since it's running a web server
(with the router forwarding certain ports to it).

I tried using the router's private IP as the DNS server, and that sort
of worked but caused major performance degradation (nslookup times out
about half the time). Why would that happen?

I set the DNS server addresses on the PC to the addresses my router got
(by DHCP) from my ISP. It's nice and fast again, but what if my ISP
changes their DNS servers? I'd rather get them dynamically than
hard-code them. But perhaps that's just not possible given my
equipment and setup...

I'm sorry, but I don't know why using the router's private IP as the
DNS server causes performance degradation.

I don't think that your ISP is likely to change its DNS server
addresses. I agree that setting the computer to use them is the best
available solution.
--
Best Wishes,
Steve Winograd, MS-MVP (Windows Networking)

Please post any reply as a follow-up message in the news group
for everyone to see. I'm sorry, but I don't answer questions
addressed directly to me in E-mail or news groups.

Microsoft Most Valuable Professional Program
http://mvp.support.microsoft.com
 
Q

q_q_anonymous

Yes, I am behind a NAT. The PC has a static LAN IP (192.168.0.101) so
the router can forward ports to it. (See my response to Steve W.)


That's what I'm doing for now, I was just hoping there was a better
way.

though if at the moment you've got a dynamic ip then I guess you may as
well do as you wanted and get DNS adds dynamically.

Given no static ip option from your current isp or from your router.

Maybe there's some router with that option. though i'm not familiar
with that option..

A definite option is to "Migrate" to an ISP that offers a static ip
add.

Migration in terms of ISPs - in the UK - is when you change seamlessly
from one ISP to another with no gap in service. You just have to call
them to make sure they cancelled your payments cos that's not
necessarily automatic!
You call the former ISP and get a migration code, which you give to the
latter ISP.
The former and latter must support 'migration'

static IPs can't be so uncommon. Even in the backwards UK, I changed to
a more reliable ISP(zen), and my IP appears to be static. I wasn't even
looking for one.

They must be quite common. If they are in the UK, they surely are in
the US.
Yeah, actually I use FreeDNS for that (http://freedns.afraid.org/), it
looks like the same kind of thing.

thanks for the link
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top