Page tree

Versions Compared

Key

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

...

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

Syntax:

ifconfig IFNAME

[info "TEXT up to 72 chars"][address[/netmask] [ IP/MASK ] [delete | -alias] [ up up ] [ down down ]

[mtu Ninfo "TEXT up to 72 chars"]

[link0 | link1 | link2mtu N]

[media MediaType]]

[vlan TAG  [-]vlandev IFParent] [[-]qinq (0x88A8) | [-]qtun (0x8100)]

clearstat

destroy

ifconfig –a

 

MediaType:            1000BaseFX-fullduplex, 1000BaseFX-halfduplex

       auto

      10BaseT-halfduplex, 10BaseT-halfduplex-manual,

            1000BaseTX  10BaseT-fullduplex, 1000BaseTX10BaseT-fullduplex-halfduplexmanual,

           100BaseTX-fullduplex  100BaseTX-halfduplex, 100BaseTX-halfduplex-manual,

      100BaseTX-fullduplex, 100BaseTX-fullduplex-manual, 

     10BaseT  1000BaseTX-fullduplexhalfduplex, 10BaseT1000BaseTX-halfduplex,           auto-manual,

      1000BaseTX-fullduplex, 1000BaseTX-fullduplex-manual


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

...

  • "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)
  • "info" - allows adding a text note of up to 72 characters to the interface configuration
  • "addressIP/MASK" - specifies the IP-address assigned to the interface . May be specified as:
  • IP-address/number of bits in the mask
  • IP-address: mask
  • IP-addressand mask.

Example,

Code Block
languagejava
themeDJango
ifconfig eth0 192.168.1.1/26
ifconfig eth0 192.168.1.1:255.255.255.192
ifconfig eth0 192.168.1.1
  • "delete| -alias" - alias flag in the interface configuration indicates that several IP-addresses are assigned to one interface. Each new IP-address assigned to an interface (except the first, called primary) is considered as an alias address.

...

To remove an IP-address from the unit’s interface, the “ifconfig” command is executed with the "delete" or "-alias" option following the IP-address to be removed.

Warning
titleCAUTION

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

...

  • "[-]alias" is applicable to any IP-address, that is to say, 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.

...

  • "mtu N" - 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 MTU value facilitates improving the work condition for a client with very low signal. In addition, it can be used to vary parameters of the tunnel interfaces.
Warning
titleCAUTION

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

...

Allowed MediaType values (model dependent), by default auto:1000BaseFX

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

...

By default: auto

  • 1000BaseTX-fullduplex-manual

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

  • "Vlan" parameter sets VLAN tag VLAN tag for the current interface (1-4094)
  • "Vlandev" parameter creates a connection with a physical interface which serves the media – eth0 in this case.

...

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

Both additional parameters of vlanX interface should be entered in one line as it is shown in the example, and if needed one can add a new IP-address setup. For the normal vlanX interface functioning, a physical interface eth0 should be in the active state (up flag).

One can enable IEEE 802.1Q-in-Q support on the unit. IEEE 802.1Q-in-Q allows adding an outer VLAN ID VLAN ID tag to IEEE 802.1Q tagged traffic forming so called “double-tagged” frames, thus, making it possible to encapsulate multiple штук VLANs VLANs (inner, CVLAN) within one single outer VLANSVLAN.

To configure IEEE 802.1Q-in-Q VLAN tagging VLAN tagging on the unit the link0” option of the “ifconfig” command is used. following options are used:

  • qinq - complies to SVLAN with EtherType 0x88A8
  • qtun - 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 VLAN ID tag of the incoming doubled-tagged traffic and assigns the outer tag to the outgoing tagged traffic.

Example, qinq

Code Block
languagejava
themeDJango
ifc vlan2 1.1.1.1/24 qinq mtu 1500 up
ifc vlan2 vlan 2 vlandev eth0 link0

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.

...