Ifconfig





1 Article purpose[edit]

This article provides the basic information needed to start using the Linux® kernel tool: ifconfig[1].

2 Introduction[edit]

The following table provides a brief description of the tool, as well as its availability depending on the software packages:

Yes: this tool is either present (ready to use or to be activated), or can be integrated and activated on the software package.

No: this tool is not present and cannot be integrated, or it is present but cannot be activated on the software package.

Tool STM32MPU Embedded Software distribution STM32MPU Embedded Software distribution for Android™
Name Category Purpose Starter Package Developer Package Distribution Package Starter Package Developer Package Distribution Package
ifconfig Monitoring tools ifconfig[1] is a system administration utility for network interface configuration.
Warning.png ifconfig is deprecated and has been replaced by ip.

A web page provides a comparison between ifconfig and ip [2]

Yes Yes Yes
Under construction.png Coming soon

3 Installing the trace and debug tool on your target board[edit]

3.1 Using the STM32MPU Embedded Software distribution[edit]

ifconfig is installed by default and ready to be used with all STM32MPU Embedded Software Packages.

It comes with the busybox:

Board $> which ifconfig | xargs ls -la
/sbin/ifconfig -> /bin/busybox.nosuid

3.2 Using the STM32MPU Embedded Software distribution for Android™[edit]

Under construction.png Coming soon

4 Getting started[edit]

Follow the sequence described below to get started with the ifconfig tool.

4.1 List the available network interfaces[edit]

Board $> ifconfig
eth0      Link encap:Ethernet  HWaddr 00:80:E1:42:43:65  
          inet addr:10.48.1.144  Bcast:10.48.3.255  Mask:255.255.252.0
          inet6 addr: fe80::280:e1ff:fe42:4365%lo/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:181274 errors:0 dropped:14553 overruns:0 frame:0
          TX packets:28583 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:23082127 (22.0 MiB)  TX bytes:6438412 (6.1 MiB)
          Interrupt:66 Base address:0x4000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1%1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:202 errors:0 dropped:0 overruns:0 frame:0
          TX packets:202 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:13454 (13.1 KiB)  TX bytes:13454 (13.1 KiB)

4.2 Disable the network interface[edit]

Warning.png Please make sure that no remote terminal is connected through this network (ssh), otherwise you will lost your shell connection.
  • For example, proceed as follows for eth0
Board $> ifconfig eth0 down

4.3 Enable the network interface if it is not already available[edit]

  • For example, proceed as follows for eth0
Board $> ifconfig eth0 up

4.4 Assign a given IP address to a network interface[edit]

  • Proceed as follows to assign 10.48.1.324 address to eth0
Board $> ifconfig eth0 10.48.1.324

5 To go further[edit]

Refer to the man page[1] for more details on command options.

6 References[edit]

uniprocessor

Receive

Transmit

Attachments

Discussions