Network : Différence entre versions

De Wiki NCad
Aller à : navigation, rechercher
(IPv4)
(IPv6)
Ligne 61 : Ligne 61 :
 
== IP Secondaire ==
 
== IP Secondaire ==
  
 +
iface ens18 inet6 static
 +
        address 2001:41d0:c178:a181:10::1
 +
        netmask 64
 +
        gateway fe80::5cd5:9fdf:fe46:85a1
 +
        dns-nameservers 2001:4860:4860::8888 2001:4860:4860::8844
 +
 
  <span style="color:blue">auto ens18:1
 
  <span style="color:blue">auto ens18:1
 
  iface ens18:1 inet6 static
 
  iface ens18:1 inet6 static
 
         address 2001:41d0:c178:a181:10:1::1
 
         address 2001:41d0:c178:a181:10:1::1
 
         netmask 64</span>
 
         netmask 64</span>
 +
 +
{{ Box Remarque | objet=L'IP secondaire est rattachée à une interface virtuelle nommée ens18:1. }}
  
 
* Appliquer la configuration :
 
* Appliquer la configuration :
  
 
{{ Box Console | objet=/etc/init.d/networking restart }}
 
{{ Box Console | objet=/etc/init.d/networking restart }}

Version du 22 février 2020 à 13:17

IPv4

IP Statique

  • Éditer et configurer le fichier /etc/network/interfaces et y ajouter / adapter :
auto ens18
iface ens18 inet static
       address 10.0.0.1
       netmask 255.255.255.0
       network 10.0.0.0
       broadcast 10.0.0.255
       gateway 10.0.0.254
       dns-nameservers 8.8.8.8 8.8.4.4
       dns-search sys.net.glx
  • Appliquer la configuration :
ICON Terminal.png

/etc/init.d/networking restart

IP Secondaire

  • Éditer et configurer le fichier /etc/network/interfaces et y ajouter / adapter :
auto ens18 ens18:1
iface ens18 inet static
       address 10.0.0.1
       netmask 255.255.255.0
       network 10.0.0.0
       broadcast 10.0.0.255
       gateway 10.0.0.254
       dns-nameservers 8.8.8.8 8.8.4.4
       dns-search sys.net.glx</span>

iface ens18:1
       address 10.1.0.1
       netmask 255.255.255.0
       network 10.1.0.0
       broadcast 10.1.0.255
  • Appliquer la configuration :
ICON Terminal.png

/etc/init.d/networking restart

Routes statiques

IPv6

IP Statique

iface ens18 inet6 static
       address 2001:41d0:c178:a181:10::1
       netmask 64
       gateway fe80::5cd5:9fdf:fe46:85a1
       dns-nameservers 2001:4860:4860::8888 2001:4860:4860::8844
  • Appliquer la configuration :
ICON Terminal.png

/etc/init.d/networking restart

IP Secondaire

iface ens18 inet6 static
       address 2001:41d0:c178:a181:10::1
       netmask 64
       gateway fe80::5cd5:9fdf:fe46:85a1
       dns-nameservers 2001:4860:4860::8888 2001:4860:4860::8844

auto ens18:1
iface ens18:1 inet6 static
       address 2001:41d0:c178:a181:10:1::1
       netmask 64
ICON Light.png
L'IP secondaire est rattachée à une interface virtuelle nommée ens18:1.
  • Appliquer la configuration :
ICON Terminal.png

/etc/init.d/networking restart