User Tools

Site Tools


linux:netzwerk:interfaces_redhat

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:netzwerk:interfaces_redhat [2021/06/29 13:42] stonelinux: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 /etc/sysconfig/network-scripts Echte Config Files unter /etc/sysconfig/network-scripts
 +\\
  
 +===== Beispiel Interface mit IP =====
 +**ifcfg-enp1s0**
 +<code>
 +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
 +</code>
 +\\
 +
 +===== Beispiel Interface mit VLAN und IP =====
 +**ifcfg-enp1s0**
 +<code>
 +NAME=enp1s0
 +DEVICE=enp1s0
 +TYPE=Ethernet
 +ONBOOT=yes
 +BOOTPROTO=none
 +</code>
 +\\
 +
 +**ifcfg-enp1s0.10**
 +<code>
 +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
 +</code>
 +\\
 +
 +**VLAN Kernel Module**
 +<code>
 +modprobe 8021q
 +
 +
 +lsmod | grep 8021q
 +8021q                  36864  0
 +garp                   16384  1 8021q
 +mrp                    20480  1 8021q
 +
 +
 +echo "8021q" >> /etc/modules
 +</code>
 +
 +===== Beispiele LACP Bond mit IP =====
  
-==== Config eines Interfaces für ein Bond==== 
 **ifcfg-enp1s0** **ifcfg-enp1s0**
 <code> <code>
Line 18: Line 77:
 </code> </code>
 \\ \\
 +
 **ifcfg-enp1s1** **ifcfg-enp1s1**
 <code> <code>
Line 29: Line 89:
 NM_CONTROLLED=no NM_CONTROLLED=no
 </code> </code>
 +\\
 +
 +**ifcfg-bond0**
 +<code>
 +NAME=bond0
 +DEVICE=bond0
 +BONDING_MASTER=yes
 +TYPE=Bond
 +ONBOOT=yes
 +BOOTPROTO=none
 +BONDING_OPTS="mode=4 miimon=100 lacp_rate=1"
 +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
 +</code>
 +\\
 +
 +===== Beispiele LACP Bond mit VLAN =====
 +
 +**ifcfg-enp1s0**
 +<code>
 +NAME=enp1s0
 +DEVICE=enp1s0
 +TYPE=Ethernet
 +ONBOOT=yes
 +BOOTPROTO=none
 +MASTER=bond0
 +SLAVE=yes
 +NM_CONTROLLED=no
 +</code>
 +\\
 +
 +**ifcfg-enp1s1**
 +<code>
 +NAME=enp1s1
 +DEVICE=enp1s1
 +TYPE=Ethernet
 +ONBOOT=yes
 +BOOTPROTO=none
 +MASTER=bond0
 +SLAVE=yes
 +NM_CONTROLLED=no
 +</code>
 +\\
  
-==== Config eines Bonds als LACP ==== 
 **ifcfg-bond0** **ifcfg-bond0**
 <code> <code>
Line 44: Line 152:
 \\ \\
  
-==== Config eines Bonds als LACP mit VLAN's ==== 
 **ifcfg-bond0.10** **ifcfg-bond0.10**
 <code> <code>
Line 54: Line 161:
 NETMASK=255.255.255.0 NETMASK=255.255.255.0
 GATEWAY=10.0.0.1 GATEWAY=10.0.0.1
 +DNS1=9.9.9.9
 +DNS2=1.1.1.1
 MTU=1500 MTU=1500
 VLAN=yes VLAN=yes
linux/netzwerk/interfaces_redhat.1624974179.txt.gz · Last modified: by stone