Multi WAN problem with 2nd gateway (dpinger: WAN2_DHCP 8.8.4.4: sendto error: 22

Started by obstler42, April 04, 2019, 11:04:58 PM

Previous topic - Next topic
Long time PC based router user here, after m0n0wall and the other -sense I decided to switch over to OPNsense. All basic functions are working, but I cannot get Multi WAN to work (was working fine on the previous system).

The second gateway is always marked as down, and the gw log shows repeated entries of:

Quotedpinger: WAN2_DHCP 8.8.4.4: sendto error: 22

and the general log shows that error message for the interface:

Quotekernel: arpresolve: can't allocate llinfo for 77.119.x3.x on igb1

no matter what monitor IP I use.

The interface for WAN2 is up, and is assigned an IP and gw address via DHCP.

The first WAN uses a static IP network, and is working fine.

More system info:

QuoteOPNsense 19.1.4-amd64

WAN2 interface (opt1, igb1)
Status    up
DHCP    
up 
MAC address    40:62:31:01:xx:xx
IPv4 address    77.119.x3.x5
Subnet mask IPv4    32
Gateway IPv4    77.119.x3.1

I followed the guide from https://wiki.opnsense.org/manual/how-tos/multiwan.html and already know the setup from the earlier -sense system where I had the exact same multiwan setup working.

Any pointers here? Can't seem to find any info on the sendto error 22 (besides low level programming errors using wrong address structs).

thanks!

Looks like the assigned gateway lies outside your designated WAN subnet so you can't reach it. There's a "far gateway" option in the gateway's settings to correct this, but I somehow get the feeling this is an automatic setup that breaks itself automatically otherwise you would have seen the error when creating the gateway.


Cheers,
Franco

hmm, you are correct. WAN2 is a 4G LTE modem in bridge mode with DHCP configuration from the 4G network provider... apparently the DHCP server on the mobile network sets the gateway outside the submask...

Since I have a fixed IP for that network I setup the interface as static IP now, and it works right away.

So is using the "Far GW" option the correct way to handle cases like that, or am I better off with the "static" IP setup (which would break if the gateway address on the mobile network ever changes).

I'm not sure if far gateway works with DHCP, so better stick with the static setup.

It's a little ironic when DHCP configures a network and tells you about a gateway you can't reach from this particular network. ;)


Cheers,
Franco

Yeah it is a bit silly -- but apparently other OSs (and even pfSense) seem to work fine anyway without having to set extra options... So opns behaves correctly strictly speaking, while the others do not.

thanks for the fast reply and solution!