You are not logged in.
I'd like to be able to specify a static ip address and get the remaining stuff (dns, gateway, and whatever) from dhcp. It this possible?
Offline
I know that there is an option for network-manager to get only the addres from DHCP but I think there's nothing for what you want.
I'm not sure what you want to do. Do you have changing DNS servers and gateways?
If you have control over the DHCP server you could do that by static DHCP (your pc gets the same address every time based on the MAC address). If the DHCP server is running on a router you often don't have this as option (directly).
Other possibility is to get everything from DHCP and then change your IP address manually or with a script.
Offline
I know that there is an option for network-manager to get only the addres from DHCP but I think there's nothing for what you want.
I'm not sure what you want to do. Do you have changing DNS servers and gateways?If you have control over the DHCP server you could do that by static DHCP (your pc gets the same address every time based on the MAC address). If the DHCP server is running on a router you often don't have this as option (directly).
Other possibility is to get everything from DHCP and then change your IP address manually or with a script.
Changing the ip address afterwards is an idea. I've been with my ISP for a long time and they have changed the addresses of the DNS servers.
Being able to specify just a static network interface address seems like a useful thing to me in a home environment; I want a static address so I can easily ssh to the machine, and the other stuff, DNS, gateway, etc. I can let DHCP set up.
Offline
For a home environment, why do you not just set the router up to always assign the same address to specific, known machines? That is what I do.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
you could try to use a --static parameter for dhcpcd or --inform.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
For a home environment, why do you not just set the router up to always assign the same address to specific, known machines? That is what I do.
I checked, mine doesn't provide that option. That would be ideal. The best mine does is let you specify the low end starting point, which I've set to 8.
Offline
wudu wrote:I know that there is an option for network-manager to get only the addres from DHCP but I think there's nothing for what you want.
I'm not sure what you want to do. Do you have changing DNS servers and gateways?If you have control over the DHCP server you could do that by static DHCP (your pc gets the same address every time based on the MAC address). If the DHCP server is running on a router you often don't have this as option (directly).
Other possibility is to get everything from DHCP and then change your IP address manually or with a script.Changing the ip address afterwards is an idea. I've been with my ISP for a long time and they have changed the addresses of the DNS servers.
Being able to specify just a static network interface address seems like a useful thing to me in a home environment; I want a static address so I can easily ssh to the machine, and the other stuff, DNS, gateway, etc. I can let DHCP set up.
Are you saying that you want to set a static Public IP address on the interface that connects to your home ISP? Like, your ISP changes your public IP address which makes it hard to ssh back home.
If this is the problem you are trying to solve, you would be better off just buying like a .info domain for $2 and setting up Dynamic DNS. I find Hurricane Electric to be a good DNS host. They will let you add Dynamic A records. Then you just set a cron job to update the dns records like every 30min's to be sure it is always correct.
With this promo code from the Linux Action Show you will save 35% off your order of the domain.
http://www.godaddy.com/?isc=go35off3
Free DNS host (these guys are a global Internet backbone provider)
https://dns.he.net
Last edited by hunterthomson (2013-03-24 11:00:37)
OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec
Offline
Are you saying that you want to set a static Public IP address on the interface that connects to your home ISP? Like, your ISP changes your public IP address which makes it hard to ssh back home.
No, not a public ip address. I just want to avoid having to open a browser window on my pc to look at my Linksys router's dhcp clients list in order to see which address to use to ssh to the linux box.
I'm using a static ip address now, but I see no reason for my having to specify the dns, gateway, etc. stuff when the router provides that via dhcp.
Last edited by lumpynose (2013-03-26 00:42:28)
Offline
you could try to use a --static parameter for dhcpcd or --inform.
Did you try this? I don't have a dhcp server here so I can't test.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
Not yet. I spent all day yesterday trying to get it working with wireless.
Offline
Are you saying that you want to set a static Public IP address on the interface that connects to your home ISP? Like, your ISP changes your public IP address which makes it hard to ssh back home.
No, not a public ip address. I just want to avoid having to open a browser window on my pc to look at my Linksys router's dhcp clients list in order to see which address to use to ssh to the linux box.
I'm using a static ip address now, but I see no reason for my having to specify the dns, gateway, etc. stuff when the router provides that via dhcp.
Okay.
If the dhcp request dose not end up working out. You may also want to consider that your ISP's DNS probably sucks anyway. I don't see any reason to fight against the current. Use Google's public anycast DNS service 8.8.8.8 and 8.8.4.4 Also, DHCP is slower then static configuration, so there is yet another benefit to not using DHCP.
If you really have your hart set on using DHCP for DNS then you will have to run your own DHCP server. Then you will have no problem configuring it to always give the same IP to the same MAC addresses. You can still use your wireless router. You just disable the DHCP server on it. Then if you don't have a home server, you can buy a Raspberry pi for like $35 and also use it for other things.
Last edited by hunterthomson (2013-03-27 00:55:24)
OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec
Offline