View previous topic :: View next topic |
Author |
Message |
audiodef Watchman
Joined: 06 Jul 2005 Posts: 6656 Location: The soundosphere
|
Posted: Mon Jan 19, 2009 4:36 pm Post subject: Setting static IPs: desktops/laptops [SOLVED] |
|
|
I need static IPs because of shared devices that need to be accessed consistently. I've figured out how to set static IPs on my Gentoo and Windows boxes. Now I need to set static IPs on my wireless laptops, which doesn't seem to work the same way. What do I do for those?
On the desktop machines, I can edit /etc/conf.d/net so it says:
Code: |
config_eth0=( "192.168.1.101 netmask 255.255.255.0 brd 192.168.1.255" )
routes_eth0=( "default via 192.168.1.1" )
|
and /etc/resolv.conf has the nameserver info. If I edit /etc/conf.d/net on a laptop, NetworkManager takes over /etc/resolv.conf and re-writes it every time, so with a manual IP entry such as the one above, it ends up with no nameserver info.
The bottom line is that the wireless laptops cannot dynamically grab an IP that's already been assigned to the desktop machines, should a laptop be turned on first. So I'm happy with whatever is necessary to make that happen. I think I even prefer to tell my router to reserve the IPs for my desktop machines and not give them out dynamically, espcially since I use my laptops elsewhere and doing it this way means I don't have to reconfigure anything when I'm not using my home network. I'm just not seeing where to do that, although I'm sure it can be done. I have a Linksys WRT-54G with firmware based on Alchemy-6.0-RC4a FBN Edition. _________________ decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Last edited by audiodef on Thu Jan 22, 2009 3:30 pm; edited 1 time in total |
|
Back to top |
|
|
fiolj n00b
Joined: 17 Mar 2008 Posts: 45 Location: Bariloche, Argentina
|
Posted: Mon Jan 19, 2009 6:10 pm Post subject: The problem could be in NetworkManager |
|
|
I may be wrong but last time I checked, NetworkManager had problems with static IPs. I used to use wicd for that. Or you can just set up your connection like the one in the desktop and stop NetworkManager. |
|
Back to top |
|
|
danomac l33t
Joined: 06 Nov 2004 Posts: 881 Location: Vancouver, BC
|
Posted: Mon Jan 19, 2009 6:11 pm Post subject: |
|
|
In the case of the dns servers being overwritten, use this in /etc/conf.d/net:
Code: |
dns_servers_wlan0="x.x.x.x"
|
and NetworkManager should put that in /etc/resolv.conf for you. |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Mon Jan 19, 2009 6:17 pm Post subject: |
|
|
Maybe I gonna sound dumb, but I set my static internal IP directly with my WRT54G.
I can assign a specific IP adress to a specific Mac Adress. |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Mon Jan 19, 2009 6:19 pm Post subject: |
|
|
in a browser http://192.168.1.1 should give access to the router and the router manual tell you log on and password.
seems these days that most routers come with xxx.xxx.xxx.1 for the router, xxx.xxx.xxx.1 to xxx.xxx.xxx.99 for fixed ip's, xxx.xxx.xxx.100 to xxx.xxx.xxx.254 for dynamic ip's.
assuming your linksys does this, reassigning your desktops to ip's in the range xxx.xxx.xxx.1 to xxx.xxx.xxx.99 and dhcp for the laptops may solve the problem. |
|
Back to top |
|
|
DawgG l33t
Joined: 17 Sep 2003 Posts: 874
|
Posted: Mon Jan 19, 2009 6:23 pm Post subject: |
|
|
you could:
-not use network manager
-make /etc/resolv.conf unwritable
-reserve a range for the fixed-ip-boxes in your dhcp-server
-do mac-based dhcp so the same box always gets the same adress and settings
GOOD LUCK! _________________ DUMM KLICKT GUT. |
|
Back to top |
|
|
cyrillic Watchman
Joined: 19 Feb 2003 Posts: 7313 Location: Groton, Massachusetts USA
|
Posted: Mon Jan 19, 2009 11:00 pm Post subject: |
|
|
If you had a DNS server on your local network, then you could access all your machines by name, instead of resorting to fixed IP hacks.
I use net-dns/dnsmasq on my home network, and it makes life easier for me.
EDIT : Actually, I am surprised your 3rd party router firmware doesn't provide a local DNS server ... |
|
Back to top |
|
|
audiodef Watchman
Joined: 06 Jul 2005 Posts: 6656 Location: The soundosphere
|
|
Back to top |
|
|
|