Loopback address and network interface handling, general commands
U
SER
G
UIDE
151
IFCONFIG COMMAND
The
ifconfig
command is used to display information about the status of the different network
interfaces present on Imola.
ifconfig <ifname>
where
ifname
is the name of the interface required. For example:
root@Imola >
ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0D:5A:04:6B:3E
inet addr:10.10.113.1 Bcast:10.10.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4059 errors:0 dropped:0 overruns:0 frame:0
TX packets:3064 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:267940 (261.6 KiB) TX bytes:602643 (588.5 KiB)
Interrupt:15
In this example the command displays information about the network interface corresponding to
the eth1 port, including:
the assigned MAC Address (
HWaddr
)
the IP address (
inet addr
)
the Netmask (
Mask
)
the broadcast address (
Bcast
)
the value of Maximum Transfer Unit (
MTU
)
together with some flags indicating the status of the interface:
Up
indicates that the interface is administratively active (
ifAdminStatus
)
Running
indicates that is operational (
ifOperStatus
)
Multicast
and
broadcast
indicate that multicast and broadcast packets may be
transmitted and received
Lastly statistic counters, including the number of transmitted and received packets and possible
errors, are displayed.
In the following example the command displays the status of the eth3 interface associated with the
third port of the integrated switch:
root@Imola >
ifconfig eth3
eth3 Link encap:Ethernet HWaddr 00:00:00:00:00:00
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
It should be noticed that the
running
flag is absent, since no device is connected to this port.
Applying this command to the
loopback interface
,
dummy0
, the following output is displayed: