Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Hide_comments

Scroll Ignore

Table of Contents

Description

The command is used to set and view the configuration of the unit’s network interfaces"ifconfig" command allows to manage network interfaces configuration.

Syntax:

Code Block
languagetext
themeEmacs
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)

...

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, 

      1000BaseTX-halfduplex, 1000BaseTX-halfduplex-manual,

      1000BaseTX-fullduplex, 1000BaseTX-fullduplex-manual

The command allows setting and viewing the configuration of the unit’s interfaces specified by their ID numbers.

The command has the following parameters:

...

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

...

Example,

...

languagejava
themeDJango

...

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

...

For example, after executing the following commands:

Code Block
languagejava
themeDJango
ifconfig eth0 193.124.189.1/27 up
ifconfig eth0 10.0.0.1

There will be two IP-addresses from two different networks assigned to the same eth0 interface.

...

  •  "-alias" allows to remove an IP-address from

...

  • an interface,

...

  • is

...

Warning
titleCAUTION

When “ifconfig eth0 delete” command is executed the CES module (if connected) becomes inactive. Only unit’s restart can reactivate the module.

Example,

Code Block
languagejava
themeDJango
ifconfig eth0 193.124.189.1/27 -alias

...

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

...

Warning

...

title

...

languagejava
themeDJango

...

ifconfig eth0 up
ifconfig eth0 1.1.1.1/24 up
ifconfig rf5.0 down

...

WARNING

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.

Note
title

...

MTU paramater makes sense only on Layer 3 level(in routing mode).

"Media" parameter allows specifying physical Ethernet interface 10/100/1000 type.

NOTE

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

...

1000BaseTX-halfduplex, 1000BaseTX-halfduplex-manual

...

1000BaseTX-fullduplex, 1000BaseTX-fullduplex-manual

For vlanX (VLAN IEEE 802.1q) configuration one should use "vlan" and "vlandev" options in "ifconfig" command.

...

    • ".

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

...

Example,

Code Block
languagejava
themeDJango
ifconfig vlan1 1.1.1.1/24 vlan 5 vlandev eth0 up

or

Code Block
languagejava
themeDJango
ifconfig vlan1 1.1.1.1/24 up
ifconfig vlan1 vlan 5 vlandev eth0
ifconfig vlan1 -vlandev eth0

Last line in the example cancels the connection between vlan1 logical interface and physical device eth0.

...

  • 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.
    • "pbbN (up|down)" creates Provider Backbone Bridge number N, "up/down" sets the state of this bridge. On both sides of the channel must be activated bridges with same names.

clearstat

Resets a statistic of the network interface.

destroy

Removes the virtual interface configuration.

Examples

Display the statistic for the network interface "eth0".

Code Block
language

...

text
theme

...

Emacs

...

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

Example, qtun

Code Block
languagejava
themeDJango
ifc vlan2 qtun mtu 1500 up
ifc vlan2 vlan 2 vlandev eth0

Use option "destroy" to remove any virtual interface configuration.

To display the current configuration of an interface, an "ifconfig" command may be executed with the interface name as the only parameter.

...

 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.

Code Block
languagetext
themeEmacs
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.

Code Block
languagetext
themeEmacs
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".

Code Block
languagetext
themeEmacs
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.

Code Block
languagetext
themeEmacs
ifc vlan2 qinq mtu 1500 up 
ifc vlan2 vlan 2 vlandev eth0