[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Réseau : inversion nom d'interfaces



bonjour

Merci Christophe pour le retour, c'était bien un problème de config.

# networkctl status
●          State: routable                                  
    Online state: online                                    
         Address: 192.168.2.1 on eth0
                  192.168.1.1 on eth1
                  192.168.3.1 on tun0
                  2a01:e0a:28:f30:21a:92ff:fe90:4158 on eth1
                  fe80::250:bfff:fed8:b91f on eth0
                  fe80::21a:92ff:fe90:4158 on eth1
         Gateway: 192.168.1.254 on eth1
                  fe80::72fc:8fff:fe5e:60da on eth1
             DNS: 192.168.2.1
                  127.0.0.1
                  192.168.1.1
                  192.168.1.254
  Search Domains: vets.in


La configuration en place est celle-ci :

# cat /etc/systemd/network/10-eth0.network
[Match]
MACAddress=00:50:bf:d8:b9:1f
[Network]
Address=192.168.2.1/24
DNS=192.168.2.1 127.0.0.1
Domains=vets.in
IPv6PrivacyExtensions=false
# cat /etc/systemd/network/10-eth0.link 
[Match]
MACAddress=00:50:bf:d8:b9:1f
[Link]
Name=eth0
Description=Interface interne
# cat /etc/systemd/network/10-eth1.network
[Match]
MACAddress=00:1a:92:90:41:58 
[Network]
DHCP=ipv4
# cat /etc/systemd/network/10-eth1.link 
[Match]
MACAddress=00:1a:92:90:41:58 
[Link]
Name=eth1
Description=Interface externe


les règles udev ont été supprimées.

amitiées

Erwann

Le 03/08/2024 à 17:16, Christophe Maquaire a écrit :
Le samedi 03 août 2024 à 15:01 +0200, Erwann Le Bras a écrit :
 
bonjour

Bonjour, 

J'ai un serveur Debian domestique (Debian amd64 stable) munie de 2
interfaces réseaux qui ont gardé l'ancienne dénomination "eth0" et
"eth1".
 Anciennement gérées dans /etc/network/interfaces, elles sont gérées
par systemd.

Ma configuration :
 
# cat /etc/systemd/network/10-eth0.network 
 
[Match]
 
Name=eth0
 
MACAddress=00:50:bf:d8:b9:1f
 
[Link]
 
#MACAddress=Changer l'adresse MAC
 
#MTUBytes=Changer la valeur du MTU
 
[Network]
 
Address=192.168.2.1/24
 
DNS=192.168.2.1 127.0.0.1
 
Domains=vets.in
 
IPv6PrivacyExtensions=false
 
La documentation arch de networkd 

https://wiki.archlinux.org/title/Systemd-networkd_(Fran%C3%A7ais)

indique (chapitre 1.3.5) que le nommage de l'interface se fait avec un
fichier .link plutôt qu'avec udev.

du coup ton fichier /etc/systemd/network/10-eth0.network ne devrait
plus contenir d'adresse MAC dans la section match, et tu devrais avoir
un fichier /etc/systemd/network/10-eth0.link
qui ressemblerait à

[Match]
MACAddress=00:50:bf:d8:b9:1f

[Link]
Description=Interface INTERNE
Name=eth0

enfin je crois...
Merci d'avance de vos idées
 
amitiés
 
Erwann
Christophe


Reply to: