linux:netzwerk:interfaces_redhat
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux:netzwerk:interfaces_redhat [2021/06/29 13:39] – stone | linux:netzwerk:interfaces_redhat [2021/11/11 14:47] (current) – [Beispiel Interface mit VLAN und IP] stone | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Interface Config ====== | ====== Interface Config ====== | ||
| - | |||
| - | ===== Beispiele mit der Interface Config ===== | ||
| Echte Config Files unter / | Echte Config Files unter / | ||
| + | \\ | ||
| + | ===== Beispiel Interface mit IP ===== | ||
| + | **ifcfg-enp1s0** | ||
| + | < | ||
| + | NAME=enp1s0 | ||
| + | DEVICE=enp1s0 | ||
| + | TYPE=Ethernet | ||
| + | ONBOOT=yes | ||
| + | BOOTPROTO=static | ||
| + | NM_CONTROLLED=no | ||
| + | IPADDR=10.0.0.10 | ||
| + | NETMASK=255.255.255.0 | ||
| + | GATEWAY=10.0.0.1 | ||
| + | DNS1=9.9.9.9 | ||
| + | DNS2=1.1.1.1 | ||
| + | MTU=1500 | ||
| + | </ | ||
| + | \\ | ||
| - | ==== Config eines Interfaces für ein Bond==== | + | ===== Beispiel Interface mit VLAN und IP ===== |
| + | **ifcfg-enp1s0** | ||
| + | < | ||
| + | NAME=enp1s0 | ||
| + | DEVICE=enp1s0 | ||
| + | TYPE=Ethernet | ||
| + | ONBOOT=yes | ||
| + | BOOTPROTO=none | ||
| + | </ | ||
| + | \\ | ||
| + | |||
| + | **ifcfg-enp1s0.10** | ||
| + | < | ||
| + | NAME=enp1s0.10 | ||
| + | DEVICE=enp1s0.10 | ||
| + | ONBOOT=yes | ||
| + | BOOTPROTO=none | ||
| + | NM_CONTROLLED=no | ||
| + | IPADDR=10.0.0.10 | ||
| + | NETMASK=255.255.255.0 | ||
| + | GATEWAY=10.0.0.1 | ||
| + | DNS1=9.9.9.9 | ||
| + | DNS2=1.1.1.1 | ||
| + | MTU=1500 | ||
| + | VLAN=yes | ||
| + | </ | ||
| + | \\ | ||
| + | |||
| + | **VLAN Kernel Module** | ||
| + | < | ||
| + | modprobe 8021q | ||
| + | |||
| + | |||
| + | lsmod | grep 8021q | ||
| + | 8021q 36864 0 | ||
| + | garp | ||
| + | mrp 20480 1 8021q | ||
| + | |||
| + | |||
| + | echo " | ||
| + | </ | ||
| + | |||
| + | ===== Beispiele LACP Bond mit IP ===== | ||
| + | |||
| + | **ifcfg-enp1s0** | ||
| < | < | ||
| NAME=enp1s0 | NAME=enp1s0 | ||
| Line 18: | Line 78: | ||
| \\ | \\ | ||
| - | ==== Config eines Bonds als LACP==== | + | **ifcfg-enp1s1** |
| + | < | ||
| + | NAME=enp1s1 | ||
| + | DEVICE=enp1s1 | ||
| + | TYPE=Ethernet | ||
| + | ONBOOT=yes | ||
| + | BOOTPROTO=none | ||
| + | MASTER=bond0 | ||
| + | SLAVE=yes | ||
| + | NM_CONTROLLED=no | ||
| + | </ | ||
| + | \\ | ||
| + | |||
| + | **ifcfg-bond0** | ||
| < | < | ||
| NAME=bond0 | NAME=bond0 | ||
| Line 28: | Line 101: | ||
| BONDING_OPTS=" | BONDING_OPTS=" | ||
| NM_CONTROLLED=no | NM_CONTROLLED=no | ||
| + | IPADDR=10.0.0.10 | ||
| + | NETMASK=255.255.255.0 | ||
| + | GATEWAY=10.0.0.1 | ||
| + | DNS1=9.9.9.9 | ||
| + | DNS2=1.1.1.1 | ||
| + | MTU=1500 | ||
| + | VLAN=yes | ||
| </ | </ | ||
| \\ | \\ | ||
| + | ===== Beispiele LACP Bond mit VLAN ===== | ||
| + | **ifcfg-enp1s0** | ||
| + | < | ||
| + | NAME=enp1s0 | ||
| + | DEVICE=enp1s0 | ||
| + | TYPE=Ethernet | ||
| + | ONBOOT=yes | ||
| + | BOOTPROTO=none | ||
| + | MASTER=bond0 | ||
| + | SLAVE=yes | ||
| + | NM_CONTROLLED=no | ||
| + | </ | ||
| + | \\ | ||
| + | **ifcfg-enp1s1** | ||
| + | < | ||
| + | NAME=enp1s1 | ||
| + | DEVICE=enp1s1 | ||
| + | TYPE=Ethernet | ||
| + | ONBOOT=yes | ||
| + | BOOTPROTO=none | ||
| + | MASTER=bond0 | ||
| + | SLAVE=yes | ||
| + | NM_CONTROLLED=no | ||
| + | </ | ||
| + | \\ | ||
| + | |||
| + | **ifcfg-bond0** | ||
| + | < | ||
| + | NAME=bond0 | ||
| + | DEVICE=bond0 | ||
| + | BONDING_MASTER=yes | ||
| + | TYPE=Bond | ||
| + | ONBOOT=yes | ||
| + | BOOTPROTO=none | ||
| + | BONDING_OPTS=" | ||
| + | NM_CONTROLLED=no | ||
| + | </ | ||
| + | \\ | ||
| + | |||
| + | **ifcfg-bond0.10** | ||
| + | < | ||
| + | DEVICE=bond0.10 | ||
| + | NAME=bond0.10 | ||
| + | BOOTPROTO=static | ||
| + | ONPARENT=yes | ||
| + | IPADDR=10.0.0.10 | ||
| + | NETMASK=255.255.255.0 | ||
| + | GATEWAY=10.0.0.1 | ||
| + | DNS1=9.9.9.9 | ||
| + | DNS2=1.1.1.1 | ||
| + | MTU=1500 | ||
| + | VLAN=yes | ||
| + | NM_CONTROLLED=no | ||
| + | </ | ||
linux/netzwerk/interfaces_redhat.1624973964.txt.gz · Last modified: by stone
