linux:netzwerk:interfaces_redhat
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| linux:netzwerk:interfaces_redhat [2021/06/29 13:36] – created 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 ===== |
| - | NAME=eth0 | + | **ifcfg-enp1s0** |
| - | DEVICE=eth0 | + | < |
| + | 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 | ||
| + | DEVICE=enp1s0 | ||
| TYPE=Ethernet | TYPE=Ethernet | ||
| ONBOOT=yes | ONBOOT=yes | ||
| Line 13: | Line 74: | ||
| MASTER=bond0 | MASTER=bond0 | ||
| SLAVE=yes | SLAVE=yes | ||
| + | NM_CONTROLLED=no | ||
| + | </ | ||
| + | \\ | ||
| + | |||
| + | **ifcfg-enp1s1** | ||
| + | < | ||
| + | NAME=enp1s1 | ||
| + | DEVICE=enp1s1 | ||
| + | TYPE=Ethernet | ||
| + | ONBOOT=yes | ||
| + | BOOTPROTO=none | ||
| + | MASTER=bond0 | ||
| + | SLAVE=yes | ||
| + | NM_CONTROLLED=no | ||
| + | </ | ||
| \\ | \\ | ||
| - | ==== Config eines Bonds als LACP==== | + | **ifcfg-bond0** |
| + | < | ||
| NAME=bond0 | NAME=bond0 | ||
| DEVICE=bond0 | DEVICE=bond0 | ||
| Line 24: | 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.1624973810.txt.gz · Last modified: by stone
