Description

The "ifconfig" command allows to manage network interfaces configuration.

Syntax:

usage:
   ifconfig IFNAME
   [IP/MASK] [delete | -alias] [ up ] [ down ]
   [info "TEXT up to 72 chars"]
   [mtu N] - IPv4 datagram size
   [poe | -poe]
   [media MediaType]]
   [vlan TAG [-]vlandev IFParent] [[-]qinq (0x88A8) | [-]qtun (0x8100) | [-]dot1ah]
   clearstat
   destroy
   ifconfig -a

   MediaType:
        auto
        10BaseT-halfduplex      10BaseT-halfduplex-manual
        10BaseT-fullduplex      10BaseT-fullduplex-manual
        100BaseTX-halfduplex    100BaseTX-halfduplex-manual
        100BaseTX-fullduplex    100BaseTX-fullduplex-manual

Parameters

Parameter

Description

-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).

When "ifconfig eth0 delete" command is executed the CES module (if connected) becomes inactive. Reboot the device to activate CES again.

[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.

[poe | -poe]

Enables/disables support of POE at the interface.

The option is available for the platform H11 only.

[media MediaType]

Allows to specify physical Ethernet interface type, by default is "auto". Allowed MediaType values (model dependent): 

    • "auto";

    • "10BaseT-halfduplex, 10BaseT-halfduplex-manual";

    • "10BaseT-fullduplex, 10BaseT-fullduplex-manual";

    • "100BaseTX-halfduplex, 100BaseTX-halfduplex-manual";

    • "100BaseTX-fullduplex, 100BaseTX-fullduplex-manual".

[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".

 ifconfig eth0
eth0: flags=8103<UP,BROADCAST,PROMISC,MULTICAST> mtu 1500
        inet 10.10.10.14 netmask 0xffffff00 broadcast 10.10.10.255
        ether 00:04:35:03:f7:dd
        Info: "TEST TEXT"

        Physical link is UP, 100 Mbps Full-duplex, Auto
        PHY chip: Texas Instruments TLK10x ID: a2102000
        +--------------------------------+------+-----+
        |                 Supported modes| Self |Peer |
        +--------------------------------+------+-----+
        |                Auto-Negotiation| yes  | yes |
        |             10 Mbps Half-duplex| yes  | yes |
        |             10 Mbps Full-duplex| yes  | yes |
        |            100 Mbps Half-duplex| yes  | yes |
        |            100 Mbps Full-duplex| yes  | yes |
        +--------------------------------+------+-----+

        eth0: administrative status UP
        +--------------------------------+-----------------------------------+
        |       Receive statistics       |        Transmit statistics        |
        +--------------------------------+-----------------------------------+
        | Packets            151119      | Packets               28157       |
        | Bytes              28869191    | Bytes                 11833627    |
        | Load (kbps)        22          | Load (kbps)           10          |
        | Load (pps)         14          | Load (pps)            6           |
        | Frame size (bytes) 196         | Frame size (bytes)    208         |
        +--------------------------------+-----------------------------------+
        | CRC errors         0           | Carrier lost          0           |
        | Pause packets      0           | Excessive deferrals   0           |
        | Overruns           0           | Late collisions       0           |
        | Runts              0           | Multiple collisions   0           |
        | Short packets      0           | Single collisions     0           |
        | Alignment errors   0           | Lost in MAC frames    0           |
        | Long packets       0           | Excessive collision   0           |
        | Out of range       0           | Queue overflow        0           |
        | In range errors    0           |                                   |
        | Descriptor errors  0           |                                   |
        +--------------------------------+-----------------------------------+

IP-addresses can be added on the interface in different ways.

ifconfig eth0 192.168.1.1/26 
ifconfig eth0 192.168.1.1:255.255.255.192 
ifconfig eth0 192.168.1.1

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.

ifconfig eth0 193.124.189.1/27 up 
ifconfig eth0 10.0.0.1 alias

Create the "vlan1" interface with tag 5 and connect it to the "eth0" interface.

Break the connection between "vlan1" and "eth0".

ifconfig vlan1 up 
ifconfig vlan1 vlan 5 vlandev eth0 
ifconfig vlan1 -vlandev 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.

ifc vlan2 qinq mtu 1500 up 
ifc vlan2 vlan 2 vlandev eth0

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.

ifconfig vlan100 vlan 100 vlandev eth0 dot1ah up
ifconfig pbb 1 up
pbb 1 parent vlan100 isid 200