Suppression option netmask : on configure le masque avec "/24" à la fin de l'IP + gateway IPv6
This commit is contained in:
parent
7e35c4e424
commit
464fa3c8ca
|
@ -11,8 +11,7 @@ iface lo inet loopback
|
|||
|
||||
auto eth0
|
||||
iface eth0 inet static
|
||||
address 192.0.43.10
|
||||
netmask 255.255.255.0
|
||||
address 192.0.43.10/24
|
||||
gateway 192.0.43.254
|
||||
~~~
|
||||
|
||||
|
@ -20,9 +19,8 @@ Pour l'IPv6 il faut rajouter :
|
|||
|
||||
~~~
|
||||
iface eth0 inet6 static
|
||||
address 2001:500:88:200::10
|
||||
netmask 48
|
||||
up /bin/ip route add 2000::0/3 via 2001:500:88:200::254
|
||||
address 2001:500:88:200::10/48
|
||||
gateway 2001:500:88:200::254
|
||||
~~~
|
||||
|
||||
Si besoin d'exécuter des commandes après l'activation de l'interface (classiquement
|
||||
|
@ -31,8 +29,7 @@ des ajouts de routes), on utilise l'option _up_. Par exemple :
|
|||
~~~
|
||||
auto eth0
|
||||
iface eth0 inet static
|
||||
address 192.0.43.10
|
||||
netmask 255.255.255.0
|
||||
address 192.0.43.10/24
|
||||
gateway 192.0.43.254
|
||||
up /sbin/route add -net 192.0.42.0/24 gw 192.0.43.242
|
||||
~~~
|
||||
|
@ -42,8 +39,7 @@ Pour ajouter des interfaces virtuelles, toujours via _/etc/network/interfaces_ o
|
|||
~~~
|
||||
auto eth0:0
|
||||
iface eth0:0 inet static
|
||||
address 192.0.43.11
|
||||
netmask 255.255.255.0
|
||||
address 192.0.43.11/24
|
||||
~~~
|
||||
|
||||
Note 1 : certains hébergeurs comme OVH préconisent une configuration un peu différente, voir [wiki:ServeurOVH#IPFailOver]
|
||||
|
@ -161,8 +157,7 @@ Le fichier /etc/network/interfaces :
|
|||
# cat /etc/network/interfaces
|
||||
auto eth0.42
|
||||
iface eth0.42 inet static
|
||||
address 192.0.43.10
|
||||
netmask 255.255.255.0
|
||||
address 192.0.43.10/24
|
||||
gateway 192.0.43.254
|
||||
~~~
|
||||
|
||||
|
|
Loading…
Reference in a new issue