Static route issue

Dear Team,


I am facing an issue with the static route. In the openwrt configuration i have configured 3 interfaces, one interface is the WWAN(wifi) and 2 interfaces for 1 sim card each.

The wifi interface ip is and for the 2 sim cards their ip is and

I want my sim card interfaces to ping the follwoing ip When i did the static route configuration as below:
gateway= none.
gateway= none.

When i did this configration i was able to ping the target ip, but when i restart the ip i cant ping the target ip( then i go to the wifi interface i uncheck the use default gateway and check it again then i can ping.

I dont know why this is happening, could you please help me with this.

Thank you so much in advance

I'm not sure what the use case is here. When you say "sim card interface" do you mean an LTE modem? And do these LTE modems have a special arrangement with the carrier so you have a private network through LTE? Ordinary LTE service is only useful as a gateway to the Internet.

The modern approach to integrating remote sites into a private network is to connect all sites to the Internet by some means, then set up VPN tunnels.

The IP should be reachable directly through the wwan assuming it is on the network

Any interfaces you set up with proto static get an automatic entry into the routing table, but if the subnet size is not specified it will be a /32 network, which is the single host. This is only usable to reach resources on that host, or if it is a router there's a point to point gateway to somewhere else.

Hi MK thanks for your reply, yup i am using seira and quecktel modules. The sim card carriers are configured to be in a private network. the whole network is private.

The wwan is reaching the but my problem is with the sim interfaces when i add them to the static route its working but once the pc is restarted then its not pinging.

This is wrong. Not specifying a subnet means you get a /32 route. The subnet needs to be large enough to include the rest of the private network associated with this connection, it will be added to the routing table.

The routing table can be inspected various ways, I like the legacy command route.

Dear Mk

Thank you for your support, when i specify a subnet its not working at all but when i keep it none and i uncheck the WWAN interface default gateway onle then its working but when i restart it stops working even though the configuration is same.

I am thinking interface vlan could solve this issue.



I was able to resolve the issues but i am facing another one, what i am trying to ahieve is that when my pc is near the access point it will transmit the data through wifi interface. And when its not near the AP it should transfer the data through Sim Card LTE, but when i have defined the routes/metrics and zones i can transfer through wifi and LTE but in order for LTE to transfer i have to disable the wifi manually even though there is no AP. When i again changed the configuration i can only transfer through sim card even though the AP is present.

Thank you,

Is the SIM card in your OpenWrt router or in the PC?

Define "near" -- does that mean within range of the AP? (so ~150 feet/50 meters or so)

When the PC is not near the AP?? what is "it" in "it should transfer..." -- is that the PC or the router?

Near it means within the range of the AP.

The Pc itself i have installed the Openwrt, its x86 Pc. The Pc which has openwrt running on it should send the data.

The setup is as below

when the Pc is in the range of AP it should transfer through the Wi-Fi if not then it should go through Sim.

Probably your best route is to create a hot plug script based on the interface up/down of the wifi sta mode connection.

So you mean through the Web interface i wont be able to achieve the required?

the problem is the wifi interface its a static ip and its always up which means green color even when the AP is not there and there is no connection

The color does not indicate the connection state. It is color coded based on the firewall zone to which the network belongs.

The wifi interface itself will necessarily be down if you are out of range of the ap.