Ifconfig command (interfaces configuration)
Description
The "ifconfig" command allows to manage network interfaces configuration.
Syntax:
Parameters
-a
Displays the configuration of all device network interfaces.
IFNAME
Specifies the name of an interface (to see all the unit’s interface names, the "ifconfig -a" or "netstat -i" commands may be executed). If no extra parameters are specified displays configuration and statistics of the interface.
[IP/MASK] [delete | -alias] [ up ] [ down ]
"IP/MASK" – the IP-address assigned to the interface and mask. Sets prefix length /32 (255.255.255.255) if mask value is not specified.
"delete" – removes the IP-address from the interface. "delete" and "-alias" parameters are possible to use without specifying an IP-address, in this case the primary IP-address will be deleted.
"alias" – indicates that IP-address should be added as additional. Each new IP-address assigned to an interface (except the first, called primary) is considered as an alias address. "-alias" allows to remove an IP-address from an interface, is applicable to any IP-address so all IP-addresses assigned to the interface are considered as equivalent aliases. If the first (primary) address is removed, the next (in the order of their assignment) becomes primary.
"up/down" – enables/disables the interface. System limitations:
"lo0" and "null0" interfaces cannot be set to the "down" state;
radio interfaces states are not saved in the configuration (after rebooting all radio interfaces of the unit are in the "up" state).
[info "TEXT up to 72 chars"]
Allows to add a text note of up to 72 characters to an interface configuration.
[mtu N] - IPv4 datagram size
Sets the desirable MTU (Maximum Transfer Unit) size of the packet for the interface (in bytes). The allowed range is from 72 to 1580. Default value is 1500. Usually the value of this parameter does not need to be changed, but in some cases decreasing the MTU value facilitates improving the work condition for a client with very low signal level. In addition, it can be used to vary parameters of the tunnel interfaces.
[media MediaType]
Allows to specify physical Ethernet interface type, by default is "auto". Allowed MediaType values (model dependent).
[vlan TAG [-]vlandev IFParent] [[-]qinq (0x88A8) | [-]qtun (0x8100)| [-]dot1ah]
Sets the configuration of "vlanX" interface (VLAN IEEE 802.1q). Both additional parameters of "vlanX" interface ("vlan" и "vlandev") should be entered in one line.
"vlan" – sets VLAN tag for the current interface (1-4094).
"vlandev" – creates a connection with a physical interface which serves the media – "eth0" in this case. The "-vlandev" parameter remove this connection. For the normal "vlanX" interface functioning, a physical interface "eth0" should be in the "up" state.
IEEE 802.1Q-in-Q support can be enabled on the unit. It allows adding an outer VLAN ID tag to IEEE 802.1Q tagged traffic forming so called "double-tagged" frames, thus, making it possible to encapsulate multiple VLANs (inner, CVLAN) within one single outer SVLAN. To configure IEEE 802.1Q-in-Q VLAN tagging on the unit the following options are used:
“qinq (0x88A8)” – complies to SVLAN with EtherType 0x88A8.
"qtun (0x8100)" – complies to SVLAN with EtherType 0x8100 (by default on Cisco switches).
When this option is enabled the unit’s interface terminates the specified outer VLAN ID tag of the incoming IEEE 802.1Q doubled-tagged traffic and assigns the outer tag to the outgoing tagged traffic (IEEE 802.1ad).
"[-]dot1ah" – enables/disables support on IEEE 802.1ah standart. Allows to configure the Provider Backbone Bridges (PBB), it introduces a hierarchical network architecture with associated new frame formats. PBB architecture aggregates Provider Bridged networks (created by 802.1ad). The IEEE 802.1ah frame format encapsulates customer Ethernet frames it allows to hide customer's MAC-addresses, add also 24-bit service identifier (I-SID) to increase number of VLANs which can be used in backbone area. On both sides of the channel must be activated bridges with same names. For the PBB bridge management, the "pbbN" virtual interface and the "pbb N parent IF isid ID" command are used, where:
"N" – virtual interface number from 0 to 15;
"IF" – interface used as a parent;
"ID" – 24-bit service identifier I-SID.
clearstat
Resets a statistic of the network interface.
destroy
Removes the virtual interface configuration.
Examples
Display the statistic for the network interface "eth0".
IP-addresses can be added on the interface in different ways.
Set "193.124.189.1/27" as a primary IP-address and "10.0.0.1" as an additional for the interface "eth0". Also swich the interface to the "up" state.
Create the "vlan1" interface with tag 5 and connect it to the "eth0" interface.
Break the connection between "vlan1" and "eth0".
Create the "vlan2" interface with tag 2 and connect it to the "eth0" interface. Set 1500 MTU value and enable support of qinq option.
Create a PBB bridge to transfer customer data through the provider's backbone network. Customer traffic will be encapsulated in VLAN 100 with I-SID 200.
Last updated