Registered User |
Registered User No edit summary |
||
(8 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{ApplicableFor | |||
|MPUs list=STM32MP13x, STM32MP15x, STM32MP21x, STM32MP23x, STM32MP25x | |||
|MPUs checklist=STM32MP13x, STM32MP15x, STM32MP21x, STM32MP23x, STM32MP25x | |||
}} | |||
<noinclude></noinclude> | |||
== Article purpose == | == Article purpose == | ||
This article provides the basic information needed to start using the Linux<sup>®</sup> kernel tool: '''ifconfig'''<ref name=ifconfigref/>. | This article provides the basic information needed to start using the Linux<sup>®</sup> kernel tool: '''ifconfig'''<ref name=ifconfigref/>. | ||
Line 9: | Line 15: | ||
| style="text-align:left;" | '''ifconfig'''<ref name=ifconfigref>https://linux.die.net/man/8/ifconfig</ref> is a system administration utility for network interface configuration.<br><br>{{highlight|'''ifconfig''' is deprecated and has been replaced by [[IP Linux command line|''ip'']]}} (A web page provides a comparison between ifconfig and ip <ref>https://tty1.net/blog/2010/ifconfig-ip-comparison_en.html</ref>) | | style="text-align:left;" | '''ifconfig'''<ref name=ifconfigref>https://linux.die.net/man/8/ifconfig</ref> is a system administration utility for network interface configuration.<br><br>{{highlight|'''ifconfig''' is deprecated and has been replaced by [[IP Linux command line|''ip'']]}} (A web page provides a comparison between ifconfig and ip <ref>https://tty1.net/blog/2010/ifconfig-ip-comparison_en.html</ref>) | ||
|| {{Y}} || {{Y}} || {{Y}} | || {{Y}} || {{Y}} || {{Y}} | ||
|| {{Y}} || {{ | || {{Y}} || {{N}} || {{Y}} | ||
|- | |- | ||
</onlyinclude> | </onlyinclude> | ||
Line 19: | Line 25: | ||
It comes with the '''busybox''': | It comes with the '''busybox''': | ||
{{Board$}} which ifconfig | xargs ls -la | {{Board$}}which ifconfig | xargs ls -la | ||
/sbin/ifconfig -> /bin/busybox.nosuid | lrwxrwxrwx 1 root root 23 May 9 11:47 /usr/sbin/ifconfig -> /usr/bin/busybox.nosuid | ||
=== Using the STM32MPU Embedded Software distribution for Android™ === | === Using the STM32MPU Embedded Software distribution for Android™ === | ||
Line 26: | Line 32: | ||
It comes with the '''toybox''': | It comes with the '''toybox''': | ||
{{Board$}} which ifconfig | xargs ls -la | {{Board$}}which ifconfig | xargs ls -la | ||
/system/bin/ifconfig -> toybox | /system/bin/ifconfig -> toybox | ||
Line 33: | Line 39: | ||
{{Android | Need to enable root access rights for any changes | {{Android | Need to enable root access rights for any changes | ||
*Using ADB shell is ADB link available: | *Using ADB shell is ADB link available: | ||
{{PC$}} adb root | {{PC$}}adb root | ||
{{PC$}} adb shell | {{PC$}}adb shell | ||
{{Board$}} ... | {{Board$}}... | ||
*Using uart console shell: | *Using uart console shell: | ||
{{Board$}} su | {{Board$}}su | ||
{{Board$}} ... | {{Board$}}... | ||
}} | }} | ||
=== List the available network interfaces === | === List the available network interfaces === | ||
{{Board$}} ifconfig | {{Board$}}ifconfig | ||
<pre> | <pre> | ||
end0 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 | 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 | inet6 addr: fe80::280:e1ff:fe42:4365%lo/64 Scope:Link | ||
Line 67: | Line 73: | ||
=== Disable the network interface === | === Disable the network interface === | ||
{{Warning|Please make sure that no remote terminal is connected through this network (ssh), otherwise you will lost your shell connection.}} | {{Warning|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 | * For example, proceed as follows for end0 | ||
{{Board$}} ifconfig | {{Board$}}ifconfig end0 down | ||
=== Enable the network interface if it is not already available === | === Enable the network interface if it is not already available === | ||
* For example, proceed as follows for | * For example, proceed as follows for end0 | ||
{{Board$}} ifconfig | {{Board$}}ifconfig end0 up | ||
=== Assign a given IP address to a network interface === | === Assign a given IP address to a network interface === | ||
* Proceed as follows to assign 10.48.1.324 address to | * Proceed as follows to assign 10.48.1.324 address to end0 | ||
{{Board$}} ifconfig | {{Board$}}ifconfig end0 10.48.1.324 | ||
== To go further == | == To go further == | ||
Line 84: | Line 90: | ||
<references /> | <references /> | ||
<noinclude> | |||
{{ ArticleBasedOnModel | Trace and debug tools article model }} | {{ ArticleBasedOnModel | Trace and debug tools article model }} | ||
{{ PublicationRequestId | 9037 | 10Oct'18 }} | {{ PublicationRequestId | 9037 | 10Oct'18 }} | ||
[[Category:Linux monitoring tools]] | [[Category:Linux monitoring tools]] | ||
[[Category:Android]] | |||
</noinclude> | </noinclude> |
Latest revision as of 10:47, 5 November 2024
1. Article purpose[edit | edit source]
This article provides the basic information needed to start using the Linux® kernel tool: ifconfig[1].
2. Introduction[edit | edit source]
The following table provides a brief description of the tool, as well as its availability depending on the software packages:
: this tool is either present (ready to use or to be activated), or can be integrated and activated on the software package.
: 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. ifconfig is deprecated and has been replaced by ip (A web page provides a comparison between ifconfig and ip [2]) |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
3. Installing the trace and debug tool on your target board[edit | edit source]
3.1. Using the STM32MPU Embedded Software distribution[edit | edit source]
ifconfig is installed by default and ready to be used with all STM32MPU Embedded Software Packages.
It comes with the busybox:
which ifconfig | xargs ls -la
lrwxrwxrwx 1 root root 23 May 9 11:47 /usr/sbin/ifconfig -> /usr/bin/busybox.nosuid
3.2. Using the STM32MPU Embedded Software distribution for Android™[edit | edit source]
ifconfig is installed by default and ready to be used with all STM32MPU Embedded Software Packages for Android™.
It comes with the toybox:
which ifconfig | xargs ls -la
/system/bin/ifconfig -> toybox
4. Getting started[edit | edit source]
Follow the sequence described below to get started with the ifconfig tool.
![]() |
Below information is related to the Android™ distribution Need to enable root access rights for any changes
adb root
adb shell
...
su
...
|
4.1. List the available network interfaces[edit | edit source]
ifconfig
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)end0 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
4.2. Disable the network interface[edit | edit source]
- For example, proceed as follows for end0
ifconfig end0 down
4.3. Enable the network interface if it is not already available[edit | edit source]
- For example, proceed as follows for end0
ifconfig end0 up
4.4. Assign a given IP address to a network interface[edit | edit source]
- Proceed as follows to assign 10.48.1.324 address to end0
ifconfig end0 10.48.1.324
5. To go further[edit | edit source]
Refer to the man page[1] for more details on command options.
6. References[edit | edit source]