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.

DHCP doesn't work second time



Developing on a system based on dm8148 board, I am having strange issue which I can't understand.

linux kernel comes from latest PSP 04.04.00.02 and EZSDK is 5.05.02.00

When the unit is connected to the office network, It seems that whenever I started the network (ifup -a) once (static or dynamic IP), after I will disable the network (ifdown -a) and then enable the network again in a dhcp mode, the unit doesn't succeed to get a valid IP.    On the other hand, When I'm connecting the unit to a local router, I can do 'ifdown -a' and 'ifup -a' as many times as I want and it will always get an IP.

What is the problem with the second-time-dhcp-request when the unit is connected to the office network?

  • Hi Liran,

    Liran Ritkop102360 said:
    Developing on a system based on dm8148 board

    Can this be a HW related issue, as I can successfully do second DHCP request in both cases: using local ethernet switch and directly connect the DM814x EVM to the office network. I am using EZSDK 5.05.02.00 / PSP 04.04.00.01

    When I boot up from MMC/SD card, I have:

    Arago Project http://arago-project.org dm814x-evm ttyO0

    Arago 2011.09 dm814x-evm ttyO0

    dm814x-evm login: root
    root@dm814x-evm:~# ifup -a
    ifup: interface lo already configured
    ifup: interface eth0 already configured
    root@dm814x-evm:~# ifdown -a
    root@dm814x-evm:~# ifup -a

    CPSW phy found : id is : 0x4dd074

    CPSW phy found : id is : 0x4dd074
    eth0      no wireless extensions.

    udhcpc (v1.13.2) started
    Sending discover...
    PHY: 0:00 - Link is Up - 100/Full
    Sending discover...
    Sending select for 172.20.1.30...
    Lease of 172.20.1.30 obtained, lease time 1800
    adding dns 172.20.0.1
    adding dns 172.18.0.1
    root@dm814x-evm:~# ifdown -a
    root@dm814x-evm:~# ifdown -a
    ifdown: interface lo not configured
    ifdown: interface eth0 not configured
    root@dm814x-evm:~# ifup -a

    CPSW phy found : id is : 0x4dd074

    CPSW phy found : id is : 0x4dd074
    eth0      no wireless extensions.

    udhcpc (v1.13.2) started
    Sending discover...
    PHY: 0:00 - Link is Up - 100/Full
    Sending discover...
    Sending select for 172.20.1.30...
    Lease of 172.20.1.30 obtained, lease time 1800
    adding dns 172.20.0.1
    adding dns 172.18.0.1
    root@dm814x-evm:~# ifdown -a
    root@dm814x-evm:~# ifup -a

    CPSW phy found : id is : 0x4dd074

    CPSW phy found : id is : 0x4dd074
    eth0      no wireless extensions.

    udhcpc (v1.13.2) started
    Sending discover...
    PHY: 0:00 - Link is Up - 100/Full
    Sending discover...
    Sending select for 172.20.1.30...
    Lease of 172.20.1.30 obtained, lease time 1800
    adding dns 172.20.0.1
    adding dns 172.18.0.1
    root@dm814x-evm:~# ifdown -a
    root@dm814x-evm:~# ifup -a

    CPSW phy found : id is : 0x4dd074

    CPSW phy found : id is : 0x4dd074
    eth0      no wireless extensions.

    udhcpc (v1.13.2) started
    Sending discover...
    PHY: 0:00 - Link is Up - 100/Full
    Sending discover...
    Sending select for 172.20.1.30...
    Lease of 172.20.1.30 obtained, lease time 1800
    adding dns 172.20.0.1
    adding dns 172.18.0.1
    root@dm814x-evm:~#

    What is your boot up method? Can you provide console output?

    Regards,
    Pavel

     

  • I patched the cpsw driver so that it won't hang when doing 'ifdown', So it might be related, though when doing 'ifdown' and 'ifup' when the unit is connected to my local router, It acts fine. I think that there is a problem with a 'noisy' network such as the office network.

    The output is:

    elsg5@dm814x-evm:~# cat /etc/network/interfaces
    # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
    # G5 - automatic created file.
    # Created on: 07/10/14 14:18:36.

    # The loopback interface
    auto lo
            iface lo inet loopback

    auto eth0
            iface eth0 inet dhcp

    elsg5@dm814x-evm:~# ifconfig
    elsg5@dm814x-evm:~# ifup -a
    [   14.628465]
    [   14.628472] CPSW phy found : id is : 0x282f014
    udhcpc (v1.13.2) started
    Sending discover...
    [   17.622113] PHY: 0:01 - Link is Up - 100/Full
    Sending discover...
    Sending discover...
    Sending select for 100.100.100.88...
    Lease of 100.100.100.88 obtained, lease time 604800
    adding dns 100.100.100.9
    adding dns 100.100.100.10
    elsg5@dm814x-evm:~#
    elsg5@dm814x-evm:~# ifconfig
    eth0      Link encap:Ethernet  HWaddr 00:18:31:8A:69:50
              inet addr:100.100.100.88  Bcast:0.0.0.0  Mask:255.255.254.0
              UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
              RX packets:3650 errors:0 dropped:5 overruns:0 frame:0
              TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:336399 (328.5 KiB)  TX bytes:1890 (1.8 KiB)
              Interrupt:40

    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

    elsg5@dm814x-evm:~#
    elsg5@dm814x-evm:~# ifdown -a
    elsg5@dm814x-evm:~# ifconfig
    elsg5@dm814x-evm:~# ifup -a
    [   57.373507]
    [   57.373515] CPSW phy found : id is : 0x282f014
    udhcpc (v1.13.2) started
    Sending discover...
    [   59.372291] PHY: 0:01 - Link is Up - 100/Full
    Sending discover...
    Sending discover...
    No lease, forking to background
    elsg5@dm814x-evm:~#
    elsg5@dm814x-evm:~# ifconfig
    eth0      Link encap:Ethernet  HWaddr 00:18:31:8A:69:50
              UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
              RX packets:14735 errors:0 dropped:25 overruns:0 frame:0
              TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:1354931 (1.2 MiB)  TX bytes:2480 (2.4 KiB)
              Interrupt:40

    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)