View previous topic :: View next topic |
Author |
Message |
linux_os2 Apprentice
Joined: 29 Aug 2018 Posts: 258 Location: Zedelgem Belgium
|
Posted: Mon Dec 30, 2024 9:41 am Post subject: [SOLVED] No ip4 addresses after hibernate resume |
|
|
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 |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3933
|
|
Back to top |
|
|
linux_os2 Apprentice
Joined: 29 Aug 2018 Posts: 258 Location: Zedelgem Belgium
|
Posted: Mon Dec 30, 2024 2:00 pm Post subject: |
|
|
Before hibernate:
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: | 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: | 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 |
enp5s0 has static ip 192.168.0.10
wlp0s20u7 is DHCP |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3933
|
Posted: Mon Dec 30, 2024 4:50 pm Post subject: |
|
|
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 |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1968
|
Posted: Mon Dec 30, 2024 5:09 pm Post subject: |
|
|
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 |
|
|
linux_os2 Apprentice
Joined: 29 Aug 2018 Posts: 258 Location: Zedelgem Belgium
|
Posted: Mon Dec 30, 2024 8:31 pm Post subject: |
|
|
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: | 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 |
|
|
|