Welcome, Guest

Author Topic: DHCP not working  (Read 9048 times)

filipeisaac

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
DHCP not working
« on: April 01, 2015, 06:31:36 PM »
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

  • Sr. Member
  • ****
  • Posts: 269
  • Karma: +9/-0
Re: DHCP not working
« Reply #1 on: April 03, 2015, 01:47:08 AM »
Can you put your /etc/network/interface here? Did you enable both inside interface?

vinifr

  • Sr. Member
  • ****
  • Posts: 269
  • Karma: +9/-0
Re: DHCP not working
« Reply #2 on: April 03, 2015, 03:27:43 AM »
hmm, sorry, but:
Quote
Dimitar 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

  • Administrator
  • Hero Member
  • *****
  • Posts: 813
  • Karma: +22/-3
Re: DHCP not working
« Reply #3 on: April 03, 2015, 07:51:39 PM »
...is very old post - check the date!

vinifr

  • Sr. Member
  • ****
  • Posts: 269
  • Karma: +9/-0
Re: DHCP not working
« Reply #4 on: April 04, 2015, 05:06:37 AM »
...is very old post - check the date!

This means that the second LAN interface works now?

olimex

  • Administrator
  • Hero Member
  • *****
  • Posts: 813
  • Karma: +22/-3
Re: DHCP not working
« Reply #5 on: April 06, 2015, 12:28:46 PM »
of course, otherwise the board would not be released

filipeisaac

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: DHCP not working
« Reply #6 on: June 15, 2015, 05:38:33 PM »
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.
« Last Edit: June 15, 2015, 05:40:58 PM by filipeisaac »

filipeisaac

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: DHCP not working
« Reply #7 on: June 15, 2015, 05:54:08 PM »
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

  • Sr. Member
  • ****
  • Posts: 269
  • Karma: +9/-0
Re: DHCP not working
« Reply #8 on: June 21, 2015, 09:04:54 PM »
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
« Last Edit: June 21, 2015, 09:07:15 PM by vinifr »

filipeisaac

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: DHCP not working
« Reply #9 on: June 22, 2015, 02:45:11 PM »
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

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: DHCP not working
« Reply #10 on: June 22, 2015, 02:47:00 PM »
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

  • Sr. Member
  • ****
  • Posts: 269
  • Karma: +9/-0
Re: DHCP not working
« Reply #11 on: June 23, 2015, 04:43:36 AM »
Hi Filipe,

It's happening exactly the same with me! In wiki https://www.olimex.com/wiki/AM3352-SOM says:
Quote
You 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

  • Sr. Member
  • ****
  • Posts: 269
  • Karma: +9/-0
Re: DHCP not working
« Reply #12 on: October 14, 2015, 11:24:58 PM »
Hi Filipe,

I tested the board with a Switch and it worked.

vinifr

  • Sr. Member
  • ****
  • Posts: 269
  • Karma: +9/-0
Re: DHCP not working
« Reply #13 on: December 06, 2015, 05:08:34 AM »
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)
Code: [Select]
# 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)
« Last Edit: December 06, 2015, 05:17:54 AM by vinifr »

vinifr

  • Sr. Member
  • ****
  • Posts: 269
  • Karma: +9/-0
Re: DHCP not working
« Reply #14 on: December 07, 2015, 02:15:23 PM »
Hi,

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