Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] /etc/conf.d/net creating unwanted interface alias
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
-neX-
n00b
n00b


Joined: 29 Apr 2005
Posts: 40

PostPosted: Wed May 22, 2013 3:07 am    Post subject: [solved] /etc/conf.d/net creating unwanted interface alias Reply with quote

I think this might be something I missed in the install, but I've gone back over the amd64 handbook and I cannot figure out what it might be. Hoping someone else can spot my error.
So first off, here is the error that I'm getting when I bring up the interface.

Code:

# /etc/init.d/net.enp0s17 restart
 * Bringing up interface enp0s17
 *   192.168.1.110 ...
SIOCSIFADDR: File exists
SIOCSIFFLAGS: Cannot assign requested address
SIOCSIFBRDADDR: Cannot assign requested address
SIOCSIFFLAGS: Cannot assign requested address
mask: Unknown host
ifconfig: `--help' gives usage information.                                              [ !! ]
 * ERROR: net.enp0s17 failed to start


The funny thing was, the interface was actually coming up with the correct address, but the default route of 192.168.1.1 was not getting inserted into the route table, hence the SIO errors. As a result of the network script failing, sshd will not come up (but will if I hand it the --nodeps flag). The interface config looks like this:

Code:
modules_enp0s17="ifconfig"
config_enp0s17="192.168.1.110 broadcast 192.168.1.255 mask 255.255.255.0"
routes_enp0s17="default via 192.168.1.1"
dns_servers_enp0s17="4.2.2.1 4.2.2.2 8.8.8.8 8.8.4.4"


Eventually I ran a start of the interface in debug mode.

Code:

+ ifconfig enp0s17:1 192.168.1.110 broadcast 192.168.1.255 mask 255.255.255.0
SIOCSIFADDR: File exists
SIOCSIFFLAGS: Cannot assign requested address
SIOCSIFBRDADDR: Cannot assign requested address
SIOCSIFFLAGS: Cannot assign requested address
mask: Unknown host
ifconfig: `--help' gives usage information.
+ eend 1


Its trying to start up a sub-interface and failing there. Three is nothing in the net config that requests the setup of a subinterface (is there?). Like I mentioned, I think this is something I missed (probably something dumb).


Last edited by -neX- on Wed May 22, 2013 11:10 am; edited 1 time in total
Back to top
View user's profile Send private message
vaxbrat
l33t
l33t


Joined: 05 Oct 2005
Posts: 622
Location: DC Burbs

PostPosted: Wed May 22, 2013 4:50 am    Post subject: It's a bit wordy Reply with quote

You don't need to do all of the broadcast and netmask hooha and should be able to get away with the following:

Code:
config_enp0s17="192.168.1.110/24"


The /24 there is the shorthand for the class C subnet you are trying to do. The netmask and broadcast address will be automatically set based on it.

You may also want to set your dns domain and default search to go into your /etc/resolv.conf if this is your only interface and if you are on a local LAN. The result would look something like:

Code:
config_enp0s17="192.168.1.110/24"
dns_domain_enp0s17="example.com"
dns_search_enp0s17="example.com"
dns_servers_enp0s17="4.2.2.1 4.2.2.2 8.8.8.8 8.8.4.4"


Also I wouldn't bother with the modules stanza
Back to top
View user's profile Send private message
vaxbrat
l33t
l33t


Joined: 05 Oct 2005
Posts: 622
Location: DC Burbs

PostPosted: Wed May 22, 2013 4:51 am    Post subject: oh and.. Reply with quote

btw that should be "netmask" and not just "mask". That's probably what was biting you to begin with...
Back to top
View user's profile Send private message
-neX-
n00b
n00b


Joined: 29 Apr 2005
Posts: 40

PostPosted: Wed May 22, 2013 11:03 am    Post subject: Reply with quote

I actually did have 'netmask' in there, must have dropped the first bit with hand typing. I've since changed it to the CIDR style as you suggested. Is 'localdomain' valid for dns_domain and dns_search? I thought that these were global settings for conf.d/net.

edit: That seems to have done the trick! Getting the proper IP on startup, and sshd is starting properely. Like I said, something dumb. :)
Back to top
View user's profile Send private message
vaxbrat
l33t
l33t


Joined: 05 Oct 2005
Posts: 622
Location: DC Burbs

PostPosted: Thu May 23, 2013 11:15 pm    Post subject: dns part was optional Reply with quote

localdomain is just a default. the dns settings by connection allow /etc/resolv.conf to be updated as interfaces are turned on and off
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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