Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
second nic not started
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
Fe4unR
n00b
n00b


Joined: 29 Nov 2024
Posts: 9

PostPosted: Sun Dec 15, 2024 1:24 am    Post subject: second nic not started Reply with quote

hi,

i have 2 nics and the second one doesn't start during boot. the first one (env3) comes up fine. i'm using openrc and netifrc and my /etc/conf.d/net looks like this:
Code:

config_env3="172.16.76.22 netmask 255.255.128.0 brd 172.16.76.255"
config_env4="192.168.1.22 netmask 255.255.255.0 brd 192.168.1.255"
routes_env4="default via 192.168.1.1"
dns_servers_env3="172.16.76.8"


both have the symlink in /etc/init.d:
Code:

ln -s net.lo net.env3
ln -s net.lo net.env4


if i start it manually after logging in via:
Code:
rc-service net.env4 start

it starts and works fine. so what did i miss?
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1968

PostPosted: Sun Dec 15, 2024 1:37 am    Post subject: Reply with quote

Likely missed:
Code:
rc-update add net.env3 default
rc-update add net.env4 default

That env3 config seems a bit broken as a /17 bitmask for 172.16.76.22 should be 172.16.127.255 for the broadcast.
A mistake of a /25 bitmask would have a broadcast of 172.16.76.127.
Something feels wrong with either way.

I suggest using CIDR setups to have consistency and avoid errors.
Back to top
View user's profile Send private message
Fe4unR
n00b
n00b


Joined: 29 Nov 2024
Posts: 9

PostPosted: Sun Dec 15, 2024 2:48 am    Post subject: Reply with quote

grknight wrote:
Code:
rc-update add net.env3 default
rc-update add net.env4 default


that did the trick, thanks! makes me wonder why env3 worked anyway.
Back to top
View user's profile Send private message
freke
Veteran
Veteran


Joined: 23 Jan 2003
Posts: 1041
Location: Somewhere in Denmark

PostPosted: Sun Dec 29, 2024 11:36 pm    Post subject: Reply with quote

Fe4unR wrote:
grknight wrote:
Code:
rc-update add net.env3 default
rc-update add net.env4 default


that did the trick, thanks! makes me wonder why env3 worked anyway.

OpenRC has a dynamic runlevel needed/wanted - which would probably start the first net.* encountered if net is needed - you could try deleting them from default
Code:
rc-update del net.env3 default
rc-update del net.env4 default
reboot and confirm with
Code:
rc-status
if net.env3 is started in the needed/wanted runlevel
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