Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
New mobo: now network problems [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
binro
l33t
l33t


Joined: 06 May 2005
Posts: 724
Location: Bangkok, Thailand

PostPosted: Tue Jan 16, 2024 3:32 pm    Post subject: New mobo: now network problems [SOLVED] Reply with quote

The mobo on a machine I use as a server died last week and I had another mobo installed. I thought I could just boot the machine but the network device had changed: enp5s0 to enp3s0. I made the following changes to configuration files:
Code:

ll /etc/init.d/net.enp*
lrwxrwxrwx 1 root root 6 Dec 26  2019 /etc/init.d/net.enp3s0 -> net.lo

Code:

/etc/conf.d/net

modules="ifconfig"
config_enp3s0="192.168.100.2/24 brd 192.168.100.255"
routes_enp3s0="default via 192.168.100.1"
gateway="/192.168.100.1"
iface_lo="dhcp127.0.0.1 netmask 255.0.0.0"

The mysterious thing is:
Code:

# ip -p a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ip_vti0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/ipip 0.0.0.0 brd 0.0.0.0
3: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 78:24:af:39:7c:e2 brd ff:ff:ff:ff:ff:ff
    inet 192.168.100.2/24 brd 192.168.100.255 scope global enp3s0
       valid_lft forever preferred_lft forever
    inet 92.168.100.98/24 brd 192.168.100.255 scope global secondary noprefixroute enp3s0
       valid_lft forever preferred_lft forever
    inet6 fe80::7a24:afff:fe39:7ce2/64 scope link
       valid_lft forever preferred_lft forever

The problem is I don't want 192.168.100.98 (which must come from the dhcp server on the router); I do want 192.168.100.2 which is defined in /etc/hosts. I have had to define it manually. Since I have /etc/conf.d/net configured, why is dhcp getting invoked. Remember, this set up has been running for about 15 years like clockwork! Attempts to delete 192.168.100.98 get:
Code:

# ip address delete 192.168.100.98/24 enp3s0
Error: either "local" is duplicate, or "enp3s0" is a garbage.

The dhcpcd service is running, although I don't start it (normally I use dnsmasq). Any pointers would be greatly appreciated.

TIA
Robin
_________________
"Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling


Last edited by binro on Wed Jan 17, 2024 7:31 am; edited 1 time in total
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4167
Location: Bavaria

PostPosted: Tue Jan 16, 2024 8:35 pm    Post subject: Reply with quote

1. Please make sure you have no DHCPCD in your runlevels. Check it with "rc-update". Check also if you have added net.enp3s0 to your deafault runlevel.

2. This is my /etc/conf.d/net and it is sufficient when doing a static IP address configuration (Information for DNS is taken from /etc/resolv.conf; I am using "unbound" and have therefore "nameserver 127.0.0.1" in it):
Code:
config_enp2s0="192.168.2.9/24"
routes_enp2s0="default via 192.168.2.1"

_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
binro
l33t
l33t


Joined: 06 May 2005
Posts: 724
Location: Bangkok, Thailand

PostPosted: Tue Jan 16, 2024 8:47 pm    Post subject: Reply with quote

Pietinger, thanks for the response. dhcpcd is not in any runlevel.
Code:

rc-update -a del dhcpcd
 * rc-update: service `dhcpcd' is not in the runlevel `shutdown'
 * rc-update: service `dhcpcd' is not in the runlevel `single'
 * rc-update: service `dhcpcd' is not in the runlevel `boot'
 * rc-update: service `dhcpcd' is not in the runlevel `sysinit'
 * rc-update: service `dhcpcd' is not in the runlevel `nonetwork'
 * rc-update: service `dhcpcd' is not in the runlevel `default

But I forgot to add net.enp3s0 to a runlevel; I think that is the problem. :)
_________________
"Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4167
Location: Bavaria

PostPosted: Wed Jan 17, 2024 3:00 am    Post subject: Reply with quote

binro wrote:
Pietinger, thanks for the response.

You are very Welcome ! :D

binro wrote:
[...] I think that is the problem. :)

Possibly ... :lol:
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
binro
l33t
l33t


Joined: 06 May 2005
Posts: 724
Location: Bangkok, Thailand

PostPosted: Wed Jan 17, 2024 7:31 am    Post subject: Reply with quote

Yes, I added net.enp3s0 to runlevel boot and everything starts up normally again!.:) Phew!
_________________
"Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4167
Location: Bavaria

PostPosted: Wed Jan 17, 2024 7:54 am    Post subject: Reply with quote

binro wrote:
Yes, I added net.enp3s0 to runlevel boot [...]

It should be added to runlevel default; see also:
https://wiki.gentoo.org/wiki/Handbook:AMD64/Networking/Introduction
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
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