DHCP not working

Started by filipeisaac, April 01, 2015, 06:31:36 PM

Previous topic - Next topic

filipeisaac

First i had a problem with the eth0/1 renamed to eth2/3. Solved.
But now DHCP on eth0 does not work. If I connect the board diretc to PC ping works on 192.168.1.254
But if its on LAN2 to my hub I can`t even get an IP from DHCP.
I already tried to connect the same cable to my PC and dhcp works just fine.
How can I fix this?

vinifr

Can you put your /etc/network/interface here? Did you enable both inside interface?

vinifr

hmm, sorry, but:
QuoteDimitar Gamishev made dummmy I2C device on the same address which always answer OK instead the PMU and now the Kernel from TI SDK boots and we have everything working exept the second LAN.

https://www.olimex.com/forum/index.php?topic=3469.msg15438#msg15438

olimex

...is very old post - check the date!

vinifr

Quote from: olimex on April 03, 2015, 07:51:39 PM
...is very old post - check the date!

This means that the second LAN interface works now?

olimex

of course, otherwise the board would not be released

filipeisaac

#6
Sorry for the late reply, i`m not receiving the notify e-mails from this forum.
/etc/network/interfaces :
root@AM3352-SoM:~# cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:

source-directory /etc/network/interfaces.d

auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet static
#padrao
#address 192.168.1.254
#netmask 255.255.255.0
#gateway 192.168.1.1
#metrum
address 172.16.10.110
netmask 255.255.0.0
gateway 172.16.10.1
#dns-nameservers 172.16.10.7 172.16.10.3

Dhcp does not work either in eth or eth1. Just static ip.

filipeisaac

When I try to set the eth down and up I get this message
root@AM3352-SoM:/# ifup eth0
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

[ 1498.162823] net eth0: initializing cpsw version 1.12 (0)
[ 1498.170684] net eth0: phy found : id is : 0x7c0f1
[ 1498.180643] 8021q: adding VLAN 0 to HW filter on device eth0
Listening on LPF/eth0/1c:ba:8c:9c:9d:6f
Sending on   LPF/eth0/1c:ba:8c:9c:9d:6f
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
[ 1500.166383] libphy: 4a101000.mdio:00 - Link is Up - 100/Full
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
root@AM3352-SoM:/# ^C

vinifr

#8
Hi,

Can you paste the output to this command:
ifconfig -a

This will give active interfaces and names. Change the file /etc/network/interfaces according to the names displayed on command.

You can also to monitor if the DHCP packages are coming in and out, with:
tshark -i eth0 -O dhcp, change eth0 to desired interface

filipeisaac

output
root@AM3352-SoM:~# ifconfig -a
can0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 
          NOARP  MTU:16  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:10
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:68

eth0      Link encap:Ethernet  HWaddr 1c:ba:8c:9c:9d:6f 
          inet addr:172.16.10.111  Bcast:172.16.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10071 errors:0 dropped:3 overruns:0 frame:0
          TX packets:267 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:647361 (632.1 KiB)  TX bytes:24703 (24.1 KiB)
          Interrupt:56

eth1      Link encap:Ethernet  HWaddr 1c:ba:8c:9c:9d:71 
          UP BROADCAST MULTICAST  MTU:1500  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:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:333 errors:0 dropped:0 overruns:0 frame:0
          TX packets:333 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:29835 (29.1 KiB)  TX bytes:29835 (29.1 KiB)


filipeisaac

I`ve changed the etc/network/interfaces.
root@AM3352-SoM:~# cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:

source-directory /etc/network/interfaces.d

auto eth0
iface eth0 inet static
address 172.16.10.111
netmask 255.255.0.0
gateway 172.16.10.1


auto eth1
iface eth1 inet dhcp

#padrao
#address 192.168.1.254
#netmask 255.255.255.0
#gateway 192.168.1.1
#metrum
#address 172.16.10.111
#netmask 255.255.0.0
#gateway 172.16.10.1
#dns-nameservers 172.16.10.7 172.16.10.3

#auto wlan0
#iface wlan0 inet dhcp
#wpa-ssid LAB_ELET
#wpa-psk 1a2b3c4d5e

vinifr

Hi Filipe,

It's happening exactly the same with me! In wiki https://www.olimex.com/wiki/AM3352-SOM says:
QuoteYou need VLAN enabled to establish a proper connection to the board (as defined in IEEE 802.1Q). Make sure your hardware is compatible with IEEE 802.1Q. Make sure you have to enabled VLAN for the router/switch/bridge or the network card otherwise the Ethernet connection to the AM3352-SOM-EVB board will fail

I need to research better about it.  :o

vinifr

Hi Filipe,

I tested the board with a Switch and it worked.

vinifr

#13
Hi, good news

I have tested the patch: http://lists.infradead.org/pipermail/linux-arm-kernel/2013-July/183214.html and works using my internet router! :D Tomorrow I will test with the Switcher in order to check if still work.  8)
# ifconfig
eth2      Link encap:Ethernet  HWaddr 1c:ba:8c:9c:92:49 
          inet addr:192.168.25.173  Bcast:192.168.25.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:17 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3724 (3.6 KiB)  TX bytes:3720 (3.6 KiB)
          Interrupt:56

eth3      Link encap:Ethernet  HWaddr 1c:ba:8c:9c:92:4b 
          inet addr:192.168.25.172  Bcast:192.168.25.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:65 errors:0 dropped:0 overruns:0 frame:0
          TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:10405 (10.1 KiB)  TX bytes:7315 (7.1 KiB)

vinifr

Hi,

I have tested and works with Switch too! Very nice.  ;D