Command Line 101

So far I have been only able to configure wireless router-switches via LUCI. I am completely ignorant of how to configure using the command line under ssh. (It is ssh, right? That is how this is done using telnet or PuTTY, correct?)

I am presently dealing with ASUS RT-N66U and Linksys WRT1900ACS routers only.

Question 1) Do the commands for changing settings on wireless router-switches vary from chipset to chipset or are they all the same?

Question 2) Can someone direct me towards "Command Line 101" where I can find detailed instructions and examples of how to set up various router modes of operation?

It looks as though the best thing for me to do is to take up the WDS or mesh methods of linking routers, which leads me to the following questions --

Question 3) Where do I learn the basics on these scenarios (WDS and mesh)?

Question 4) Are there any other linking schemes I should know about?

Question 5) Is there a discussion on the merits of various linking schemes and where do I find such analysis?

I know this is a lot of questions, but I would appreciate any leads to some detailed documentation. So far I have pretty much spinning my wheels trying to figure out the basics of command line settings and various linking scenarios for these two routers. I have run into way outdated code (perhaps suitable for the venerable WRT54Gx series) and a lot of "Microsoft Type" discussions -- i.e, a whole bunch of arcane theory surrounded in obscure jargon with no practical, real world examples. If I am ever going to get a handle on this, I need some basics in the syntax and method department.

Certain commands are identical (e.g. changing from 20 MHz to 40 MHz bandwidth and specifying a pre-shared key); but things like specifying the hardware may obviously differ, see link in answer no. 2.

What do you mean by "linking schemes"?

Wireless...? Do you mean WPA, WPA2, WEP? Or meshing? Roaming?

You can connect devices adhoc and use a link routing protocol, if that's what you mean...for example, OLSR can mesh wireless in that manner.

I assume you're trying to mesh? Do repeaters? Wireless roaming?

Can you be more clear.

"Other linking schemes" might include:

  • A wired LAN. This is always better performance than wireless, though the cost to install and maintain wiring can be substantial.
  • Regular AP-Client. You then need to locally route (not necessarily a bad thing) users of the extension router back to the Internet, and it is difficult to make them part of your LAN (though this is possible in a half-baked way with relayd, and in a much better way with a GRE tunnel). But if you are offering wifi to the public or untrustable IoT devices, you don't want them in your LAN anyway. AP-Client is the wireless mode most certain to work with any driver and interoperate best among different hardware.
  • A VPN. This is useful to connect separate sites entirely and make them work like one LAN.

Assuming no physical constraints, Ethernet cables between routers are the best, power-line modems are generally very good, and any of the wireless approaches somewhere between good and marginally acceptable.

WDS is perhaps the easiest to configure of the wireless linking approaches. For a two- or three-station system it generally works. WDS, like most of the wireless linking protocols is not a standard, so you may have problems with one vendor's implementation working with another's. (OpenWRT to OpenWRT generally works pretty well, as long as there aren't Broadcom chips involved.)

relayd seems to be a popular "hack" that allows multiple subnets to share some resources, but isn't a Layer 2 bridge, so has some "challenges" with roaming clients.

Past that, you'd need to understand the difference between Layer 2 and Layer 3, bridging and routing protocols, as well as broadcast protocols (including DHCP), at least for IPv4, if not for IPv6 as well. Regrettably, those "Microsoft Type" discussions are getting to the differences between the approaches.

None of the protocols more complex than WDS are really "turn key" for end users, perhaps with the exception of a Layer 2 VPN tunnel. Certainly by the time you're talking about layering GRE tunnels or experimental mesh routing protocols over 802.11s or "ad hoc" networking, there aren't a lot of "worked examples" to go with.

And relayd doesn't support IPv6 at all (WDS/ 4addr does, transparently).

Forgive my being unclear. This is all confusing and I am trying to straighten things out in my own head. By "linking schemes" I mean various methods to implement wireless linking between routers for creating clients, APs and various forms of repeaters. I have heard of WDS and mesh methods but I do not really know what they mean or how to implement them.

What I am trying to do is play "wireless network" to gain knowledge into how to set these sort of things up. In my neighborhood I have a couple of friends that are interested in sharing stuff and playing networking locally on our block to share things like video and music libraries and stream such back and forth.

So far I have implemented some Client/Access Point router pairs (one router as a wireless Client of a remote subnet and one router as an Access Point wired to the Client on their own subnet) for point-to-point communication between the different subnets and keeping them independent. This uses up a lot of routers with a pair at each end of the point-to-point link. I now wish to move into the realm of repeating, and have set up several repeaters using factory firmware and DD-WRT. Under DD-WRT their are two types of repeater, one that is a client with an independent subnet and one that is not.

Then I heard about WDS (and then mesh, but I really don't understand either). Evidently using WDS you can have a "Master Router" by which to map and view a map of everything else on the distributed network. This sounds like a good idea to me, so I want to try it.

So this is where I am going. Or, rather, wishing to learn to go. Or mistakenly thinking this is the way to go and what it will do for me.

What is a "roaming" or a "roaming client?"

WDS is point to point, exactly like AP - Client. All that WDS does is allow additional kinds of traffic to pass through the link. An administrator (you) has to decide who will be linked to who and configure everything to those fixed links.

That may not be so good in a neighborhood situation, where people are going to be moving the nodes around and not always supplying them with power, and you don't have ready physical access to reconfigure a node that has lost connectivity due to an intermediate one being taken down.

A mesh is peer to peer, it will attempt to "self heal" in those situations by constantly probing for the best link paths and adjusting the flow if something changes.

I would suggest OLSR meshing.

  • Create an adhoc SSID (hopefully this is available on everyone's router)
  • You setup OLSR routing on the interface
  • You inform the OLSR that you want to announce a route to subnet, located on your device
  • As do your neighbors and friends
  • You must coordinate with everyone to ensure that you have no IP conflicts
  • Using specific routes, you can even have others share thier Internet (or provide all backup Internet) in this manner over the mesh.

As I use it, it means a client that moves from AP to AP -- for example connected to an AP in the living room, then roams to the one in the bedrooms. In doing so, it will change 802.11 associations. If both APs are on the same network (typically a "Layer 2" bridge between them, of some sort(, then the client doesn't also need to get a new IP address, new routes, and re-establish all its connections, which could take several to tens of seconds.

Re jeff on roaming: That is way cool. I want to go down this road, in particular for when moving from the house to the shop or to a neighbor's house so equipped by me. This is getting to be serious fun, if I can get it all to work. Use mesh?

Assuming you aren't going to lay a wire then yes mesh is a good idea. You use the mesh as a backhaul and clients connect not to the mesh but to a second SSID that is the same throughout your roaming domain.

1 Like