]> git.proxmox.com Git - pve-docs.git/blobdiff - pve-network.adoc
fix a/an and repeated words
[pve-docs.git] / pve-network.adoc
index e6deb43dc7ab1e6254e1d9327ceafa0cc87ffc7c..d5b0a483c88c8211e7a3531a5d695d50c19eb7d9 100644 (file)
@@ -1,7 +1,6 @@
 [[sysadmin_network_configuration]]
 Network Configuration
 ---------------------
-include::attributes.txt[]
 ifdef::wiki[]
 :pve-toplevel:
 endif::wiki[]
@@ -21,7 +20,7 @@ virtual networks.
 
 Debian traditionally uses the `ifup` and `ifdown` commands to
 configure the network. The file `/etc/network/interfaces` contains the
-whole network setup. Please refer to to manual page (`man interfaces`)
+whole network setup. Please refer to the manual page (`man interfaces`)
 for a complete format description.
 
 NOTE: {pve} does not write changes directly to
@@ -40,37 +39,65 @@ Naming Conventions
 
 We currently use the following naming conventions for device names:
 
-* Ethernet devices: eth[N], where 0 ≤ N (`eth0`, `eth1`, ...)
+* New Ethernet devices: en*, systemd network interface names.
+
+* Legacy Ethernet devices: eth[N], where 0 ≤ N (`eth0`, `eth1`, ...)
+They are available when Proxmox VE has been updated by an earlier version.
 
 * Bridge names: vmbr[N], where 0 ≤ N ≤ 4094 (`vmbr0` - `vmbr4094`)
 
 * Bonds: bond[N], where 0 ≤ N (`bond0`, `bond1`, ...)
 
 * VLANs: Simply add the VLAN number to the device name,
-  separated by a period (`eth0.50`, `bond1.30`)
+  separated by a period (`eno1.50`, `bond1.30`)
 
 This makes it easier to debug networks problems, because the device
 names implies the device type.
 
+
+Systemd Network Interface Names
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Systemd uses the two character prefix 'en' for Ethernet network
+devices. The next characters depends on the device driver and the fact
+which schema matches first.
+
+* o<index>[n<phys_port_name>|d<dev_port>] — devices on board
+
+* s<slot>[f<function>][n<phys_port_name>|d<dev_port>] — device by hotplug id
+
+* [P<domain>]p<bus>s<slot>[f<function>][n<phys_port_name>|d<dev_port>] — devices by bus id
+
+* x<MAC> — device by MAC address
+
+The most common patterns are:
+
+* eno1 — is the first on board NIC
+
+* enp3s0f1 — is the NIC on pcibus 3 slot 0 and use the NIC function 1.
+
+For more information see https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/[Predictable Network Interface Names].
+
+
 Default Configuration using a Bridge
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 The installation program creates a single bridge named `vmbr0`, which
-is connected to the first ethernet card `eth0`. The corresponding
-configuration in `/etc/network/interfaces` looks like this:
+is connected to the first Ethernet card. The corresponding
+configuration in `/etc/network/interfaces` might look like this:
 
 ----
 auto lo
 iface lo inet loopback
 
-iface eth0 inet manual
+iface eno1 inet manual
 
 auto vmbr0
 iface vmbr0 inet static
         address 192.168.10.2
         netmask 255.255.255.0
         gateway 192.168.10.1
-        bridge_ports eth0
+        bridge_ports eno1
         bridge_stp off
         bridge_fd 0
 ----
@@ -105,12 +132,13 @@ situations:
 auto lo
 iface lo inet loopback
 
-auto eth0
-iface eth0 inet static
+auto eno1
+iface eno1 inet static
         address  192.168.10.2
         netmask  255.255.255.0
         gateway  192.168.10.1
-        post-up echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
+        post-up echo 1 > /proc/sys/net/ipv4/ip_forward
+        post-up echo 1 > /proc/sys/net/ipv4/conf/eno1/proxy_arp
 
 
 auto vmbr0
@@ -133,9 +161,9 @@ host's true IP, and masquerade the traffic using NAT:
 auto lo
 iface lo inet loopback
 
-auto eth0
-#real IP adress 
-iface eth0 inet static
+auto eno0
+#real IP address
+iface eno1 inet static
         address  192.168.10.2
         netmask  255.255.255.0
         gateway  192.168.10.1
@@ -150,8 +178,8 @@ iface vmbr0 inet static
         bridge_fd 0
 
         post-up echo 1 > /proc/sys/net/ipv4/ip_forward
-        post-up   iptables -t nat -A POSTROUTING -s '10.10.10.0/24' -o eth0 -j MASQUERADE
-        post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o eth0 -j MASQUERADE
+        post-up   iptables -t nat -A POSTROUTING -s '10.10.10.0/24' -o eno1 -j MASQUERADE
+        post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o eno1 -j MASQUERADE
 ----
 
 
@@ -209,8 +237,7 @@ designated slave network interface. If this receiving slave fails,
 another slave takes over the MAC address of the failed receiving
 slave.
 
-* *Adaptive load balancing (balanceIEEE 802.3ad Dynamic link
-aggregation (802.3ad)(LACP):-alb):* Includes balance-tlb plus receive
+* *Adaptive load balancing (balance-alb):* Includes balance-tlb plus receive
 load balancing (rlb) for IPV4 traffic, and does not require any
 special network switch support. The receive load balancing is achieved
 by ARP negotiation. The bonding driver intercepts the ARP Replies sent
@@ -220,8 +247,13 @@ slaves in the single logical bonded interface such that different
 network-peers use different MAC addresses for their network packet
 traffic.
 
-For the most setups the active-backup are the best choice or if your
-switch support LACP "IEEE 802.3ad" this mode should be preferred.
+If your switch support the LACP (IEEE 802.3ad) protocol then we recommend using
+the corresponding bonding mode (802.3ad). Otherwise you should generally use the 
+active-backup mode. +
+// http://lists.linux-ha.org/pipermail/linux-ha/2013-January/046295.html
+If you intend to run your cluster network on the bonding interfaces, then you
+have to use active-passive mode on the bonding interfaces, other modes are
+unsupported.
 
 The following bond configuration can be used as distributed/shared
 storage network. The benefit would be that you get more speed and the
@@ -232,13 +264,13 @@ network will be fault-tolerant.
 auto lo
 iface lo inet loopback
 
-iface eth1 inet manual
+iface eno1 inet manual
 
-iface eth2 inet manual
+iface eno2 inet manual
 
 auto bond0
 iface bond0 inet static
-      slaves eth1 eth2
+      slaves eno1 eno2
       address  192.168.1.2
       netmask  255.255.255.0
       bond_miimon 100
@@ -249,8 +281,8 @@ auto vmbr0
 iface vmbr0 inet static
         address  10.10.10.2
         netmask  255.255.255.0
-       gateway  10.10.10.1
-        bridge_ports eth0
+        gateway  10.10.10.1
+        bridge_ports eno1
         bridge_stp off
         bridge_fd 0
 
@@ -265,13 +297,13 @@ This can be used to make the guest network fault-tolerant.
 auto lo
 iface lo inet loopback
 
-iface eth1 inet manual
+iface eno1 inet manual
 
-iface eth2 inet manual
+iface eno2 inet manual
 
 auto bond0
-iface bond0 inet maunal
-      slaves eth1 eth2
+iface bond0 inet manual
+      slaves eno1 eno2
       bond_miimon 100
       bond_mode 802.3ad
       bond_xmit_hash_policy layer2+3
@@ -280,7 +312,7 @@ auto vmbr0
 iface vmbr0 inet static
         address  10.10.10.2
         netmask  255.255.255.0
-       gateway  10.10.10.1
+        gateway  10.10.10.1
         bridge_ports bond0
         bridge_stp off
         bridge_fd 0
@@ -289,5 +321,5 @@ iface vmbr0 inet static
 
 ////
 TODO: explain IPv6 support?
-TODO: explan OVS
+TODO: explain OVS
 ////