Re : Opensuse 15.3 - Mise en réseau
Répondre #6 –
Il y aurait il un fichier avec ces éléments ?
Avec opensuse, pour gérer ton réseau, tu utilises soit Networkmanager, soit wicked.
En mode serveur, sans environnement de bureau, c'est wicked.
Avec un environnement de bureau (plasma, gnome, xfce…), c'est plutôt NetworkManager, mais on peut aussi utiliser wicked.
Voilà la doc → Basic networking
Quelques informations importantes:
13.5 NetworkManager
Important:
NetworkManager is only supported by SUSE for desktop workloads with SLED or the Workstation extension. All server certifications are done with wicked as the network configuration tool, and using NetworkManager may invalidate them. NetworkManager is not supported by SUSE for server workloads.
13.5.2 NetworkManager functionality and configuration files
The individual network connection settings created with NetworkManager are stored in configuration profiles. The system connections configured with either NetworkManager or YaST are saved in /etc/NetworkManager/system-connections/* or in /etc/sysconfig/network/ifcfg-*. For GNOME, all user-defined connections are stored in GConf.
In case no profile is configured, NetworkManager automatically creates one and names it Auto $INTERFACE-NAME. That is made in an attempt to work without any configuration for as many cases as (securely) possible. If the automatically created profiles do not suit your needs, use the network connection configuration dialogs provided by GNOME to modify them as desired. For more information, see Section 28.3, “Configuring network connections”.
13.6.2.5 /etc/sysconfig/network/ifcfg-* (il s'agit de wicked ici…)
These files contain the traditional configurations for network interfaces.
NoteNote: wicked and the ifcfg-* files
wicked reads these files if you specify the compat: prefix. According to the openSUSE Leap default configuration in /etc/wicked/client.xml, wicked tries these files before the XML configuration files in /etc/wicked/ifconfig.
The --ifconfig switch is provided mostly for testing only. If specified, default configuration sources defined in /etc/wicked/ifconfig are not applied.
The ifcfg-* files include information such as the start mode and the IP address. Possible parameters are described in the manual page of ifup. Additionally, most variables from the dhcp and wireless files can be used in the ifcfg-* files if a general setting should be used for only one interface. However, most of the /etc/sysconfig/network/config variables are global and cannot be overridden in ifcfg files. For example, NETCONFIG_* variables are global.
For configuring macvlan and macvtab interfaces, see the ifcfg-macvlan and ifcfg-macvtap man pages. For example, for a macvlan interface provide a ifcfg-macvlan0 with settings as follows:
STARTMODE='auto'
MACVLAN_DEVICE='eth0'
#MACVLAN_MODE='vepa'
#LLADDR=02:03:04:05:06:aa
For ifcfg.template, see Section 13.6.2.6, “/etc/sysconfig/network/config, /etc/sysconfig/network/dhcp, and /etc/sysconfig/network/wireless”.
En résumé:
- Avec NetworkManager, les fichiers de configuration des interfaces réseaux sont dans /etc/NetworkManager/system-connections/*
- Avec wicked, c'est /etc/sysconfig/network/ifcfg-*
Un exemple avec Networkmanager:
toto-PC:/etc/NetworkManager/system-connections # ls
192.168.1.0.nmconnection dd-wrt 2.4.nmconnection jp-free-01.protonvpn.com.udp.nmconnection Kabelgebundene Verbindung 2.nmconnection Neue Verbindung IPv6.nmconnection
toto-PC:/etc/NetworkManager/system-connections # cat Kabelgebundene\ Verbindung\ 2.nmconnection
[connection]
id=Kabelgebundene Verbindung 2
uuid=531927d3-c3db-347e-83dd-04b51294a3ef
type=ethernet
permissions=
timestamp=1648662440
zone=home
[ethernet]
mac-address-blacklist=
[ipv4]
dns-search=
method=auto
[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto
[proxy]
Un exemple avec Leap en mode serveur (avec wicked):
localhost:/etc/sysconfig/network # cat ifcfg-eth0
NAME=''
BOOTPROTO='dhcp'
STARTMODE='auto'
ZONE=public