Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Static IP resets on boot [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
kenny_w
Tux's lil' helper
Tux's lil' helper


Joined: 26 Nov 2017
Posts: 83
Location: Toronto, Canada

PostPosted: Tue Dec 12, 2017 6:07 pm    Post subject: Static IP resets on boot [Solved] Reply with quote

Hi everybody, new user to Gentoo here. I just installed Gentoo & networkmanager +nm-applet & set a static IP in the GUI settings but for some reason every time I boot up its stuck at a different IP address...

How do I solve this? Do I have to disable some other non-gui networking program that is setting the IP address upon boot-up?


Last edited by kenny_w on Tue Dec 12, 2017 9:51 pm; edited 1 time in total
Back to top
View user's profile Send private message
lwlvl
n00b
n00b


Joined: 12 Dec 2017
Posts: 7
Location: Hamburg (Germany)

PostPosted: Tue Dec 12, 2017 7:23 pm    Post subject: Reply with quote

Hey Kenny,
on what type of IP does it "get stuck"?
169.x.x.x or 192.168.x.x?

169.x.x.x means, that there was neither a static configuration nor an successful DHCP-config.
192.168.x.x means, the interface was configured by DHCP (I would leave it this way and simply give the computer a fixed address in the DHCP-Server/Router)

Regards,
Jan
Back to top
View user's profile Send private message
kenny_w
Tux's lil' helper
Tux's lil' helper


Joined: 26 Nov 2017
Posts: 83
Location: Toronto, Canada

PostPosted: Tue Dec 12, 2017 8:05 pm    Post subject: Reply with quote

lwlvl wrote:
Hey Kenny,
on what type of IP does it "get stuck"?
169.x.x.x or 192.168.x.x?

169.x.x.x means, that there was neither a static configuration nor an successful DHCP-config.
192.168.x.x means, the interface was configured by DHCP (I would leave it this way and simply give the computer a fixed address in the DHCP-Server/Router)

Regards,
Jan


its 192.168.1.100, I set it to 28 but when I boot its on .100, if I click disconnect and then connect it will go back to 28.
The interface was configured by DHCP? Ok, so how do I make it not do that? I have networkmanager and nm-applet installed

I wanna be able to change my IP or network connections without having to go into a config file. I'd like to disable whatever is doing this DHCP thing because I assume I don't really need it on since I have networkmanager & nm-applet
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7195
Location: Saint Amant, Acadiana

PostPosted: Tue Dec 12, 2017 8:28 pm    Post subject: Reply with quote

What does rc-status print?
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43557
Location: 56N 3W

PostPosted: Tue Dec 12, 2017 8:29 pm    Post subject: Reply with quote

kenny_w,

You probably don't want a static IP unless the system is only ever connected to one network.
Things break horribly when you have two systems with the same IP.
DHCP makes sure that doesn't happen.

It sounds like you have several things trying to control your network interface.
That will all end in tears too.

Disable daemons and applications that control network interfaces until you don't get an IP address at boot.
When that happens, they are all disabled.
Now start exactly one.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
kenny_w
Tux's lil' helper
Tux's lil' helper


Joined: 26 Nov 2017
Posts: 83
Location: Toronto, Canada

PostPosted: Tue Dec 12, 2017 9:38 pm    Post subject: Reply with quote

NeddySeagoon wrote:
kenny_w,

You probably don't want a static IP unless the system is only ever connected to one network.
Things break horribly when you have two systems with the same IP.
DHCP makes sure that doesn't happen.

It sounds like you have several things trying to control your network interface.
That will all end in tears too.

Disable daemons and applications that control network interfaces until you don't get an IP address at boot.
When that happens, they are all disabled.
Now start exactly one.


Ok, but HOW? I don't understand how to disable this thing... all I have is networkmanager & nm-applet, how do I disable the one that gentoo comes with???????????
That's what I'm asking.. I don't know what daemon its using!

and I can change it from a static IP to an auto-DHCP in one click with nm-applet, that's why I like networkmanager+nm-applet!


Code:

Runlevel: default
 NetworkManager                                                                                                                         [  started  ]
 net.enp4s0                                                                                                                             [  started  ]
 net.eth0                                                                                                                               [  stopped  ]
 netmount                                                                                                                               [  stopped  ]
 xdm                                                                                                                                    [  started  ]
 syslog-ng                                                                                                                              [  started  ]
 sshd                                                                                                                                   [  started  ]
 local                                                                                                                                  [  started  ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed/wanted
 dbus                                                                                                                                   [  started  ]
 xdm-setup                                                                                                                              [  started  ]
 modules-load                                                                                                                           [  started  ]
Dynamic Runlevel: manual


Edit: oooooooooh, its net.eth0 / net.enp4s0
I forgot this was a thing I added to OpenRC while installing Gentoo, thanks a bunch guys! Its been solved!

How do I mark this thread as solved? Do these forums not work like that?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43557
Location: 56N 3W

PostPosted: Tue Dec 12, 2017 9:49 pm    Post subject: Reply with quote

kenny_w,

Gentoo does not come with any network daemon. You have to configure it.

Edit the title in your first post to the topic. Add [solved] at the end.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
lwlvl
n00b
n00b


Joined: 12 Dec 2017
Posts: 7
Location: Hamburg (Germany)

PostPosted: Tue Dec 12, 2017 11:42 pm    Post subject: Reply with quote

Kenny, I agree to NeddySeagoon.
Having a static IP is only useful for a handfull of purposes.
Seems like your system is autoconfiguring the NIC via DHCP.
I would suggest to use that feature and give the machine a static dhcp-lease in your router.
This is normally done by adding the MAC-Address to the specific table.

As I don't use any additional GUI-Tools to configure my network, I can't help you further with them.

Conclusion: Use DHCP with static lease.

Regards,
Jan
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7195
Location: Saint Amant, Acadiana

PostPosted: Wed Dec 13, 2017 12:14 am    Post subject: Reply with quote

Install DHCP client and run it only to get a static address? Not what I call simple. And I like simple.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14060

PostPosted: Wed Dec 13, 2017 3:15 am    Post subject: Reply with quote

A DHCP reservation is less simple than statically configuring the client, but it has the advantage that it keeps the client system simple and moves all the complexity to the DHCP server. That makes it easier to administer a network with more than one computer, since the DHCP server is authoritative in address assignments. It also protects against IP address collisions if the client is ever moved elsewhere, as the new network can issue it a different address. Properly configured, this can also provide the other benefits of DHCP, such as keeping a single master list of DNS servers. If you configure the client statically, and your DNS administrator decides to move the DNS servers to new addresses, you must fix the configuration on every client that had been configured with the old addresses. With DHCP, you update the DHCP server configuration, and new addresses roll out with the next DHCP lease renewal.

All that said, I will agree that a client-side static configuration is the simplest to set up. You may pay for it later if your network becomes complicated. I prefer to pay the slight complexity cost up front with a DHCP reservation, rather than deal with a mess when the network grows to have so many client-side static addresses that management becomes complicated.
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