Not able to get IP address from ISP

Hi,
I have installed openwrt on a raspberry pi 4 to use as a router and using the previous router as access point. I am not able to get IP from my ISP and internet not working.

Earlier in my router i had to only clone the ISPs ONU mac address and it was working.

Below is my config. Whats seems to be incorrect here? Need help.

[root@d83add / 66°]# cat /etc/config/network

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

config globals 'globals'
	option ula_prefix 'fd53:90b2:5dbf::/48'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth0'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config device
	option name 'eth1'
	option macaddr 'a8:88:1f:cc:xx:yy'
	option ipv6 '1'

config interface 'wan'
	option proto 'dhcp'
	option device 'eth1'

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

The "ipv6 '1'" option goes into the "interface" section, instead of the "device" section.

Are you sure you just need to configure WAN as a DHCP client?
No need to use PPPoE or similar?

What do you see on the logs, when the router tries to connect?

yes i am sure. because the vlan and sn is already setup in gpon device.
if I use my tplink and mi router it works fine only with cloning mac address.

where can I see the logs?

with openwrt router it doesn't work. Below I am attaching the config of tplink

What do you encounter in logread when you restart non-working interface?

getting below log when i am restating the wan interface.

Tue May  7 16:19:36 2024 daemon.info dnsmasq-dhcp[1]: DHCPREQUEST(br-lan) 192.168.1.210 50:91:e3:f0:2b:9g
Tue May  7 16:19:36 2024 daemon.info dnsmasq-dhcp[1]: DHCPACK(br-lan) 192.168.1.210 50:91:e3:f0:2b:9g EX220-G2u
Tue May  7 16:19:46 2024 daemon.info dnsmasq-dhcp[1]: DHCPREQUEST(br-lan) 192.168.1.210 50:91:e3:f0:2b:9g
Tue May  7 16:19:46 2024 daemon.info dnsmasq-dhcp[1]: DHCPACK(br-lan) 192.168.1.210 50:91:e3:f0:2b:9g EX220-G2u
Tue May  7 16:19:56 2024 daemon.info dnsmasq-dhcp[1]: DHCPREQUEST(br-lan) 192.168.1.210 50:91:e3:f0:2b:9g
Tue May  7 16:19:56 2024 daemon.info dnsmasq-dhcp[1]: DHCPACK(br-lan) 192.168.1.210 50:91:e3:f0:2b:9g EX220-G2u
Tue May  7 16:20:07 2024 daemon.info dnsmasq-dhcp[1]: DHCPREQUEST(br-lan) 192.168.1.210 50:91:e3:f0:2b:9g
Tue May  7 16:20:07 2024 daemon.info dnsmasq-dhcp[1]: DHCPACK(br-lan) 192.168.1.210 50:91:e3:f0:2b:9g EX220-G2u
Tue May  7 16:20:14 2024 daemon.notice netifd: wan (12204): udhcpc: received SIGTERM
Tue May  7 16:20:14 2024 daemon.notice netifd: wan (12204): udhcpc: entering released state
Tue May  7 16:20:14 2024 daemon.notice netifd: wan (12204): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "wan" } (Permission denied)
Tue May  7 16:20:14 2024 daemon.notice netifd: Interface 'wan' is now down
Tue May  7 16:20:14 2024 daemon.notice netifd: Interface 'wan' is setting up now
Tue May  7 16:20:14 2024 daemon.notice netifd: wan (14761): udhcpc: started, v1.36.1
Tue May  7 16:20:14 2024 daemon.notice netifd: wan (14761): udhcpc: broadcasting discover
Tue May  7 16:20:15 2024 daemon.warn odhcpd[4440]: No default route present, overriding ra_lifetime!
Tue May  7 16:20:17 2024 daemon.info dnsmasq-dhcp[1]: DHCPREQUEST(br-lan) 192.168.1.210 50:91:e3:f0:2b:9g
Tue May  7 16:20:17 2024 daemon.info dnsmasq-dhcp[1]: DHCPACK(br-lan) 192.168.1.210 50:91:e3:f0:2b:9g EX220-G2u
Tue May  7 16:20:17 2024 daemon.notice netifd: wan (14761): udhcpc: broadcasting discover
Tue May  7 16:20:20 2024 daemon.notice netifd: wan (14761): udhcpc: broadcasting discover

I presume you are using an USB to Ethernet adapter. Make sure eth0 and eth1 are not swapped during reboot.

1 Like

yes i am using USB to Ethernet adapter.

i didn't understand how to make sure of that.

It started working on its own after multiple restarts and shutdowns.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.