| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision |
| playground:arinc9:network.interfaces [2021/09/22 08:26] – [Certain Types of Network Interfaces] arinc9 | playground:arinc9:network.interfaces [2021/09/22 08:31] – [Certain Types of Network Interfaces] arinc9 |
|---|
| ==== Certain Types of Network Interfaces ==== | ==== Certain Types of Network Interfaces ==== |
| Network interfaces can be distinguished, by software, by what the interface uses (physical devices & software features) to transmit data.\\ | Network interfaces can be distinguished, by software, by what the interface uses (physical devices & software features) to transmit data.\\ |
| E.g.: Network interface (uses a NIC), wireless interface (uses a wireless NIC), loopback interface, bridge interface (uses bridging feature of software), 802.1q vlan interface (uses vlan feature of software), veth interface (uses virtual ethernet feature of software), tunnel interface (uses tunnelling feature of software), dummy interface, etc. | For example: Ethernet interface (uses a NIC), wireless interface (uses a wireless NIC), loopback interface, bridge interface (uses bridging feature of software), 802.1q vlan interface (uses vlan feature of software), veth interface (uses virtual ethernet feature of software), tunnel interface (uses tunnelling feature of software), dummy interface, etc. |
| |
| * <color maroon>**//Ethernet Interfaces//**</color>: ''eth0'', ''eth1'', etc.\\ are created using ethernet devices (switches, NICs, virtual NICs, etc.). As soon as the [[https://www.kernel.org/doc/html/latest/networking/device_drivers/ethernet/index.html| Ethernet Device driver]] is loaded on the kernel, the driver creates the corresponding network interface. | * <color maroon>**//Ethernet Interfaces//**</color>: ''eth0'', ''eth1'', etc.\\ are created using ethernet devices (switches, NICs, virtual NICs, etc.). As soon as the [[https://www.kernel.org/doc/html/latest/networking/device_drivers/ethernet/index.html| Ethernet Device driver]] is loaded on the kernel, the driver creates the corresponding network interface. |
| |
| ==== Subinterfaces & Naming the Network Interfaces ==== | ==== Subinterfaces & Naming the Network Interfaces ==== |
| The term "subinterface" means that an interface is based off of another interface.\\ | The term "subinterface" means that an interface is based off of another interface. This term is mostly used for VLAN interfaces.\\ |
| E.g.: If the ''br0.5'' VLAN interface is based off of ''br0'', it's a subinterface, of ''br0''. | For example, if the ''br0.5'' VLAN interface is based off of ''br0'', it's a subinterface of ''br0''. |
| |
| <code> | <code> |
| 6: lan1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0 state UP mode DEFAULT group default qlen 1000 | |
| link/ether a1:b2:c3:d4:e5:f6 brd ff:ff:ff:ff:ff:ff | |
| 7: wan@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br0 state LOWERLAYERDOWN mode DEFAULT group default qlen 1000 | |
| link/ether a1:b2:c3:d4:e5:f6 brd ff:ff:ff:ff:ff:ff | |
| 17: br0.5@br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000 | 17: br0.5@br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000 |
| link/ether a1:b2:c3:d4:e5:f6 brd ff:ff:ff:ff:ff:ff | link/ether a1:b2:c3:d4:e5:f6 brd ff:ff:ff:ff:ff:ff |
| * A VLAN interface with ''br0'' and ''.5'' to figure out which interface it's based off of and what VLAN ID it uses\\ | * A VLAN interface with ''br0'' and ''.5'' to figure out which interface it's based off of and what VLAN ID it uses\\ |
| by just looking at the name of the interface. | by just looking at the name of the interface. |
| |
| ===== OpenWrt Configuration ===== | ===== OpenWrt Configuration ===== |
| | {{:meta:icons:tango:dialog-information.png?nolink}} |[[docs:techref:uci]] is a small C utility designed to centralize configuration in OpenWrt.\\ ''[[docs:guide-user:base-system:basic-networking|/etc/config/network]]'' is the network configuration file.\\ ''[[docs:guide-user:network:wifi:basic|/etc/config/wireless]]'' is the wireless configuration file.\\ <color maroon>**UCI creates an abstraction layer for configuring network interfaces**</color>:\\ In ''[[docs:guide-user:base-system:basic-networking|/etc/config/network]]'' you allocate a name like //lan// or //internet_wire// or //whatever// to each ''ifname''-variable for every device and then this name is consistently used through the entire UCI configuration. But this can only be used in conjunction with UCI!| | | {{:meta:icons:tango:dialog-information.png?nolink}} |[[docs:techref:uci]] is a small C utility designed to centralize configuration in OpenWrt.\\ ''[[docs:guide-user:base-system:basic-networking|/etc/config/network]]'' is the network configuration file.\\ ''[[docs:guide-user:network:wifi:basic|/etc/config/wireless]]'' is the wireless configuration file.\\ <color maroon>**UCI creates an abstraction layer for configuring network interfaces**</color>:\\ In ''[[docs:guide-user:base-system:basic-networking|/etc/config/network]]'' you allocate a name like //lan// or //internet_wire// or //whatever// to each ''ifname''-variable for every device and then this name is consistently used through the entire UCI configuration. But this can only be used in conjunction with UCI!| |