Accessing the isp modem through OpenWrt router

I require the openwrt router (192.168.1.1) to establish a connection to the primary network (192.168.0.1 - isp modem)
To do that, I create a new device interface called "Modem" with the IP address 192.168.0.55.
I can only access all of the network's devices (192.168.0.xx) if I restart the Modem Interface from Luci.
If I reboot openwrt, the router won't be able to reach the primary network address.
Please find my network settings listed below.

/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 'fdee:e025:eb6b::/48'

config atm-bridge 'atm'
	option vpi '1'
	option vci '32'
	option encaps 'llc'
	option payload 'bridged'
	option nameprefix 'dsl'

config dsl 'dsl'
	option annex 'a'
	option tone 'av'
	option ds_snr_offset '0'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'lan1'
	list ports 'lan2'
	list ports 'lan3'
	list ports 'lan4'

config device
	option name 'lan1'
	option macaddr '64:66:24:de:8d:f8'

config device
	option name 'lan2'
	option macaddr '64:66:24:de:8d:f8'

config device
	option name 'lan3'
	option macaddr '64:66:24:de:8d:f8'

config device
	option name 'lan4'
	option macaddr '64:66:24:de:8d:f8'

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

config device
	option name 'dsl0'
	option macaddr '64:66:24:de:8d:f9'

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

config interface 'wan6'
	option device '@wan'
	option proto 'dhcpv6'

config interface 'Modem'
	option proto 'static'
	option device 'eth0'
	option ipaddr '192.168.0.55'
	option netmask '255.255.255.0'

This doesn't make much sense. Much of the config is that applicable to a box with an internal modem, but your wan network is connected by DHCP to an external modem on the Ethernet port named 'wan'.

When the modem is connected by DHCP it is a default route and thus you can usually forward from the LAN to the modem's administration interface without any special settings.

With a DSA kernel, do not refer to the internal link (named 'eth0' in many models) port in your config. You can attach extra IPs to the wan Ethernet port using option device 'wan'. Again this is only necessary if you are using pppoe to an external modem.

I appreciate your response, but I'm still confused. Although I made an effort to keep everything uniform, the setup appears to be incorrect.
What will be the correct config for the wan or lan interface.
Sorry for the nub question.
Thank you

Is your Internet service DSL, cable, or fiber?
If it is DSL, are you connecting the DSL line directly to the OpenWrt box, or using a separate modem between OpenWrt and the DSL line?

Virgin Media Fiber (dedicated cable) in the UK.
I cannot replace the virgin modem with openwrt router.
Thank you

Is this the one where "fiber" goes to some box down the street, and you've got a VDSL modem at home ?

Yes, correct.

Then i think the modem's very much replacable... ?

Seems you can get a different one too, Recommendation - UK Mid Range - #10 by Deem8740

As the service provider constantly updating (and changing the setting quite often), it is practically impossible to replace the original modem.
As I said in the first post, I would continue to connect to the main network using Openwrt.

The person in that thread is using another provider, talktalk.

OP is using a cable ISP. Although all the ATM DSL stuff in the config is confusing somewhat :confused:

@azarok you can put the virgin router in modem mode and connect it directly to the wan port of your openwrt router. This will disable the WiFi on the virgin router though.

1 Like

Thanks. How do I need to change the network configuration to gain access to 192.168.0.x devices? I think my config still messy :slight_smile:

You'd put the virgin modem into modem mode. This will disable all features like wireless and wired connections. You then connect a single ethernet cable from port 1 to the wan port on your openwrt router.

All your devices need to connect to the openwrt device from then on.

What are you trying to achieve ultimately? What does your current network look like? Can you show us a diagram?

2 Likes

@azarok
just out of curiosity, what openwrt router are you using?
i see in your network config some settings related to DSL. is it a BT home hub 5 or similar modem/router ?

Yes it is.
I will remove the DSL setting at some point :slight_smile:

I use Virgin Media as well and have an interface setup to access the HUB4. It's address is 192.168.0.1

My wan interface is eth0 / @wan




The firewall zone for the interface is the WAN zone.

Thanks. My setup is quite identical, however the issue still exists.
Only after restarting the Modem interface am I able to access my Virgin router (192.168.0.1).

When you are using double NAT you should not require a special interface to reach the ISP modem, as your router already knows how to reach 192.168.0.0/24. You might need this if you want to reach the additional interface on the modem 102.168.100.1, but in that case you would need to create an additional interface and assign it to the wan side of your firewall...

I would really try to get the modem into bridge mode and use OpenWrt as primary router (but that is easy for me to say, as I am not in your shoes/situation).

1 Like