Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] No ip4 addresses after hibernate resume
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
linux_os2
Apprentice
Apprentice


Joined: 29 Aug 2018
Posts: 258
Location: Zedelgem Belgium

PostPosted: Mon Dec 30, 2024 9:41 am    Post subject: [SOLVED] No ip4 addresses after hibernate resume Reply with quote

Merry Christmas and happy newyear.
Hi no ip4 address is assigned after hibernate resume.
Also when using static ip cannont reach any ip4 address with ping or browser.
What info can I provide?


Last edited by linux_os2 on Mon Dec 30, 2024 8:32 pm; edited 1 time in total
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3933

PostPosted: Mon Dec 30, 2024 11:27 am    Post subject: Reply with quote

Plz post
Code:

ip a
ip route

and see
https://wiki.gentoo.org/wiki/Elogind#Suspend.2FHibernate_Resume.2FThaw_hook_scripts
_________________
:)
Back to top
View user's profile Send private message
linux_os2
Apprentice
Apprentice


Joined: 29 Aug 2018
Posts: 258
Location: Zedelgem Belgium

PostPosted: Mon Dec 30, 2024 2:00 pm    Post subject: Reply with quote

Before hibernate:

Code:
ip a

Code:
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 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute
       valid_lft forever preferred_lft forever
2: enp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 38:d5:47:c9:f3:49 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.10/32 scope global enp5s0
       valid_lft forever preferred_lft forever
    inet 192.168.0.221/24 brd 192.168.0.255 scope global dynamic noprefixroute enp5s0
       valid_lft 2605sec preferred_lft 2155sec
    inet6 2a02:1811:b713:8500:2d64:6d39:3265:5225/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 240301sec preferred_lft 67501sec
    inet6 2a02:1811:b713:8500:3ad5:47ff:fec9:f349/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 240301sec preferred_lft 67501sec
    inet6 fe80::3ad5:47ff:fec9:f349/64 scope link proto kernel_ll
       valid_lft forever preferred_lft forever
3: enp6s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 38:d5:47:c9:f3:4a brd ff:ff:ff:ff:ff:ff
4: wlp0s20u7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 74:da:38:a6:47:21 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.102/24 brd 192.168.0.255 scope global dynamic noprefixroute wlp0s20u7
       valid_lft 3548sec preferred_lft 3098sec
    inet6 2a02:1811:b713:8500:774:ea84:d879:1487/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 240301sec preferred_lft 67501sec
    inet6 fe80::96f9:73d8:fc2d:271a/64 scope link
       valid_lft forever preferred_lft forever

Code:
ip route

Code:
default via 192.168.0.1 dev enp5s0 proto static
default via 192.168.0.1 dev enp5s0 proto dhcp src 192.168.0.221 metric 1002
default via 192.168.0.1 dev wlp0s20u7 proto dhcp src 192.168.0.102 metric 3004
192.168.0.0/24 dev enp5s0 proto dhcp scope link src 192.168.0.221 metric 1002
192.168.0.0/24 dev wlp0s20u7 proto dhcp scope link src 192.168.0.102 metric 3004


after hibernate
Code:
ip a

Code:
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 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute
       valid_lft forever preferred_lft forever
2: enp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 38:d5:47:c9:f3:49 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.10/32 scope global enp5s0
       valid_lft forever preferred_lft forever
    inet6 2a02:1811:b713:8500:3ad5:47ff:fec9:f349/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 241464sec preferred_lft 68664sec
    inet6 fe80::3ad5:47ff:fec9:f349/64 scope link proto kernel_ll
       valid_lft forever preferred_lft forever
3: enp6s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 38:d5:47:c9:f3:4a brd ff:ff:ff:ff:ff:ff
5: wlp0s20u7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 74:da:38:a6:47:21 brd ff:ff:ff:ff:ff:ff

Code:
ip route

Code:
nothing


enp5s0 has static ip 192.168.0.10
wlp0s20u7 is DHCP
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3933

PostPosted: Mon Dec 30, 2024 4:50 pm    Post subject: Reply with quote

Either configure your eth iface to NOT have a default gateway assigned to it, or the wlan iface.
You generally should not have two default gateways assigned in the same lan.
Ideally disable one of them.
As for the no internet after hibernate issue,just try to use an elogind script as in the above link with something like:
Code:

rc-service net.<iface> restart

or systemd or NM equivalent.
_________________
:)
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1968

PostPosted: Mon Dec 30, 2024 5:09 pm    Post subject: Reply with quote

linux_os2 wrote:
Code:
default via 192.168.0.1 dev enp5s0 proto static
default via 192.168.0.1 dev enp5s0 proto dhcp src 192.168.0.221 metric 1002

This looks like a double configuration of both static and DHCP.

If you want pure static, then the DHCP client daemon should be configured to ignore this interface.
Back to top
View user's profile Send private message
linux_os2
Apprentice
Apprentice


Joined: 29 Aug 2018
Posts: 258
Location: Zedelgem Belgium

PostPosted: Mon Dec 30, 2024 8:31 pm    Post subject: Reply with quote

grknight wrote:
linux_os2 wrote:
Code:
default via 192.168.0.1 dev enp5s0 proto static
default via 192.168.0.1 dev enp5s0 proto dhcp src 192.168.0.221 metric 1002

This looks like a double configuration of both static and DHCP.

If you want pure static, then the DHCP client daemon should be configured to ignore this interface.

That was the clue.

I had following in file /etc/systemd/network/70-static.network
Code:
[Match]
Name=enp5s0

[Network]
Address=192.168.0.10
Gateway=192.168.0.1
DNS=192.168.0.1

Removed this file.

added following to /etc/dhcpcd.conf
Code:
interface enp5s0
static ip_address=192.168.0.10
static routers=192.168.0.1
static domain_name_servers=192.168.0.1

Code:
ip route

Code:
default via 192.168.0.1 dev enp5s0 src 192.168.0.10 metric 1002
default via 192.168.0.1 dev wlp0s20u7 proto dhcp src 192.168.0.102 metric 3005
192.168.0.0/24 dev enp5s0 proto dhcp scope link src 192.168.0.10 metric 1002
192.168.0.0/24 dev wlp0s20u7 proto dhcp scope link src 192.168.0.102 metric 3005

And hibernation problem is solved.

Thanks a lot grknight
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