You are not logged in.
Hello every everybody
i have got a problem with an intelligent switch wired bewind my computer is slower to start than my computer and finaly when arch linux is starter it like to have no connection wired at the startup.
No ethernet card activated even if all connection are wired 30seconds after it's boot.
Need to restart the computer and everythings are correct....
How to solve this problem ???
I think i have missed something... ?
Thanks in advance
Description='Static ethernet connection enp0s10'
Interface=enp0s10
Connection=ethernet
IP=static
Address=('192.168.0.90/24')
Gateway='192.168.0.254'
DNS=('192.168.0.254')
AutoWired=yes
## For IPv6 autoconfiguration
#IP6=stateless
## For IPv6 static address configuration
#IP6=static
#Address6=('1234:5678:9abc:def::1/64' '1234:3456::123/96')
#Routes6=('abcd::1234')
#Gateway6='1234:0:123::abcd'
[Unit]
Description=IPv4 DHCP server
After=network.target network-online.target
Wants=network-online.target
[Service]
Type=forking
#ExecStart=/usr/bin/dhcpd -4 -q -cf /etc/dhcpd.conf -pf /run/dhcpd4/dhcpd.pid
ExecStart=/usr/bin/dhcpd -4 -q -cf /etc/dhcpd.conf -pf /run/dhcpd4/dhcpd.pid %I
RuntimeDirectory=dhcpd4
PIDFile=/run/dhcpd4/dhcpd.pid
User=dhcp
AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_NET_RAW
ProtectSystem=full
ProtectHome=on
KillSignal=SIGINT
# We pull in network-online.target for a configured network connection.
# However this is not guaranteed to be the network connection our
# networks are configured for. So try to restart on failure with a delay
# of two seconds. Rate limiting kicks in after 12 seconds.
RestartSec=2s
Restart=on-failure
StartLimitInterval=12s
[Install]
WantedBy=multi-user.target
Last edited by ricco75 (2021-05-16 11:16:43)
Offline
hello
I have found the solution for the 1st card for the moment and i think it's same for the other.
https://wiki.archlinux.fr/Connexions_reseau
sudo nano /etc/systemd/system/network.service
[Unit]
Description=Network Connectivity
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-enp0s10.device
After=sys-subsystem-net-devices-enp0s10.device
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/sbin/ip link set dev enp0s10 up
ExecStart=/sbin/ip addr add 192.168.0.90/255.255.255.0 broadcast 192.168.0.255 dev enp0s10
ExecStart=/sbin/ip route add default via 192.168.0.1
ExecStop=/sbin/ip addr flush dev enp0s10
ExecStop=/sbin/ip link set dev enp0s10 down
[Install]
WantedBy=multi-user.target
Offline
Oupppps no
it's not the same for the second card.
Have you got a idea ???
thanks
Offline
Offline
ExecStartPre=/usr/bin/sleep 30
Systemd can configure an interface w/o carrier, https://github.com/NixOS/nixpkgs/issues/62844
Edit: need sleep
Last edited by seth (2021-05-16 22:49:26)
Offline
Have you checked the LEDs? The switch might go crazy on Layer1 during initialization. Either "no power" or worse "bad state" confusing the client.
What happens if you pull the cable and boot up the system?
You could try to delay bringing up the NIC but if a network restart doesn't even work something more serious might be going on. Maybe try to reload the driver.
Last edited by Maniaxx (2021-05-17 13:41:39)
sys2064
Offline
Hello
The Computer start around 20s
The switch is a Gigabit Layer 2 boot in around 45s.
i have make 2 services :
- 1 with RJ45 Motherboard port activated : name : network.service
- 1 with RJ45 USB converter port activated : name : network2.service
If there is no wire connected to ;
- the motherboard, interface is up
- the usb converter is down
network.service
GNU nano 5.7 /etc/systemd/system/network.service
[Unit]
Description=Network Connectivity
Wants=network.target
Before=network.target
#MOTHERBOARD RJ45 PORT
BindsTo=sys-subsystem-net-devices-enp0s10.device
After=sys-subsystem-net-devices-enp0s10.device
#USB ETHERNET RJ45 PORT
#BindsTo=sys-subsystem-net-devices-enp0s4flu4.device
#After=sys-subsystem-net-devices-enp0s4flu4.device
[Service]
Type=oneshot
RemainAfterExit=yes
#MOTHERBOARD RJ45 PORT
ExecStart=/sbin/ip link set dev enp0s10 up
ExecStart=/sbin/ip addr add 192.168.0.90/255.255.255.0 broadcast 192.168.0.255 dev enp0s10
ExecStart=/sbin/ip route add default via 192.168.0.254
ExecStop=/sbin/ip addr flush dev enp0s10
ExecStop=/sbin/ip link set dev enp0s10 down
#USB ETHERNET RJ45 PORT
#ExecStart=/sbin/ip link set dev enp0s4flu4 up
#ExecStart=/sbin/ip addr add 192.168.1.253/255.255.255.0 broadcast 192.168.1.255 dev enp0s4flu4
#ExecStart=/sbin/ip route add default via 192.168.1.254
#ExecStop=/sbin/ip addr flush dev enp0s4flu4
#ExecStop=/sbin/ip link set dev enp0s4flu4 down
[Install]
WantedBy=multi-user.target
network2.service
GNU nano 5.7 /etc/systemd/system/network2.service
[Unit]
Description=Network Connectivity USB
Wants=network.target
Before=network.target
#MOTHERBOARD RJ45 PORT
#BindsTo=sys-subsystem-net-devices-enp0s10.device
#After=sys-subsystem-net-devices-enp0s10.device
#USB ETHERNET RJ45 PORT
BindsTo=sys-subsystem-net-devices-enp0s4flu4.device
After=sys-subsystem-net-devices-enp0s4flu4.device
[Service]
Type=oneshot
RemainAfterExit=yes
#MOTHERBOARD RJ45 PORT
#ExecStart=/sbin/ip link set dev enp0s10 up
#ExecStart=/sbin/ip addr add 192.168.0.90/255.255.255.0 broadcast 192.168.0.255 dev enp0s10
#ExecStart=/sbin/ip route add default via 192.168.0.254
#ExecStop=/sbin/ip addr flush dev enp0s10
#ExecStop=/sbin/ip link set dev enp0s10 down
#USB ETHERNET RJ45 PORT
ExecStart=/sbin/ip link set dev enp0s4flu4 up
ExecStart=/sbin/ip addr add 192.168.1.253/255.255.255.0 broadcast 192.168.1.255 dev enp0s4flu4
ExecStart=/sbin/ip route add default via 192.168.1.254
ExecStop=/sbin/ip addr flush dev enp0s4flu4
ExecStop=/sbin/ip link set dev enp0s4flu4 down
[Install]
WantedBy=multi-user.target
Last edited by ricco75 (2021-05-17 19:16:14)
Offline