How to configure ethernet interface



1 Purpose[edit]

This article describes how to configure the Ethernet interface using the Ifconfig tool.


  • Connect an Ethernet cable and enjoy

At startup SSH daemon (sshd) and ifplugd daemon are automatically launched:

  • sshd (useful to perform ssh, scp)
  • ifplugd detect:
    • udhcpc is launched on cable detection to retrieve an IP address,

If a DHCP server is not available, one can set the Ethernet IP adress with :

 Board $> ifconfig eth0 uuu.xxx.yyy.zzz
To check if eth0 and the gateway are well configured, one can type:
 Board $>ifconfig
 Board $>route
In the console, a log similar to the one below should be displayed:
 Board $> ifconfig
 eth0      Link encap:Ethernet  HWaddr 00:80:E1:01:39:61  
           inet addr:10.48.1.172  Bcast:10.48.3.255  Mask:255.255.252.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:18 errors:0 dropped:0 overruns:0 frame:0
           TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000 
           RX bytes:3038 (2.9 KiB)  TX bytes:684 (684.0 B)
           Interrupt:103 
 STM32MP1 # route
 Kernel IP routing table
 Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
 default         lme-gw-vl802.lm 0.0.0.0         UG    10     0        0 eth0
 10.48.0.0       *               255.255.252.0   U     0      0        0 eth0

2 References[edit]

uniprocessor

Receive

Transmit

Attachments

Discussions