SPRADJ8 October 2024 AM3351 , AM3352 , AM3354 , AM3356 , AM3357 , AM3358 , AM3359 , AM4372 , AM4376 , AM4377 , AM4378 , AM4379 , AM620-Q1 , AM623 , AM625 , AM625-Q1 , AM62A3 , AM62A3-Q1 , AM62A7 , AM62A7-Q1 , AM62P , AM6411 , AM6412 , AM6421 , AM6422 , AM6441 , AM6442 , DP83822H , DP83822HF , DP83822I , DP83822IF , DP83826E , DP83826I , DP83848-EP , DP83848Q-Q1 , DP83867CR , DP83867CS , DP83867E , DP83867IR , DP83867IS , DP83TC812R-Q1 , DP83TC812S-Q1 , DP83TC813R-Q1 , DP83TC813S-Q1 , DP83TC814R-Q1 , DP83TC814S-Q1 , DP83TG720R-Q1 , DP83TG720S-Q1 , DP83TG721R-Q1 , DP83TG721S-Q1
This section describes the Linux
utility tools that are used to perform control and status operations. There are
three commonly used utilities in Ethernet interface debugging: ifconfig
, ip
, and ethtool
. The following
are brief descriptions about each utility.
ifconfig
- Provides
basic information regarding the interface. The output provides a summary of the
current state of the interface. The following example shows that the interface
is up and has an IP address (192.168.1.5). There are also counters for the
number of RX and TX packets. The example given here shows a normal working
interface. The ifconfig
utility only gives statistics on a higher networking
layer than ethtool
, which gives the data-link layer results. Additionally,
ifconfig
is
not as up to date as the ip
utility tool.root@am62xx-evm:~# ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.5 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::1e63:49ff:fe1f:d9b2 prefixlen 64 scopeid 0x20<link>
ether 1c:63:49:1f:d9:b2 txqueuelen 1000 (Ethernet)
RX packets 552490 bytes 61792471 (58.9 MiB)
RX errors 0 dropped 6 overruns 0 frame 0
TX packets 646 bytes 50358 (49.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ip
- Networking tool
for controlling and interrogating the network interfaces. The ip
utility is more
versatile than the ifconfig
utility.root@am62xx-evm:~# ip addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 1c:63:49:1f:d9:b2 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.5/24 metric 1024 brd 192.168.1.255 scope global dynamic eth0
valid_lft 73177sec preferred_lft 73177sec
inet6 fe80::1e63:49ff:fe1f:d9b2/64 scope link
valid_lft forever preferred_lft forever
ip
utility.
This is used in a direct connect topology when there is not a DHCP
server
present.root@am62xxsip-evm:~# ip addr add 192.16.1.1/24 dev eth0
root@am62xxsip-evm:~#
root@am62xxsip-evm:~# ip addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 08:04:b4:32:5d:ce brd ff:ff:ff:ff:ff:ff
inet 192.16.1.1/24 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::a04:b4ff:fe32:5dce/64 scope link
valid_lft forever preferred_lft forever
ip
utility.root@am64xx-evm:~# ip -s link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen0
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
RX: bytes packets errors dropped missed mcast
9246 99 0 0 0 0
TX: bytes packets errors dropped carrier collsns
9246 99 0 0 0 0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default ql0
link/ether 1c:63:49:1a:da:62 brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped missed mcast
19654 61 0 0 0 0
TX: bytes packets errors dropped carrier collsns
22919 88 0 0 0 0
...
ethtool
- Provides a method for
displaying and modifying the parameters of the Ethernet interface and
accompanying device driver. There are several options for running
ethtool
. Two of the most commonly used are for examining
the link status and the MAC hardware statistics. The specific options for these
are given as examples throughout this application note.