Hide_comments |
---|
Scroll Ignore | |
---|---|
|
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 | ||||
---|---|---|---|---|
| ||||
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 ] |
|
...
|
...
Example,
...
language | java |
---|---|
theme | DJango |
...
|
...
|
...
For example, after executing the following commands:
Code Block | ||||
---|---|---|---|---|
| ||||
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.
...
|
...
|
...
|
...
Warning | ||
---|---|---|
| ||
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 | ||||
---|---|---|---|---|
| ||||
ifconfig eth0 193.124.189.1/27 -alias |
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
language | java |
---|---|
theme | DJango |
...
ifconfig eth0 up
ifconfig eth0 1.1.1.1/24 up
ifconfig rf5.0 down
...
| |||
[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.
|
...
MTU paramater makes sense only on Layer 3 level(in routing mode).
"Media" parameter allows specifying physical Ethernet interface 10/100/1000 type.
| |||
[media MediaType] | Allows to specify physical Ethernet interface type, by default is "auto". Allowed MediaType values (model dependent) |
...
:
|
...
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.
|
...
|
...
|
...
Example,
Code Block | ||||
---|---|---|---|---|
| ||||
ifconfig vlan1 1.1.1.1/24 vlan 5 vlandev eth0 up |
or
Code Block | ||||
---|---|---|---|---|
| ||||
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.
...
|
...
|
...
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:
|
...
|
...
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).
| |
clearstat | Resets a statistic of the network interface. |
destroy | Removes the virtual interface configuration. |
Examples
Display the statistic for the network interface "eth0".
|
...
|
...
|
...
ifc vlan2 qinq mtu 1500 up
ifc vlan2 vlan 2 vlandev eth0
Example, qtun
Code Block | ||||
---|---|---|---|---|
| ||||
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.
...
| |||||||
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.
|