OpenWrt Forum Archive

Topic: No DHCP lease from my ISP

The content of this topic has been archived between 31 Mar 2018 and 6 May 2018. Unfortunately there are posts – most likely complete pages – missing.

Hi,

I just discovered OpenWRT and I'm really excited about it!

I have a Netgear WNDR3700v1 which I've just flashed with "OpenWrt Chaos Calmer 15.05.1". Everything went well accept that I can't get a dhcp lease from my ISP. the eth1 is connected directly to the wall (router provided by ISP (Zyxzel) is not connected). I've set the password and after testing with default settings I've played around with the settings in "interfaces".

When I unplug the WNDR and just use the Zyxel (P-2602HWT-F1) router its working perfectly (Zyxel is getting an IP).
If i plug a cable between Zyxel switch port and WNDR WAN port I get a dhcp lease on the WNDR from the zyxel.

I'm really not a network expert and I hope you guys can point me in the right direction!

Cheers,
Johan

Post your network, firewall, dhcp, and any relevant configuration files. That should give us an idea of how you are configured.

Thanks for you fast response nenekofi, I can ssh into the router and get the data, which files do you want me to grab? /etc/config/dhcp ?

root@OpenWrt:~# cat /etc/config/dhcp

config dnsmasq
    option domainneeded '1'
    option boguspriv '1'
    option filterwin2k '0'
    option localise_queries '1'
    option rebind_protection '1'
    option rebind_localhost '1'
    option local '/lan/'
    option domain 'lan'
    option expandhosts '1'
    option nonegcache '0'
    option authoritative '1'
    option readethers '1'
    option leasefile '/tmp/dhcp.leases'
    option resolvfile '/tmp/resolv.conf.auto'
    option localservice '1'

config dhcp 'lan'
    option interface 'lan'
    option start '100'
    option limit '150'
    option leasetime '12h'
    option dhcpv6 'server'
    option ra 'server'

config dhcp 'wan'
    option interface 'wan'
    option ignore '1'

config odhcpd 'odhcpd'
    option maindhcp '0'
    option leasefile '/tmp/hosts/odhcpd'
    option leasetrigger '/usr/sbin/odhcpd-update'

root@OpenWrt:~# cat /etc/config/network

config interface 'loopback'
    option ifname 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'

config globals 'globals'
    option ula_prefix 'fdc3:ec88:0c21::/48'

config interface 'lan'
    option ifname 'eth0.1'
    option force_link '1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option ip6assign '60'

config interface 'wan'
    option ifname 'eth1'
    option _orig_ifname 'eth1'
    option _orig_bridge 'false'
    option proto 'dhcp'
    option clientid '00:26:F2:F7:AD:E1'

config interface 'wan6'
    option ifname 'eth1'
    option proto 'dhcpv6'
    option reqaddress 'try'
    option reqprefix 'auto'

config switch
    option name 'switch0'
    option reset '1'
    option enable_vlan '1'
    option blinkrate '2'

config switch_vlan
    option device 'switch0'
    option vlan '1'
    option ports '0 1 2 3 5t'

config switch_port
    option device 'switch0'
    option port '1'
    option led '6'

config switch_port
    option device 'switch0'
    option port '2'
    option led '9'

config switch_port
    option device 'switch0'
    option port '5'
    option led '2'

root@OpenWrt:~# cat /etc/config/firewall

config defaults
    option syn_flood '1'
    option input 'ACCEPT'
    option output 'ACCEPT'
    option forward 'REJECT'

config zone
    option name 'lan'
    option input 'ACCEPT'
    option output 'ACCEPT'
    option forward 'ACCEPT'
    option network 'lan'

config zone
    option name 'wan'
    option input 'REJECT'
    option output 'ACCEPT'
    option forward 'REJECT'
    option masq '1'
    option mtu_fix '1'
    option network 'wan wan6'

config forwarding
    option src 'lan'
    option dest 'wan'

config rule
    option name 'Allow-DHCP-Renew'
    option src 'wan'
    option proto 'udp'
    option dest_port '68'
    option target 'ACCEPT'
    option family 'ipv4'

config rule
    option name 'Allow-Ping'
    option src 'wan'
    option proto 'icmp'
    option icmp_type 'echo-request'
    option family 'ipv4'
    option target 'ACCEPT'

config rule
    option name 'Allow-IGMP'
    option src 'wan'
    option proto 'igmp'
    option family 'ipv4'
    option target 'ACCEPT'

config rule
    option name 'Allow-DHCPv6'
    option src 'wan'
    option proto 'udp'
    option src_ip 'fe80::/10'
    option src_port '547'
    option dest_ip 'fe80::/10'
    option dest_port '546'
    option family 'ipv6'
    option target 'ACCEPT'

config rule
    option name 'Allow-MLD'
    option src 'wan'
    option proto 'icmp'
    option src_ip 'fe80::/10'
    list icmp_type '130/0'
    list icmp_type '131/0'
    list icmp_type '132/0'
    list icmp_type '143/0'
    option family 'ipv6'
    option target 'ACCEPT'

config rule
    option name 'Allow-ICMPv6-Input'
    option src 'wan'
    option proto 'icmp'
    list icmp_type 'echo-request'
    list icmp_type 'echo-reply'
    list icmp_type 'destination-unreachable'
    list icmp_type 'packet-too-big'
    list icmp_type 'time-exceeded'
    list icmp_type 'bad-header'
    list icmp_type 'unknown-header-type'
    list icmp_type 'router-solicitation'
    list icmp_type 'neighbour-solicitation'
    list icmp_type 'router-advertisement'
    list icmp_type 'neighbour-advertisement'
    option limit '1000/sec'
    option family 'ipv6'
    option target 'ACCEPT'

config rule
    option name 'Allow-ICMPv6-Forward'
    option src 'wan'
    option dest '*'
    option proto 'icmp'
    list icmp_type 'echo-request'
    list icmp_type 'echo-reply'
    list icmp_type 'destination-unreachable'
    list icmp_type 'packet-too-big'
    list icmp_type 'time-exceeded'
    list icmp_type 'bad-header'
    list icmp_type 'unknown-header-type'
    option limit '1000/sec'
    option family 'ipv6'
    option target 'ACCEPT'

config include
    option path '/etc/firewall.user'

config rule
    option src 'wan'
    option dest 'lan'
    option proto 'esp'
    option target 'ACCEPT'

config rule
    option src 'wan'
    option dest 'lan'
    option dest_port '500'
    option proto 'udp'
    option target 'ACCEPT'

Set ignore to 0.

config dhcp 'wan'
    option interface 'wan'
    option ignore '0' <---
nenekofi wrote:

Set ignore to 0.

config dhcp 'wan'
    option interface 'wan'
    option ignore '0' <---

Incorrect.

Thanks for your fast replies, I've changed the settings according to your advice nenekofi but it still not working

My files now look like this:

root@OpenWrt:~# cat /etc/config/network



config interface 'loopback'

option ifname 'lo'

option proto 'static'

option ipaddr '127.0.0.1'

option netmask '255.0.0.0'



config globals 'globals'

option ula_prefix 'fdc3:ec88:0c21::/48'



config interface 'lan'

option ifname 'eth0.1'

option force_link '1'

option type 'bridge'

option proto 'static'

option ipaddr '192.168.1.1'

option netmask '255.255.255.0'

option ip6assign '60'



config interface 'wan'

option ifname 'eth1'

option _orig_ifname 'eth1'

option _orig_bridge 'false'

option proto 'dhcp'



config interface 'wan6'

option ifname 'eth1'

option proto 'dhcpv6'

option reqaddress 'try'

option reqprefix 'auto'



config switch

option name 'switch0'

option reset '1'

option enable_vlan '1'

option blinkrate '2'



config switch_vlan

option device 'switch0'

option vlan '1'

option ports '0 1 2 3 5t'



config switch_port

option device 'switch0'

option port '1'

option led '6'



config switch_port

option device 'switch0'

option port '2'

option led '9'



config switch_port

option device 'switch0'

option port '5'

option led ’2'



root@OpenWrt:~# cat /etc/config/dhcp

config dnsmasq
    option domainneeded '1'
    option boguspriv '1'
    option filterwin2k '0'
    option localise_queries '1'
    option rebind_protection '1'
    option rebind_localhost '1'
    option local '/lan/'
    option domain 'lan'
    option expandhosts '1'
    option nonegcache '0'
    option authoritative '1'
    option readethers '1'
    option leasefile '/tmp/dhcp.leases'
    option resolvfile '/tmp/resolv.conf.auto'
    option localservice '1'

config dhcp 'lan'
    option interface 'lan'
    option start '100'
    option limit '150'
    option leasetime '12h'
    option dhcpv6 'server'
    option ra 'server'

config dhcp 'wan'
    option interface 'wan'
    option ignore '0'


config odhcpd 'odhcpd'
    option maindhcp '0'
    option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'

Max Hopper wrote:
nenekofi wrote:

Set ignore to 0.

config dhcp 'wan'
    option interface 'wan'
    option ignore '0' <---

Incorrect.


Max Hopper, what is incorrect?

organismen wrote:
Max Hopper wrote:
nenekofi wrote:

Set ignore to 0.

config dhcp 'wan'
    option interface 'wan'
    option ignore '0' <---

Incorrect.


Max Hopper, what is incorrect?

Firstly, I have unfortunately nothing to say regarding your main issue,; I have a few words about a secondary issue below.
TL;DR: You might have a more civilized and educational experience in this forum if you simply ignore Max's posts (well at least the short ones)

        Sorry, Max is sort of acting as the resident "forum troll" here; have a look at the collection of hid posts https://forum.openwrt.org/search.php?ac … _id=141227 and you can see he is not trying to actually help people with their actual questions, but rather he is out educating people to help themselves (see https://forum.openwrt.org/viewtopic.php … 59#p323659 I cite in case of changes top the post):
"- rather a personal philosphy [sic] of self-reliance and learning, attributes which are broadly valued above instant gratification.  The 'just tell me' posters become self-deluded in believing they have acquired subject matter mastery.  'give back' posts of OPers after garnering knowledge before succeeding are prima facie evidence that encouraging understanding through research, however terse the encouragement, is helpful."

So in other words as knowledgeable he sometimes appears, due to his "quixotic quest" to educate poster to "combat ignorance" I fear you will not get a more meaningful answer out of him. In the past his terse remarks have been a mixture of hit and miss, so it might be he spotted something wrong in your config, or he just assumes that there is something wrong, with the lack of pointers and rationale/explanation he gave both could be true at the same time.



Best Regards
        M.

I'll be happy to elaborate around my setup to give you guys a reasonable chance to point me in the right direction, unfortunately my knowledge about openWrt are limited, so I'll be glad for any advice. I hope Max and rest of you guys can cope with that.

I come in peace wink

Oh, what kind of network do you have? As far as I can tell the Zyxel is an adsl modem, if so you will not be able to replace it with the wndr3700 as that only has ethernet ports....

Best Regards
        M.

Building on moeller0's response, the cable from your ISP\Telco looks very similar to a CAT-5 (RJ-45) cable, but is probably a RJ-11 (Telephone) connector.  It has less wires and connections, probably 4.  It will fit into the WAN port of your router, but if you look carefully may not be the full width of the WAN port. 

Bottom line is you need both devices.

Manual is here, but does not detail the connections enough to tell by the pictures.
http://setuprouter.com/router/zyxel/p-2 … l-1805.pdf

Thanks guys but I'm absolutely shure that I don't have a adsl connector. I used the WNDR router before I installed OpenWRT in this appartment. The reason i began to use both routers was because we got IPTV so I needed their router first (that's one of the reasons why I want OpenWrt as I understand that it can handle "IPTV multicast".

But, one problem at a time...

the Zyxel has a switch in at the back so you can choose between dsl and WAN, its set to WAN

Where I live we have static IPs and no DHCP provided, could it be the same with your provider?

Can I use the ssh connection to get better information from the negotiation-process ? I've played around with "udhcpc"

root@OpenWrt:~# udhcpc -i eth1
udhcpc (v1.23.2) started
Sending discover...
Sending discover...
Sending discover...

Can I get better information of what goes wrong elsewhere?

organismen wrote:

the Zyxel has a switch in at the back so you can choose between dsl and WAN, its set to WAN

Ah, so it is not that then, but out of curiosity what technology is your ISP offering, really ethernet to the appartment/house?

Best Regards
        M.

Xotic750 wrote:

Where I live we have static IPs and no DHCP provided, could it be the same with your provider?

Hi Xotic750, the ISP is Bredbandsbolaget (BBB) and I'm 99% sure that they use DHCP. I havent configured the Zyxel-router that I'm using at the moment

How about connect your laptop to the wall and check you get an address? I have ownit. Just thoughts.

moeller0: yes we have ethernet direct into the apartments over here (no DSl of any kind). (1Gb in the main) And then you pay for whatever bandwidth package. I have at 10Mbit package but actually get 30/30 smile

(Last edited by Xotic750 on 17 May 2016, 21:35)

I have had issues in days gone by when I changed the router I needed to call the ISP so they could "Reprovison" the new device.  Basically they have a record of the device (Zyzel) and when you connect something different (even a different serial number) the ISP does not recognize this as valid, and fails to communicate.

Xotic750 wrote:

How about connect your laptop to the wall and check you get an address? I have ownit. Just thoughts.

Good point, I did that yesterday and it worked as expected.

RangerZ wrote:

I have had issues in days gone by when I changed the router I needed to call the ISP so they could "Reprovison" the new device.  Basically they have a record of the device (Zyzel) and when you connect something different (even a different serial number) the ISP does not recognize this as valid, and fails to communicate.

Interesting, If i disconnect both routers before I go to bed tonight and wait till tomorrow maybe the lease for the Zyxel router has expired and when i plug in the netgear router it will treat is a brand new node ?

Sorry, posts 26 to 25 are missing from our archive.