View previous topic :: View next topic |
Author |
Message |
Fog_Watch Apprentice
Joined: 24 Jul 2006 Posts: 268 Location: Utility Muffin Research Kitchen
|
Posted: Sun May 17, 2020 6:42 am Post subject: Hot plugging net0 on a laptop |
|
|
I want to hotplug my ethernet, and use it, any time I like. I couldn't find out how to do this.
I ended up bonding wlan0 and net0, but don't think you can use dhcpcd. This works whether the machine boots with or without net0.
Code: | # rc-update show | egrep "dhcp|wpa|net"
local | default nonetwork
net.bond0 | default
netmount | default
wpa_supplicant | default
|
Code: | # grep -v '^#' /etc/conf.d/net
config_net0="null"
config_wlan0="null"
modules_bond0="busybox udhcpc"
config_bond0="dhcp"
slaves_bond0="net0 wlan0"
|
Code: | # grep -v '^#' /etc/modprobe.d/bonding.conf
options bonding mode=1 miimon=100 fail_over_mac=1 primary=net0
|
The following is the result of pinging the firewall while I unplug and reinserting the RJ45.
Code: |
# ping -D -i 2 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
[1589697430.852285] 64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.578 ms
[1589697432.882569] 64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.363 ms
[1589697434.930741] 64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.540 ms
[1589697436.978840] 64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=0.641 ms
[1589697439.026759] 64 bytes from 192.168.1.1: icmp_seq=5 ttl=64 time=0.548 ms
[1589697441.089486] 64 bytes from 192.168.1.1: icmp_seq=6 ttl=64 time=15.3 ms
[1589697443.082232] 64 bytes from 192.168.1.1: icmp_seq=7 ttl=64 time=5.60 ms
[1589697445.083515] 64 bytes from 192.168.1.1: icmp_seq=8 ttl=64 time=4.13 ms
[1589697447.084654] 64 bytes from 192.168.1.1: icmp_seq=9 ttl=64 time=2.98 ms
[1589697449.084505] 64 bytes from 192.168.1.1: icmp_seq=10 ttl=64 time=0.723 ms
[1589697451.122845] 64 bytes from 192.168.1.1: icmp_seq=11 ttl=64 time=0.643 ms
[1589697453.170740] 64 bytes from 192.168.1.1: icmp_seq=12 ttl=64 time=0.541 ms
|
Last edited by Fog_Watch on Sun May 17, 2020 8:02 am; edited 1 time in total |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3685
|
Posted: Sun May 17, 2020 7:08 am Post subject: Re: How to hotswap |
|
|
Fog_Watch wrote: | I want to hotplug my ethernet, and use it, any time I like. I couldn't find out how to do this. |
Are you aware that Network management using DHCPCD does not need those workarounds? |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6198 Location: Dallas area
|
Posted: Sun May 17, 2020 12:24 pm Post subject: |
|
|
If I'm not mistaken wpa_supplicant also does hotplugging. _________________ UM780, 6.12 zen kernel, gcc 13, openrc, wayland |
|
Back to top |
|
|
Fog_Watch Apprentice
Joined: 24 Jul 2006 Posts: 268 Location: Utility Muffin Research Kitchen
|
Posted: Mon May 18, 2020 7:57 am Post subject: Re: How to hotswap |
|
|
That's better.
Thanks. |
|
Back to top |
|
|
|