Projet

Général

Profil

Evolution #6951

nom de l'interface réseau

Ajouté par Emmanuel GARETTE il y a environ 10 ans. Mis à jour il y a presque 10 ans.

Statut:
Fermé
Priorité:
Haut
Assigné à:
Catégorie:
-
Début:
Echéance:
04/04/2014
% réalisé:

100%

Temps estimé:
4.00 h
Temps passé:
Distribution:
EOLE 2.4

Description

Le nom de l'interface de la carte réseau est différent en mode conteneur/non conteneur.

En non conteneur : eth0
En mode conteneur : breth0

Une variable "nom_zone_ethX" a été mise en place pour gérer les différents ca.

Pour eth0 il existe une autre variable "interface_gw" contenant le nom de l'interface à associé au bridge. Si on veut pouvoir gérer d'autres cas (par exemple bonding).

Il faudrait pour chaque interface 2 variables :

- nom_carte_ethX (par exemple eth0, bond0, pppoe)
- nom_zone_ethX (par exemple eth0, breth0, ...).

Ces variables doivent être calculé dans le dictionnaire Créole 01_network.xml.


Demandes liées

Lié à eole-common - Tâche #7778: En mode conteneur, les vlan/alias ne sont plus disponible Fermé 27/03/2014 20/06/2014
Lié à eole-common - Tâche #2986: gestion du bonding Fermé 15/11/2016
Lié à Documentations - Tâche #10137: Module Amon : mise à jour de la documentation de l'interface de configuration du module (fin) Fermé 16/01/2015
Lié à Documentations - Tâche #10379: Vérifier et améliorer la description des onglets interface-n Fermé 09/09/2014

Révisions associées

Révision f93e73a5 (diff)
Ajouté par Emmanuel GARETTE il y a environ 10 ans

Création des variables nom_carte_ethX avec le nom de la carte réseau (eth0, eth1, ... par défaut)
Calcul des variables nom_zone_ethX (ppp0, eth0, breth0 ...)
Ajout des variables zone_is_bridge_ethX pour savoir si l'interface est dans un bridge

ref #6951 @6h

Révision 9ca939e7 (diff)
Ajouté par Emmanuel GARETTE il y a environ 10 ans

Ajout des fonctions eosfunc get_zone_name_bridge et get_zone_name (ref #6951)
Possibilité de faire des auto/fill en passant la Config (fixes #6951 @2h)
Mettre macvlan comme methode par défaut (ref #7778)

Révision d4f424d0 (diff)
Ajouté par Emmanuel GARETTE il y a environ 10 ans

ne faire un mandatory_warnings que sur la sous-config creole (ref #6951)

Révision 98872884 (diff)
Ajouté par Emmanuel GARETTE il y a presque 10 ans

creole/funcs/master_network_interfaces.py : support des interfaces sans IP (fixes #6951)

Historique

#1 Mis à jour par Joël Cuissinat il y a environ 10 ans

  • Version cible changé de Eole 2.4-beta3 à Eole 2.4-RC2

#2 Mis à jour par Klaas TJEBBES il y a environ 10 ans

  • Version cible changé de Eole 2.4-RC2 à Eole 2.4-RC3

#3 Mis à jour par Joël Cuissinat il y a environ 10 ans

  • Echéance mis à 04/04/2014
  • Temps estimé mis à 4.00 h

#4 Mis à jour par Emmanuel GARETTE il y a environ 10 ans

  • Assigné à mis à Emmanuel GARETTE

#5 Mis à jour par Emmanuel GARETTE il y a environ 10 ans

  • Statut changé de Nouveau à Résolu
  • % réalisé changé de 0 à 100

#6 Mis à jour par Emmanuel GARETTE il y a presque 10 ans

  • Statut changé de Résolu à À valider

Pas ok.

root@scribe:~# CreoleGet nom_zone_eth0
breth0
root@scribe:~# cat /etc/network/interfaces
# Fichier autogénéré par EOLE
# Toute modification manuelle sera perdue

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address 192.168.230.185
    netmask 255.255.255.0
    broadcast 192.168.230.255
    network 192.168.230.0
    gateway 192.168.230.254

auto breth0:1
iface breth0:1 inet static
    address 192.168.1.1
    netmask 255.255.255.0
    broadcast 192.168.1.255
    network 192.168.1.0
    up test "$(runlevel)" = unknown || service bastion restart
    up service rsyslog restart

#7 Mis à jour par Emmanuel GARETTE il y a presque 10 ans

  • Statut changé de À valider à Résolu

#8 Mis à jour par Emmanuel GARETTE il y a presque 10 ans

Pour moi c'est mieux :

root@scribe:~# CreoleGet zone_is_bridge_eth0
non
root@scribe:~# CreoleGet nom_zone_eth0
eth0
root@scribe:~# CreoleGet nom_carte_eth0
eth0
root@scribe:~# CreoleGet debit_carte_eth0
autoneg on
root@scribe:~# cat /etc/network/interfaces
# Fichier autogénéré par EOLE
# Toute modification manuelle sera perdue

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address 192.168.230.185
    netmask 255.255.255.0
    broadcast 192.168.230.255
    network 192.168.230.0
    gateway 192.168.230.254
    pre-up ethtool -s eth0 autoneg on

auto eth0:1
iface eth0:1 inet static
    address 192.168.1.1
    netmask 255.255.255.0
    broadcast 192.168.1.255
    network 192.168.1.0
    up test "$(runlevel)" = unknown || service bastion restart
    up service rsyslog restart

root@scribe:~# CreoleGet zone_is_bridge_eth0
oui
root@scribe:~# CreoleGet nom_zone_eth0
breth0
root@scribe:~# CreoleGet nom_carte_eth0
eth0
root@scribe:~# CreoleGet debit_carte_eth0
autoneg on
root@scribe:~# cat /etc/network/interfaces
# Fichier autogénéré par EOLE
# Toute modification manuelle sera perdue

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual
    pre-up ip link set $IFACE up
    post-down ip link set $IFACE down
    pre-up ethtool -s eth0 autoneg on
    up /sbin/sysctl -w net.ipv4.conf.eth0.proxy_arp=1

auto breth0
iface breth0 inet static
    address 192.168.230.185
    netmask 255.255.255.0
    broadcast 192.168.230.255
    network 192.168.230.0
    bridge_ports eth0
    bridge_fd 2
    bridge_hello 2
    bridge_maxage 12
    bridge_stp off
    up test "$(runlevel)" = unknown || service bastion restart
    up service rsyslog restart

#9 Mis à jour par Emmanuel GARETTE il y a presque 10 ans

  • Version cible changé de Eole 2.4-RC3 à Eole 2.4 Stable

#10 Mis à jour par Philippe Caseiro il y a presque 10 ans

  • Statut changé de Résolu à Fermé

Le comportement semble correct sur un Scribe 2.4.0.

Formats disponibles : Atom PDF