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:38] 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>
 +\\
  
-==== Config eines Interfaces für ein Bond====+===== 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 ===== 
 + 
 +**ifcfg-enp1s0** 
 +<code>
 NAME=enp1s0 NAME=enp1s0
 DEVICE=enp1s0 DEVICE=enp1s0
Line 14: Line 75:
 SLAVE=yes SLAVE=yes
 NM_CONTROLLED=no NM_CONTROLLED=no
 +</code>
 \\ \\
  
-==== Config eines Bonds als LACP====+**ifcfg-enp1s1** 
 +<code> 
 +NAME=enp1s1 
 +DEVICE=enp1s1 
 +TYPE=Ethernet 
 +ONBOOT=yes 
 +BOOTPROTO=none 
 +MASTER=bond0 
 +SLAVE=yes 
 +NM_CONTROLLED=no 
 +</code> 
 +\\ 
 + 
 +**ifcfg-bond0** 
 +<code>
 NAME=bond0 NAME=bond0
 DEVICE=bond0 DEVICE=bond0
Line 25: Line 101:
 BONDING_OPTS="mode=4 miimon=100 lacp_rate=1" BONDING_OPTS="mode=4 miimon=100 lacp_rate=1"
 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
 +</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>
 +\\
 +
 +**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
 +</code>
 +\\
 +
 +**ifcfg-bond0.10**
 +<code>
 +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
 +</code>
  
  
linux/netzwerk/interfaces_redhat.1624973913.txt.gz · Last modified: by stone