WAN interface does not get IP

Hi. i did install openwrt(version 18) in an Alix 2d13 and i ssh into the box in the default IP (192.168.1.1) and set up an IP. What i would like to do is have eth0 as my LAN, in subnet 192.168.9.1/24 and eth1 as wan connected to another router.
This other router gives IPs in the subnet 192.168.1.0/24 and i need to have eth1 as dhcp client. Since i travel a lot i could plug it to the hotel's room and get an IP from dhcp.
What i did:
Set LAN IP

uci set network.lan.ipaddr=192.168.2.1
uci commit network
reboot

Once the system comes back again and i have in the PC an IP from subnet 192.168.9.0/24 then i do:
WAN

uci set network.wan.proto=dhcp
uci commit network
ifup wan
reboot

The problem is that the system is not getting any IP from the router and hence i cannot ping to the internet. If i attach the wan cable in a windows PC, it gets an IP and it browses the Internet. The main router that provides the IPs it does not have any sophisticated security access control and it is a netgear switch (DGN2200)
any ideas on how to solve that please?

Please, post the logs from when you activate the WAN interface.

at the moment i did setup a static IP to overcome the problem.
i will try to reconfigure it and if it fails then i will post the logs.
Thanks

IPoE could require specific MAC-address.


DHCP could be configured to allow only specific clients to obtain a lease.


Also reboot is a bit overkill:

  • Apply runtime configuration without network reset:
service network reload
  • Apply persistent configuration with network reset:
service network restart