Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5077

Networking and servers • Network Manager vs. dhcpcd - Fallback IP address

$
0
0
Hi,

I used static IP fallback (192.168.96.210/24) configuration with dhcpcd on Bullseye. Now I want to configure the same feature with Network Manager on Bookworm.
My profile config switches to static fallback when I conntect eth0 to a peer with no DHCP server.
When I reconnect to my router with DHCP Network Manager should switch from static to dhcp profile and vice veresa, however it doesn't.

Private_DHCP

Code:

sudo nmcli connection add con-name Private_DHCP ifname eth0 type ethernet autoconnect true connection.autoconnect-priority 1  connection.autoconnect-retries 2 ipv6.method disabled ipv4.method auto ipv4.dhcp-timeout 2 ipv4.may-fail no save yes
Private_Static

Code:

 sudo nmcli connection add con-name Private_Static ifname eth0 type ethernet autoconnect true connection.autoconnect-priority 0     connection.autoconnect-retries -1 ipv6.method disabled ipv4.method manual ip4 192.168.96.210/24  gw4 192.168.96.1 ipv4.dns 192.168.96.1     +ipv4.dns 192.168.96.1 save yes
nmcli con show

Code:

NAME            UUID                                  TYPE      DEVICEPrivate_Static  98d4b604-05b1-419d-8f4a-b30b6a64dc72  ethernet  eth0lo              db2b368c-6fb0-4a5c-9254-eb1c71da6b23  loopback  loPrivate_DHCP    c8401835-b680-43c5-a1e2-c4bd7a44bace  ethernet  --

Statistics: Posted by piwi — Tue Jul 09, 2024 9:49 am



Viewing all articles
Browse latest Browse all 5077

Trending Articles