Sunday, 25 September 2022

Oh Mikrotik...

    Mikrotik is a network equipment manufacturer, a relative newcommer to the field. They are known for making feature rich cheap devices that are popular in the small business, small ISP and prosumer markets.

     I have now several years of experience managing several hundreds of Mikrotik devices. I have used them as Core routers, CPE routers, core switches, distribution switches, access switches. All of that in an internet service provider context.So I think I am somewhat qualified of judging Mikrotik equipment. Luckily we migrated away from MIkrotik in core routing and any Mikrotik switching. 

    In essence Mikrotiks Routeros which runs (almost) all Mikrotik devices is a far far removed fork of Vyattta OS, which means that somewhere down there is a Linux kernel. However, there is no way that I am aware of to reach the underlying Linux system.

    Indeed I will now share my love/hate relationship with Mikrotik.In some cases these cheap devices are surprisingly good in others, surprisingly bad.

The good

Routing

     Mikrotik has many good sides in its routing. It has also many bad sides in its routing but more on that later. The good first. All Mikrotik devices support all of the widely used routing protocols. BGP, OSPF, RIP, MPLS, IPv4 and IPv6... And they are not just bare-bones implementations, you get BFD, all the little features you expect and even more. Some of those features are not supported by larger and more expensive network equipment manufacturers. And the best part is that you get all thesame features on a 30$ Mikrotik that you get on the 3000$ Mikrotik(with some very minor exceptions. Naturally I do not recommend abusing the 30$ device with tasks it is not capable of doing.

CPE router

    As a CPE, device it supports every feature imaginable. Minus maybe an analog phone adapter, but come on, it is 2022. It supports about 15 or so types of VPN tunnels, the more notable being site to site IPSEC, wireguard, zerotier, EoIP, MPLS, OpenVPN...

    Naturally it supports PPPoE, it supports VRRP. Some models have integrated LTE modems, so 3G/4G/5G is supported as well. It's stability is beyond what is expected of consumer devices. Some models have integrated Wifi. All models support traffic shaping and traffic queuing.

Features

    I have mentioned that RouterOS supports many many features. Well it really is a swiss army knife of various ethernet computer networking functionalities.

Torrent client - MikroTik

     Let me talk about some of the more impressive features it supports that I have not mentioned already. Routing first. VRFs, yes, you can get VRFs on a 30$ device. Mesh routing support. Packet marking for routing. VPLS and traffic engineering. IGMP multicast routing. PIM multicast routing.

    Now switching... MLAG on select models. VXLAN support. QinQ VLAN support. Layer 2 filtering. Layer 2 NAT.

    As for the rest... You can use it as a radius server. You can use the integrated hotspot server. . You can use it as a web proxy. You can use it even as a TFTP, FTP or SMB file server. Therre is also LORA support for some IoT devices etc...

    You can install Docker on ARM based Mikrotik models. That means that theoretically you can use it as anything. You can run Doom on Mikrotik if you want to.

    These are only some of the more surprising features that Mikrotik supports, there are many others.

Stability 

    Some Mikrotik devices are quite stable. You won't experience many reboots with  some devices. I have noticed that it all depends on the CPU architecture used. MIPSBE  devices can have uptimes of several years if their power supply was not interrupted.

Price

    As previously mentioned, Mikrotik devices tend to be rather cheap. Of course, even Mikrotik has cheaper home use devices and their flagship datacenter oriented devices which are a bit pricier. On one end you can buy a 23$ Mikrotik HAP mini and you have the CCR 1072  at 3350$. In between them you have the CCR2216, which is cheaper than the 1072, but newer and better.

The Dude and Winbox

    Winbox is the best way to manage Mikrotik routers. Forget the CLI. Usually I prefer the CLI on other devices, but Mikrotik is an exception. Winbox is really well polished, it exposes 99% of everything that is in the CLI and has some features tof its own that are not present in the CLI. PLus there are some drawbacks of the CLI that I will mention later.

    The Dude is my favourite network mapping tool. It supports Mikrotik devices as well as it has good support for 3rd party devices. It is best used for mapping on the layer 2 level. It is fairly easy to use, drag and drop, and then you just configure the SNMP data and any usernames and passwords.

Home use

   Considering the price of these devices. It is barely a little more expensive than the average consumer device. So it is a premium device for home users, prosumers and even homelabbers. You can get a 10G Mikrotik RB 4011 for 200$, and before 2022 inflation I remember it was going for about 170$.

Mikrotiks NAT implementation

    Mikrotiks NAT implementation is super flexible. You can basically change the entire packet header how you want it to be changed.

The Bad

Switching

    Uh, switching on Mikrotik. Let's say I have had bad experiences with Mikrotik switching, and luckily we have removed Mikrotik switches from all important areas.

    0) First off Mikrotik has a really blurry line between switches and routers. Most Mikrotik "switches" come with "RouterOS". Very few Mikrotik "switches" come with "SwitchOS". Some have dual boot, but you will almost certainly just use RouterOS. Most Mikrotik switches are in fact layer3 switches that are even as layer 3 switches closer to routers than to proper layer 2 switches. Now, there is nothing wrong with layer 3 switches, but the problem with Mikrotik is that there is no clear distinction between switches and routers. Now it was a couple of years ago since we attempted to use Mikrotik switches. So they have released newer and more powerful models and things might have been fixed. But I have found better alternatives.

    Switch OS is really barebones  and has lamost no featuress at all. It barely supports VLANs. There is not even a CLI, just a web interface to configure it. Thus I will provide no more attention to Switch OS as I rarely ever use it.

    Be aware, what I will tell you was tested on their best and most expensive 10G switches at the time(2020).

    1) One issue  that we experienced with Mikrotik switches were frequent packet drops. About 1 in every 10000 packets were lost  between two mikrotik switches. With fiber terminationss that tested as perfect, with multiple changed pairs of SFP+ modules. WIth clean factory rerset configuration.

    2) Another issue we experienced is that with some switches we would get random port disconnects and reconnects every couple of days. We have replaced  the fiber patches, the fiber cores in the cable, the SFP+ modules, we have upgraded RouterOS. And it were fairly short fiber runs. Only replacing the Mikrotik switch helped.

    3) A third issue is that it is much too easy to misconfigure a Mikrotik switch in such a way that you will not get hardware line speed. In fact the factory default configuration is not configured for hardware line speed. With other vendor switches you have to go out of your way to configure a switch in such a way that hardware line speed will be broken. With Mikrotik it is a minefield and you have to spend hours on the wiki just for that. On top of it all this differs for many different Mikrotik models, so you have to be very careful.

    4) A fourth issue is the clusterfuck that is VLAN  configuration on MIkrotiks. There is at least 5 different ways to configure VLAN trunking on Mikrotik devices. And it all depends on which Mikrotik model you have. Some of those don't work on some models, others do, and you have to figure it out. I have found one way that works on all but it is very stupid and problematic. You essentially make VLAN subinterfaces for VLANs and you bridge them together. BUT AT LEAST IT WORKS ON EVERY MIKROTIK.

Core routing

    We did use Mikrotik as a core router. Specifically we used the CCR 1036 and the CCR 1072 which were Mikrotiks falgship routers back then. It was an improvement over our old software router. But alas we outgrew Mikrotik  in less than a year since we implemented it. It was tolerable when our routing table was like 5 full  BGP tables. But our routing table grew to  20+ full BGP tables. And our core of Mikrotiks just had big problems with that.

    1) The first fault is that for performance routing Mikrotik does not use Layer 3 ASICs. Correction, now there is the CCR 2216 which has a layer 3 ASIC, but back then that was nonexistant.

    2) The second and worse fact was that in RouterOS v6 the entire routing process was single threaded. Yes, the entire routing process was stuck on a single CPU core. What good are  72 CPU cores on the Mikrotik CCR 1072 if the entire routing process is choking on a single core? And our entire BGP routing table had about 20+ full BGP routing tables inside of it(think of it as if our routing table had 20 internets full of routing tables inside of it). As our routing table grew, eventually it became so bad for us that putting a single static route in our routing table took 30+ minutes after we pressed enter, until the route was finally in the routing table. When a CCR rebooted(which happened as well, but not too often) it took about 4:30 HOURS for a full iBGP propagation to finish.

    3) As for 3, when we tried to implement OSPF as our IGP we would get random OSPF neighbor dissconnects. Probably related to 2, as BGP and OSPF and the entire rest of routing shared the same CPU processs.

    Now, 2 is fixed fixed in RouterOS v7. Probably. I don't know as right when RouterOS v7 came we ditched MIkrotik out of our core routing. RouterOS v7 also entirely rewrote all of routing and used an entirely new syntax that is incompatible with the old syntax. And syntax conversion on upgrades does not always work. So, good that we avoided that landmine. We have now moved to Cisco routing in our core, and we are happy with that and have not looked back.

Consultores da Depressão | Facebook

Wireless

    Wireless on Mikrotik leaves a lot to be desired. First off, Mikrotik wireless is always a couple generations behind. Mikrotik adopted Wifi 5 Wave2 only last year, when their competitors had Wave 2 since 2016-2017. Mikrotik has finally now(september 2022) started  creating its first models with Wifi6 support when their competitors have adopted Wifi6 in 2019/2020. Mikrotiks competitors are now starting with Wifi6e, and talk is that Wifi7 will  be finished in early 2024.

    Now other than lagging in standards support, on Mikrotik wirelesss lans you can expect weak signal coverage, weak troughput and the occasional signal hole. In other words, weak antennas. Their optional central AP management software CAPSMAN, is rudimentary, and weird. At least when compared to their competitor Ubiquiti Unifi, it leaves A LOT to be desired.

    We have also tested their Wireless PTP/PTMP devices a long time ago(around 2015/2016) and they proved no good. The devices sometimes just froze up. Lost connection and the connection would not reestablish until a reboot was done. Singal quality was also mediocre at best. Again pretty bad compared to Ubiquiti Airmax.

IDS/IPS

    Mikrotik has no support for IDS/IPS functionality at all. It does support ACLs, and it has some very rudimentary and very manual setup layer 7 filtering. But that is very far from IDS/IPS support. There are some custom scripts that pretend to actively add  layer 7 filtering, but that is not for serious businesses. Mikrotik has no hardware firewall right now.

Stability 

    Earlier I have stated that depending on CPU microarchitecture  you can have very stable Mikrotik devices. Well also depending on CPU microarchitecture you can have very unstable devices. Sometimes they don't even reboot. Some process gets stuck and stays stuck until you manually reboot the device. I have had the most stability isssues with PowerPC and ARM(not ARM64) based CPUs. It seems that firmware updates have fixed that, as after v6.48 of RouterOS I have not expereienced those issssues, a lot.

    On RouterOS 6.45-6.46 I have process stuck two Mikrotik routers by holding backspace for a minute or two in CLI. Ever since then I avoid Mikrotik CLI and mostly use Winbox. To this day I don't know if this bug was fixed. I still use the Mikrotik CLI occasionally(for example when I need to read the whole config), but my main way of interacting with Mikrotik is WInbox.

Cooling 

    MIkrotik has bought the passive cooling koolaid. That is ok for their more home oriented devices, but thay are putting passive cooling on some(not all) of their datacenter devices. Naturally this proiduces a lot of problems when those devices are insufficiently  cooled. SFP modules start acting funny. The device startss acting funny. And it just gets weird.

Doing too many things 

    MIkrotik has a case of jack of all trades master of none. I love that Mikrotik has a ton of featuress. ut some of those features have a clear lack of attention. They have been programmed once and later forgotten other than the occasional bugfix here and there. Lots of features are implemented but are unstable.

What use are they for? 

CPE router?
    Yes, it is perhaps the best  CPE router for the price/performacen/feature ratio out there right now.

Core router?
    If you are a business smaller than an enterprise. And by enterprise I mean a proper  enterprise with more than 5000 employees. Maybe. An SMB, yes, in fact it is excellent. Mid size business, yes, but be sure to buy their more expensive CCR lineup.Large but not quite enterprise large business, maybe, but buy their best gear if you do so. Enterprise? No.Not for the core network at least.

ISP core router?
    Depends on how large you are. If you are a small ISP and your routing table is 5 or less full BGP routing tables, then yeah, but again, use their CCR 1072,1036 or 2216 routers. And make sure you are on RouterOS v7.

Switches?
    No, at least nothing important.

Wirelesss?
    Maybe. But I would not expect excellent quality out of it. My experience may be outdated though.

Perhaps things have changed? 

    Admittedly  RouterOS v7 is a big game changer. And with RouterOS v7 I have only used MIkrotik as a CPE device. Some of the negatives might have changed, but again, I have found other good vendors that serve those purposes much better. Routing  might have improved a lot, but you know, I have been burned badly once and there is no reason to repeat that. Their switching also might have improved a lot lately, MLAG and VXLAN are not present in v6 but only in v7. I have not tried their PTP/PTMP wireless setups for ages. And they now finally support  wifi6. But still no wifi6 devices with SFP slots :(.

Conclusion

    Mikrtoik makes some good devices. It is good for some uses. Despite its faults. It is very feature rich for the price point. To the point where even I still get surprised by the occasional checkbox or CLI argument.. But for some use cases I would advise against MIkrotik, heavily. Despite the good price. The value lost in customer quality and customer satisfaction can be worse.

    Overall, if you want to use Mikrotik, sure go ahead. Mikrotik can be excellent. I still use it on hundreds of devices. But be aware of MIkrotiks pitfalls.

Sunday, 28 August 2022

Q-in-Q (mis)adventures

    So, sometimes we offer Q-in-Q network services to our customers. Sometimes those services have to go trough subcontractors. And sometimes it can be quite  difficult to get those 3 things to work(Q-in-Q, customers, subcontractors).

What is Q-in-Q

    Q-in-Q(802.1ad) is a layer 2 service which allows you to essentially put  VLANs inside a VLAN.  VLANs are Virtual LANs, in a sense it is a networking layer 2 technology that separates switched traffic, not routed traffic. It is sometimes also called VLAN tag double  stacking. Because that is what it does, it puts another VLAN tag on Ethernet frames that already have a VLAN tag. It is often used in internet service provider networks, so that providers can offer layer2 services to their customers and their customers can use  the full 4096 spread of VLANs. In that respect, the outer VLAN is usually called the S-VLAN or the service provider VLAN, while the multitude of inner VLANs are called C-VLANs, or customer VLANs.



But, I have a story

    So, one customer orders a Q-in-Q service from us. Due to us not being  present at the B location, we have to involve a subcontractor. This has not been  the first nor the last time this customer has ordered a Q-in-Q  service from us. The subcontractor is a weird one. Some of their Q-in-Q tunnels allow native VLAN traffic over the S-VLAN. Others of their Q-in-Q tunnels do not allow native VLAN traffic over the S-VLAN. This is determined by network equipment vendor implementation as well as configuration. There are good reasons why you should not allow native traffic over a S-VLAN and why you should, but that is beyond the point of my story. 

    One day my customer calls me and tells me that their new service is not working. He says he can't reach the devices on the other end. OK, I double check, and I see no faults on my configuration. I also don't see any mac addresses coming from the direction of the  subcontractor on that service. So I call the subcontractor. I eventually after several dosenms of emails and an hour on the phone get the subcontractor to send out their technician. They replace their local device, test everything out, some issue was found and fixed. 

    I call the customer, and it is still not working. The customer said that they told him he had  to put a VLAN on his side, saying that can't be right. He said that if he has to put a VLAN on his side then the access port towards him is in trunk mode. And even when he set the VLAN which happenedd to be a VLAN with the same tag as the S-VLAN tag, it still didn't work.

    That is when it clicked for me. This customer had previously had some Q-in-Q services over us and that same subcontractor, which just worked when he was trying to send native untagged frames over the S-VLAN. As I said earlier, on Q-in-Q this sometimes works and sometimes it does not work. This  customer must have got used to this working.

    I  quickly confirmed with the customer which C-VLAN ID was he testing with on the B-side of the connection. For a test I terminated the S-VLAN on one of our routers, I put the correct C-VLAN on our router, and voila it worked. On this Q-in-Q service there can be no native S-VLAN traffic.

    It was  the customers fault. Doubly so because this customer is properly technologically educated. Nothing, I call the customer, I explain the situation to him. Just don't send native traffic over a Q-in-Q service. It-s a Q-in-Q service, send VLANs trough it.

The lessons

- Always double check  your customers.

- Working with subcontractors is still a pain.

-Avoid sending native traffic over Q-in-Q services if not necessary. It is not a best practice.

Monday, 15 August 2022

Home wireless guidelines and considerations in 2022.



    So for my first post I have decided to take every-ones favourite and most hated topic, wireless. Designing a stable, fast and long range wireless network can be a painful task, but I will try to make it a little less painful. however, we will be talking only in the context of home/office wireless. Wireless PTP/PTMP deserve their own post. Also I assume you know basic wireless terms like AP, frequency, etc.

These are just guidelines for you to make better decisions, not a how to. I will not hold you by your hand. However these should help you troubleshoot your wireless issue, as well as help you on your journey to learn to design wireless networks.

    When thinking about wireless there are three golden rules:

1. If you can use a wire, use a wire. 

Wireless is good for practicality, however compared  to wired connections it is a compromise in speed and stability. I mean, wireless uses something as volatile as air as its medium. Wireless signal will be affected by air moisture, wind, pipes in the walls. Do you know where your piping is? Pipes can kill a lot of signal. do you like to microwave your food? A badly placed microwave can completely kill a wifi network. That is why in terms of performance and stability, wired is king. Yes, wireless technology is advancing at a breakneck speed, so is wired techhnology.

2. You get what you paid for.

Cheap wireless APs usually come with cheap construction thus affecting their stability and longevity. Half baked firmware affecting stability and lacking features. Weak CPUs limiting bandwidth. Weak antennas unable to recive a lot of signal power, less conductive materials and less receptive to incoming signals. and sometimes you need to buy more APs(but having too many APs is also bad).

3. Coverage-Speed-Cost triangle.

 You can have speed and coverage. You can have Coverage and have it cheap. You can have speed and have it cheap. But you can't have all three. APs, even  some cheap ones can be configured for coverage or speed. But if you need both you will need to buy more APs, which means money for the APs and CAT6 wiring. CAT6 because using CAT5 is just legacy these days.

So which AP do I buy?

    I do not recommend buying any AP  that does not support at least WIFI6(802.11ax) these days. Wifi 6 is the first improvement on the 2.4GHz frequency band since Wifi4 which was released in 2009. There are now affordable Wifi6 APs out of the factories. For the security geeks Wifi6 also comes with WPA3 encryption, which is the first improvement on Wifi security since WPA2 in 2004. I have had good experiences with Ubiquiti Unifi Wifi, so you can have a look at their Unifi6 series.

下一代wifi标准——wifi6正式启用_社会百态_中国历史网 

What are channels and frequency bands?

    To continue further, first we need to understand what are frequency bands. Frequency bands are parts of the wireless electromagnetic spectrum. These include everything from cosmic radiation, light, to human made electromagnetic signals. It is important to note that each of them has different frequencies which give them different physical properties, for us the most important are the bandwidth(speed) of transmission of data, coverage, or rather the ability of the signal to reach far places without obstacles, and the ability of the signal to penetrate obstacles. For our use we will only use the frequency bands that have been legally allowed to use for Wifi in most of the world.

    Now, what are channels? Channels are slices of frequency bands that are used to send data wirelessly. For example in the 2,4GHz band you have channel 1 with a center frequency of 2.412 GHz. Assuming the channel width is 20MHz(more on channel width later), it is important to know that wireless signals are not sent only from the center frequency of channel 1(2.412 GHz). Instead the signal is sent across every frequency on the channel which in case of a channel width of 20MHz is: center frequency+-10MHz. Generally the more frequency you have, the more bandwidth you can achieve.

Frequency bands

    There are 3 frequency bands used for home/office wireless networks. There are the commonly used 2.4GHz and 5GHz bands  as well as the new 6GHz band. Most modern APs support functioning on both the 2.4GHz and 5GHz band at the same. All of the 3 bands 

    The 2.4GHz band is the oldest wifi band in usage. In theory it supports the widest coverage, it is the best at going trough obstacles,it should be the most stable band and in theory it is also the slowest band. But often that is not in reality. The 2.4 GHz band is super congested, it is shared and interferes with bluetooth, microwaves, various other radio equipment, etc... Yes, this is the band that can get killed by turning on a microwave. It only supports 13 channels, which is not enough and can cause overlap and interference. There is a 14th channel but it is supported only in Japan and only on the old Wifi1(802.11b) standard.
However it is still useful if you live in a rural area with a clean spectrum, all you care about is coverage or you have legacy devices which only talk on the 2.4GHz spectrum(like my NEW AC ☺ ).
2.4 GHz comes in 20MHz or 40MHz channel width. More on channel widths later.

2.4GHz pros:
-theoretically wide coverage
-theoretically best at going trough obstacles
-theoretically most stable
-best support for legacy devices

2.4GHz cons:
-very congested
-only 13 channels, only 3 non-overlapping channels among them

-in reality most of its advantages are canceled out by congestion and interference.

G Routers Operating on 2.4GHz - Wireless Home Network Made Easy

    The 5GHz band is for many the solution to the woes of the 2.4GHz band. The 5 GHz band in theory has worse coverage, is less stable, is worse at going trough obstacles. However it is less congested than 2.4 GHz so those disadvantages are often canceled out. Also and more importantly the 5GHz range offers faster bandwidth. However again, because almost every AP from the last decade supports 5GHz, 5GHz has also become congested. Not nearly as congested as 2.4GHz, but enough to become a concern. Also 5GHz has 25 channels, all of which are non overlapping, meaning there is less interference. 5GHz usually comes with 20MHz, 40MHz(default channel width on 5GHz usually) or 80MHz channel widths, however Wifi5 also added support for 160MHz channel widths.

5GHz pros:
-less congested than 2.4GHz
-faster
-25 non overlapping channels
-is actually well supported nowadays
-can have better coverage and stability than 2.4GHz in congested urban areas

5GHz cons:
-has become somewhat congested itself
-less theoretical coverage, stability and obstacle avoidance than 2.4GHz



    The 6GHz range is the newest frequency range introduced in the latest WIFI6E wireless standard. Wifi 6E supported client devices and APs are still few, expensive and far in between. The 6GHz band was introduced because now the 5GHz band has also become congested. The 6GHz band is essentially an extension of the 5GHz band. It adds another 59 channels, non overlapping.
Due to physics, 6GHz provides the fastest bandwidth speeds. However it also has the worst coverage, it is the worst at going trough obstacles and the connection might be somewhat unstable. Like 5GHz it supports  20MHz, 40MHz, 80MHz and 160 MHz channel widths.

6GHz pros:
-almost no congestion
-fastest
-many channels to choose from.

6GHz cons:
-largely unsupported in 2022
-bad coverage, obstacle penetration and stability issues.
-some of the previous uses of the band have not yet been completely removed(so that introduces a tiny bit of congestion)

Channel width

    So, like previously said, channel widths come in sizes of 20MHz, 40MHz, 80 MHz and 160 MHz. Generally, the larger the channel width, the more frequencies there are in a channel, the more data can be sent over that channel. Think of it like comparing a small road with multi lane highways. So you achieve higher bandwidth. So larger is better? No. In this case larger is not always better.

    The larger the channel width, the wireless signal will be weaker. For a larger channel width you will loose coverage distance, the signal will be much more susceptible to interference, and the signal will be worse at penetrating obstacles, like walls etc...

    Why does this happen? The answer is, electricity. A wireless device, like an AP is intentionally designed that it can only send a limited amount of signal towards its antenna.

    So for example., if an antenna on an AP receives 22dBm of electrical signal from it's AP, and that is its maximum. This power of 22dBm will always remain the same. The antenna will spread out that electrical power over the channel width and convert that electrical power into a wireless electromagnetic signal. This is good as it will be a strong signal, although limited in bandwidth. Now another example, the same antenna with the same input power of 22dBm is configured for a channel width of 40MHz. Now the antenna needs to spread its received power over 40MHz, which means the signal will be weaker, however the wireless signal will be able to carry more data increasing bandwidth. For 80 MHz, the antenna will have to spread its electric power even more, and at 160MHz the signal will be very fragile, but there will be a huge bandwidth, a theoretical bandwidth of more than 900Mbps.

    I have tested 160MHz and I have found that I have lost all signal after a single plywood wall was between me and the AP. So I do not recommend using 160MHz unless you plan to put an AP in every room or you will sit in a room with an AP all day.

    Another problem with using large wifi channel widths is that you are using up more of of the frequency band, thus increasing risks of interference, overlap and just generally polluting the spectrum. When IO said that 5GHz has 25 non overlapping channels, I meant it had 25 20MHz non overlapping channels. With 40MHz or higher channels, overlap can be reintroduced. Also, 2.4 GHz has 13 channels, 3 non overlapping, but it can have only  2 overlapping 40MHz channels. Theoretically you could fit an 80MHz channel into 2.4GHz, but nobody does that.  Likewise, 5GHz can only have 12 non overlapping 40MHz channels and 6 non overlapping 80 MHz channels. And only 2 non overlapping 160 MHz channels. There is a bit more space on the 6GHz band.

    So what is my recommendation for which channel widths to use?  

-Use 20MHz on the 2.4GHz  range to achieve maximum legacy support and to achieve maximum coverage. This signal will fill in gaps where other signals can not reach.Not all devices support 40Mhz on the 2.4GHz range.
-On the 5GHz band  use either 40MHz or 80MHz, your call. Ofcourse, 40MhH is a compromise on the side of coverage, while 80MHz will achieve more bandwidth.
-If you happen to be an early adopter of Wifi6E and your router support 6GHz, I would use 80 MHz, 160Mhz is also fine but only if you plan to cash out for an AP in every room.

Do I need a floorplan?

    Well for any good design of a wireless network you will need a floor plan. How thick are the walls? What are the walls made of? Are there any pipes or other large metal objects in the walls? What are the distances and floor dimensions? Where is the microwave? I would need an entire separate post for that.

    However I can share some general guidelines. First of If you plan to buy just one AP, my best advice is that you place it somewhere centrally in the house or office, but away from large metal objects or surfaces. Also place it somewhere high up as most  AP antennas are designed as such that their signal falls down. And if your antenna can be ceiling mounted, mount it to the ceiling.
Second, a good rule of thumb is that if the signal has to penetrate more than 2 walls, 3 at most... Then you need more APs.

So, the end...

    Designing a good wireless network is hard. Designing a wireless network that is both stable and fast is even harder. If you can, you really should consider to use wired connections where possible. Wifi just requires some patience. However if that is not an option, I hope that you have learned something while reading my post. If you have any thoughts, be sure to share them in the comments.

 

User story 1: The client has to pay because their IT guy refuses to replace two patch cables.

 Introduction Actors: $dude - DevOps hired by the client company. $colleague - My colleague, stuck in the same quagmire as I am. To be short...