This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x IP address assignment

I'm trying to understand better how the IP address is/should be assigned to the AM335x.

I have a Linksys Cisco router that's connected to our network and to my laptop. I used one of the ports on that and connected the AM335x board to it but didn't get an IP address.

When I checked the ifconfig there was only the loopback address present.

I checked out the  boot arguments and it looked like ip was being set to ip_method, which is not set.

I thought I could set an address as such:

[    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait ip=169.254.0.2 consoleblank=0

And doing this, did get me an IP address, but not what I expected: 

126.1.70.136 login: root
-sh-4.2# ifconfig
eth0      Link encap:Ethernet  HWaddr D0:FF:50:2A:18:7C
             inet addr:126.1.70.136  Bcast:126.1.70.255  Mask:255.255.255.0

my laptop (same router) is 126.1.70.83, and I was able to ping the board, so I know it worked to obtain the IP address... but it took a long time, and the IP was not what I had expected. Can I get advice on what went wrong and what would have worked to get my expected results?

  • Mike,

    What happens when you connect your board to the router? Any log messages in the console? Does your router have a DHCP server?

    Usually, when you plug the ethernet cable in the am335x board, the board will detect that the PHY link is up, but will not automatically try to obtain an IP address. To obtain a valid IP address from the router's DHCP server you must bring the ethernet interface up with "ifup eth0" and then it will output messages like these:

    root@am335x-evm:~# ifup eth0
    udhcpc (v1.20.2) started
    Sending discover...
    Sending select for 172.20.1.223...
    Lease of 172.20.1.223 obtained, lease time 432000
    /etc/udhcpc.d/50default: Adding DNS 172.20.0.1
    /etc/udhcpc.d/50default: Adding DNS 172.18.0.1

    If your router doesn't have a DHCP server, then you may try to pass something similar to this to the kernel boot arguments:

    ip=192.168.1.100:::255.255.255.0:myboard:eth0:on

    Best regards,
    Miroslav