Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Setting static IPs: desktops/laptops [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6656
Location: The soundosphere

PostPosted: Mon Jan 19, 2009 4:36 pm    Post subject: Setting static IPs: desktops/laptops [SOLVED] Reply with quote

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
View user's profile Send private message
fiolj
n00b
n00b


Joined: 17 Mar 2008
Posts: 45
Location: Bariloche, Argentina

PostPosted: Mon Jan 19, 2009 6:10 pm    Post subject: The problem could be in NetworkManager Reply with quote

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
View user's profile Send private message
danomac
l33t
l33t


Joined: 06 Nov 2004
Posts: 881
Location: Vancouver, BC

PostPosted: Mon Jan 19, 2009 6:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Mon Jan 19, 2009 6:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Mon Jan 19, 2009 6:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 874

PostPosted: Mon Jan 19, 2009 6:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Mon Jan 19, 2009 11:00 pm    Post subject: Reply with quote

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
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6656
Location: The soundosphere

PostPosted: Thu Jan 22, 2009 3:30 pm    Post subject: Reply with quote

My router does indeed dynamically hand out IPs starting at 100, so I simply set the desktop machines I need at fixed addresses at numbers under 100. I'll let the wireless laptops grab whatever's available from DHCP. Easy peasy!

Thank you, everyone. :D
_________________
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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum