Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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

Syntax:

ifconfig IFNAME

[IP/MASK ] [delete | -alias] [ up ] [down ]

[info "TEXT up to 72 chars"]

[mtu N]

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

  • "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
  • "IP/MASK" - specifies the IP-address assigned to the interface and mask.

Example,

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.

For example, after executing the following commands:

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.

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.

CAUTION

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

Example,

ifconfig eth0 193.124.189.1/27 -alias
  • "[-]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.

System limitations:

The lo0 interface cannot be set to the down state. Radio interfaces’ (rfX.X) states are not saved in the configuration (after rebooting all radio interfaces of the unit are in the up state).

Examples,

ifconfig eth0 up
ifconfig eth0 1.1.1.1/24 up
ifconfig rf5.0 down
  • "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 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.

CAUTION

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

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

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

  • 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" parameter sets 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.

Example,

ifconfig vlan1 1.1.1.1/24 vlan 5 vlandev eth0 up

or

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 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 - 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 tag of the incoming doubled-tagged traffic and assigns the outer tag to the outgoing tagged traffic.

Example, qinq

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

Example, qtun

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.

To see the configuration of all interfaces of the unit, use the "ifconfig -a" command.

  • No labels