How to connect two PCs with wireless routers in Ad-hoc mode?

I have 2 PCs, say A B, and 2 wireless routers (installed LEDE and OLSR), say X Y.

What I want to do is use Ethernet cable to connect PC to the wireless router

A( ----- X(
B( ----- Y(

and set X and Y working in Ad-hoc mode.

Now, I can have X and Y connected to each other, in OLSR-Viz, it looks like

X( ---- 1.000 ---- Y(

In PC A, I can ping and, but I can not ping or 3.2.

So what should I do to make PC A and B communicate via this Ad-hoc wireless network?

Hey there.

When you login at A, you can ping the local network as well as the transfer network -- on both routes, X and Y.
What about logging at B, can you ping the transfer network on both routers as well?

I'd say you messed up firewall settings. Presumably on Y, which might just block your requests.

There's a chance you misconfigured routing as well. But since you can access only one interface of two of your Y device, I'd say first fix firewall, then have a look at routing.

To be honest, I don't know where your ad-hoc mode comes into play. To me, you'd rather not have ad-hoc but dedicated routers providing dedicated networks and add an additional wifi cross link to route them.


1 Like

each mesh router has to announce his /24 subnet. so add in each /etc/config/olsrd a

config Hna4
option netaddr ''
option netmask ''


config Hna4
option netaddr ''
option netmask ''

or within webinterface:
administration -> Dienste -> OLSR -> HNA Ank√ľndigungen

Firewall problems can additionally make problems, and IPv4 NAT..
f.i. in your setup you dont need NAT at all. when internet comes into play activate the olsrd_dyn_gw_plain plugin on the router with internet on WAN Interface.

for small setups batman-adv could be nicer than OLSR. its Layer2 mesh instead of Layer3, so there would be no need for separating subnets. check out various mesh communities and their openwrt/lede firmware. so you can avoid too many starting problems.