Differences
This shows you the differences between two versions of the page.
|
doc:networking:network.interfaces [2012/12/02 01:54] uvray313 |
doc:networking:network.interfaces [2013/05/12 14:18] (current) ralfbergs Fixed typo. |
||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ===== Types of network interfaces ===== | ===== Types of network interfaces ===== | ||
| - | GNU/Linux universally distinguishes two types of network interfaces: | + | GNU/Linux universally distinguishes between two types of network interfaces: |
| - | * //physical interfaces//: ''eth0'', ''eth1'', ''eth4'', ''radio0'', ''radio1'', ''wlan0'' ..\\ always represent an actual [[wp>Network interface controller|NIC]] or [[wp>Wireless network interface controller|WNIC]]. As soon as the [[wp>Device driver|driver]] is loaded into the Kernel, one or more physical interface become available. | + | |
| - | * //virtual// (or //logical//) //interfaces//: ''lo'', ''eth0:1'', ''eth0.1'', ''vlan2'', ''br0'', ''pppoe-dsl'', ''gre0'', ''sit0'' ''tun0'', ''imq0'', ''teql0'', ..\\ are NOT actual physical network devices but a software representation with the same properties of a physical connection but more flexibility. They are generally associated with a physical interface such as eth0.1 or eth1.1 etc. One exception is the [[wp>Loopback#Virtual_network_interface|loopback interface]] ''lo''. Virtual/Logical interfaces are a useful tool to those users willing to learn about their usage and configuration. | + | ==== Physical Interfaces ==== |
| + | ''eth0'', ''eth1'', ''eth4'', ''radio0'', ''radio1'', ''wlan0'' .. always represent an actual connection between a computer system and a network such as a [[wp>Network interface controller|NIC]] or [[wp>Wireless network interface controller|WNIC]]. As soon as the [[wp>Device driver|driver]] is loaded into the Kernel, one or more physical interfaces become available. | ||
| + | ==== Virtual Interfaces ==== | ||
| + | ''lo'', ''eth0:1'', ''eth0.1'', ''vlan2'', ''br0'', ''pppoe-dsl'', ''gre0'', ''sit0'' ''tun0'', ''imq0'', ''teql0'', .. are NOT actual physical network devices. They are software representations with similar properties to physical connections but with more flexibility. They are generally associated with a physical interface such as eth0.1 or eth1.1 etc but can also associated with virtual ones. One exception is the [[wp>Loopback#Virtual_network_interface|loopback interface]] ''lo''. | ||
| - | ==== Types of physical interfaces ==== | + | A virtual network interface can be associated with a physical interface (eth1.1)or another virtual interface (eth1.1.1) or stand alone such as a [[wp>Loopback#Virtual_network_interface|loopback interface]] ''lo''. |
| - | One could distinguish between physical interfaces belonging to a NIC and ones belonging to a wireless NIC; due to diverging stacks, they behave slightly differently. | + | |
| - | ==== Types of virtual network interfaces ==== | ||
| - | A virtual network interface can be attached to a physical interface or to another virtual interface. | ||
| A virtual network interface can also : | A virtual network interface can also : | ||
| Line 22: | Line 21: | ||
| * be spawned by daemon to manipulate incoming packages: ''[[http://www.linuximq.net/|imq]]0, [[http://lartc.org/howto/lartc.loadshare.html|teq]]1'', | * be spawned by daemon to manipulate incoming packages: ''[[http://www.linuximq.net/|imq]]0, [[http://lartc.org/howto/lartc.loadshare.html|teq]]1'', | ||
| * be created automatically depending on the operating mode of a WNIC : ''ath0'', ''ath1'', ''ath_monitor''. | * be created automatically depending on the operating mode of a WNIC : ''ath0'', ''ath1'', ''ath_monitor''. | ||
| - | |||
| - | Two network interfaces can also be bonded together (please see [[wp>Link aggregation]] and [[wp>Channel bonding]] and [[http://wiki.ubuntuusers.de/Netzwerkkarten_b%C3%BCndeln|Ubuntu Wiki]]) | ||
| | {{:meta:icons:tango:dialog-information.png?nolink}} | The [[http://wireless.kernel.org/|Linux wireless subsystem]] works a little differently. There is always one //physical interface// for each WNIC called the //master interface//. Then, depending on the mode the master interface is configured to, //ad-hoc (IBSS), managed , AP , WDS, mesh point, monitor//, different //virtual interfaces// are created. This is done automatically by default. When wifi is activated, there always will be the master interface __and__ (at least) one virtual interface! | | | {{:meta:icons:tango:dialog-information.png?nolink}} | The [[http://wireless.kernel.org/|Linux wireless subsystem]] works a little differently. There is always one //physical interface// for each WNIC called the //master interface//. Then, depending on the mode the master interface is configured to, //ad-hoc (IBSS), managed , AP , WDS, mesh point, monitor//, different //virtual interfaces// are created. This is done automatically by default. When wifi is activated, there always will be the master interface __and__ (at least) one virtual interface! | | ||
| - | ===== OpenWrt UCI specific ===== | + | ===== Unified Configuration Interface (UCI) ===== |
| - | Please note the UCI creates another, additional abstraction layer for the interfaces. In ''[[doc/uci/network|/etc/config/network]]'' you allocate a name like //lan// or //bob// or //alice// 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! | + | |
| + | [[doc:techref:UCI]] is a small utility designed to centralize configuration in OpenWRT. | ||
| - | ===== Internal Layout ===== | + | ''[[doc:uci:network|/etc/config/network]]'' is the network configuration file.\\ |
| - | -> [[doc:techref:internal.layout|Internal Layout]] provides some examples on how physical interfaces are connected to [[wp>Computer port (hardware)|Computer ports]]. | + | ''[[doc:uci:wireless|/etc/config/wireless]]'' is the wireless configuration file. |
| + | | {{:meta:icons:tango:dialog-information.png?nolink}} |UCI creates an abstraction layer for configuring interfaces. In ''[[doc/uci/network|/etc/config/network]]'' you allocate a name like //lan// or //bob// or //alice// 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!| | ||
| - | ===== Configuration ===== | ||
| - | -> ''[[doc:uci:network|/etc/config/network]]'' is the [[doc:techref:UCI]] configuration file responsible for all network related adjustments made in OpenWrt.\\ | ||
| - | -> ''[[doc:uci:wireless|/etc/config/wireless]]'' is responsible for all wireless related adjustments made in OpenWrt. | ||
| - | If, for whatever reasons, you want to do stuff manually, here you can read about the available packages: | ||
| - | ==== Switch Utilities ==== | ||
| - | A [[wp>Network switch]] may be included on a separate Chip soldered on the PCB or be integrated into the [[doc:hardware:SoC]]. In both cases OpenWrt needs drivers to manage that switch. Additionally there are userspace programs available to configure the switch: | ||
| - | <code> | ||
| - | swconfig | ||
| - | </code> | ||
| - | A switch has Ethernet ports, and sometimes some IC capable of tagging (hardware tagging) but a switch does not contain/incorporate a [[wp>Network interface controller|NIC]]. So Linux will show no physical or virtual software interfaces! Do not confuse a simple //Ethernet port// with a full-blown //NIC//! | + | |
| + | |||
| + | |||
| + | ===== Interface Utilities ===== | ||
| + | |||
| ==== Wired Utilities ==== | ==== Wired Utilities ==== | ||
| Line 115: | Line 109: | ||
| - | ===== Understanding Network Interfaces ===== | ||
| - | {{page>meta:infobox:outdated&noheader&nofooter&noeditbtn}} | ||
| ===== VLAN and bridging concepts ===== | ===== VLAN and bridging concepts ===== | ||
| Line 156: | Line 148: | ||
| This knowledge of bridges is important below. | This knowledge of bridges is important below. | ||
| + | Two network interfaces can also be bonded together (please see [[wp>Link aggregation]] and [[wp>Channel bonding]] and [[http://wiki.ubuntuusers.de/Netzwerkkarten_b%C3%BCndeln|Ubuntu Wiki]]) | ||
| ===== Interfaces under OpenWrt ===== | ===== Interfaces under OpenWrt ===== | ||
| + | ==== Internal Layout ==== | ||
| + | -> [[doc:techref:internal.layout|Internal Layout]] provides some examples on how physical interfaces are connected to [[wp>Computer port (hardware)|Computer ports]]. | ||
| + | |||
| + | |||
| + | |||
| ==== Architecture ==== | ==== Architecture ==== | ||
| This wireless router is actually three devices in one - a Linux host, VLAN-configurable switch, and a wireless radio. The Linux host(eth0) and switch (port 5) are connected internally with a [[wp>Gigabit Media Independent Interface]]. The external ethernet ports 0-4 also belong to the same switch. The diagram below shows the architecture. | This wireless router is actually three devices in one - a Linux host, VLAN-configurable switch, and a wireless radio. The Linux host(eth0) and switch (port 5) are connected internally with a [[wp>Gigabit Media Independent Interface]]. The external ethernet ports 0-4 also belong to the same switch. The diagram below shows the architecture. | ||
| Line 165: | Line 163: | ||
| By default, the switch is configured as two VLANs - vlan0 and vlan1. | By default, the switch is configured as two VLANs - vlan0 and vlan1. | ||
| - | * Ethernet ports 1-4 (labelled LAN 1-3) are configured to vlan0. | + | * Ethernet ports 1-4 (labelled LAN 1-4) are configured to vlan0. |
| * Ethernet port 0 (labelled WAN) is configured to vlan1. | * Ethernet port 0 (labelled WAN) is configured to vlan1. | ||
doc/networking/network.interfaces.1354409679.txt.bz2 · Last modified: 2012/12/02 01:54 by uvray313
This text is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
