Author Archive norbertk

Play any Chord

There are 9 common chord qualities that you should be aware of. Some of these aren’t used often, while others are used extensively:

Single Mode vs. Multimode Fiber Optic Cables

There are two main types of fiber optic cables: single mode and multimode. Although they can do the same job in some instances, the different construction methods make each of them better suited to certain tasks and budgets. That makes picking between single mode and multimode fiber optic cables an important consideration when it comes to setting up your network.

In a nutshell, single mode cables are better for long-distance cable runs and when signal integrity is of paramount importance. They are typically more expensive than multimode cables, though, and there are different types of single and multimode fiber optic cables to consider, making the single mode vs. multimode fiber head-to-head a little more complicated.

To help you decide on the type of cable you need for your project, here’s everything you need to know about single mode and multimode fiber optic cables.

What is Single Mode and What is Multimode?

Single mode and multimode fiber optic cables are two different types of fiber optic cable aimed at different use cases. Single mode cables are typically made with a single strand of glass at their core, leading to a narrower core of the cabling, and more robust signal integrity over greater distances. They can be further divided into OS1 and OS2 cables, which are designed for indoor and outdoor uses, respectively, with OS2 cables offering greater cable lengths and bandwidth.

Multimode cables have multiple glass strands in the core, making them larger and more versatile since they can handle multiple data streams at a time. However, that broader core means there’s more light refraction throughout the cable, weakening the signal faster, and making multimode cables less suitable for longer runs. They too are divided into more cable types: OM1, OM2, OM3OM4, and OM5.

OM1 and OM2 cables are the least expensive but offer the least performance of multimode fiber optic cables. OM3, OM4, and OM5 are progressively more capable, closing the gap between single mode and multimode fiber.

Single Mode vs. Multimode Fiber: Key Differences

The key physical difference when comparing single mode vs multimode fiber cables is the core. Where single mode cables have a single glass strand at their core, measuring around 9µm, the multiple strands used to craft a multimode cable’s core measure 62.5µm or 50µm. This physical disparity is what leads to the performance and use case differences for each cable type.

Thanks to the focused signal of single mode cables, they can deliver a signal over multiple miles without the need to repeat or amplify it. OS1 cables can carry a signal up to around a mile and a half, while OS2 cables can reach up to 125 miles. Since they’re designed with outdoor use in mind, and to ensure no problems arise over that expansive length, OS2 single mode fiber cables are also built with a unique spiral core design, with additional semi-rigid tubing around the core that lets the cable flex without putting any tension on the glass fibers at its core.

Single mode cables are typically rated for between 1 and 10 Gigabits per second over these incredible lengths. It’s theoretically possible that they can run at much higher bandwidths, but typical specifications limit them to 10 Gbps at the top end. Single mode cables, specifically OS1 cables, are commonly used in campus data networks, telecommunication networks, and TV transmission networks. OS2 cables are also used in these cases, as well as an overarching backhaul network.

In contrast, multimode cables can only manage much shorter runs of a single cable before amplification is necessary. Legacy OM1 cables are limited to just 100ft, while OM2 provides a higher quality connection and can stretch to 260ft. Their bandwidth is relatively comparable to single mode cables, delivering between 1Gbps and 10 Gbps depending on cable length.

OM3 multimode fiber optic cables can manage longer cable runs at up to 1,000ft, while OM4 and OM5 are capable of 1,300ft cable runs at up to 10 Gbps. All three are also capable of transmitting at a much higher bandwidth: up to 100 Gbps in some cases. However, offering such throughput requires a shorter cable run, with even the most capable OM4 and OM5 cables limited to just 500ft at the maximum bandwidth.

OM1 and OM2 multimode cables can, in some cases, be driven by LED light rather than lasers, which limits their range and performance, as well as their cost. However, OM2 cables are also available with laser optimizations which improve their range and available bandwidth.

To help differentiate between all of these similar, but quite distinct cable types, they are usually given a unique color band. OM1 multimode fiber cables are given orange or grey outer jackets. OM2 cables are orange, while OM3 are often given a cyan or aqua jacket. OM4 cables are given a purple or aqua outer jacket, while OM5 cables are typically lime green.

Both OS1 and OS2 single mode cables are given yellow jackets, which helps them stand out from their multimode contemporaries.

The final difference in the single mode vs. multimode fiber debate is cost. OS1 and OS2 single mode cables tend to be the most expensive, while multimode cables as a whole are cheaper. However, the pricing difference there is more distinct, with OM5 cables getting close to OS2 cable pricing, while OM1 is far more affordable.

Is Multimode Better?

In the single mode vs. multimode fiber debate, there is not one cable that’s the best, but there are some that are better suited to certain situations.

If you need to run fiber optic cable over a vast distance, there’s no argument that single mode OS2 fiber cables are by far the best tool for the job. But if you’re looking to run shorter cables that are just a few hundred feet in length, multimode cables have the potential to not only offer the same ultra-high bandwidth over shorter distances but do so for cheaper, too.

It’s important not to lump all multimode fiber cables together, though, as there are some stark differences between OM1 and OM5 cables, and subtler, but still present differences between the other multimode cable types. Only OM3, OM4, and OM5 cables can offer the same 40Gbps, and 100Gbps bandwidth as OS2 cables, even if it’s over much shorter distances.

With that in mind, it can often be better to use OM4 or OM5 cables instead of OS1 cables when running shorter cable lengths in indoor locations, if given the choice. In that case, multimode fiber cables could be considered “better”. However, there is no replacing the bandwidth and signal robustness of the OS2 single mode fiber optic cable type.

Choosing the Right Fiber Optic Cable

The main consideration when choosing a fiber optic cable is deciding which type you opt for. Single mode vs. multimode fiber cable is a debate you can answer by considering the cable length(s) required as well as the necessary bandwidth. If you are happy with a maximum of 10Gbps bandwidth at lengths under two miles, then you have the choice of OS1 or OM1 and OM2 fiber optic cables. For greater bandwidth over shorter distances, OM3, OM4, and OM5 are valid options, and will likely give you the most cost-effective solution to your networking problem.

If you’re looking for multiple miles of fiber optic cabling, or simply want the most robust networking solutions, then OS2 single mode fiber optic cables are probably your best bet.

That’s not all you should consider, though. There are single mode and multimode cables that come with different jacket ratings for running through walls, or between multiple floors. If you don’t need anything special, look for fiber cables with a standard Optical Fiber Non-conductive riser (OFNR) rating, which should work fine in most instances, including when transiting between floors.

For improved fire protection, plenum-rated fiber optic cables will come with a Low Smoke Zero Halogen (LSZH) jacket type, which means that even if it were to set fire, it would give off very little smoke or halogenic compounds. There are also both simplex and duplex fiber patch cables which have single or dual connectors on each end. If you’re unsure which you need, you can always just buy a duplex cable and use one of the connectors if that’s all you ultimately need.

You should also consider what type of connector your fiber optic cable needs. Unlike copper twisted pair patch cables which almost universally come with RJ45 plugs at the end, fiber optic patch cables can come with a range of headers. There are LC connectors which are the most common and are somewhat smaller than their comparable sibling, SC connectors, and are most commonly found on single mode fiber optic cables.

SC connectors are an older, larger design, but are otherwise comparable and have a locking mechanism, which can make them sturdier. That extra size does make them harder to fit in large numbers in data centers and patch panel cabinets, but they are cheaper and have a more established design.

Less commonly you’ll also find ST fiber optic connectors, which are a similar size to SC connectors but have a twist-bayonet-style mechanism. There’s also the MTP connector which is typically used in data centers and advanced home networks.

For more tips on choosing the right fiber optic cable for you, check out our complete guide to fiber optic cabling.

EthernetNetworkingFiber OpticCat6

Samba & Bonjour with Avahi

Okay, so you have a shiny new Linux box, and it’s running Samba, all nice and configured to share your files.  You have a Mac, and you want to use it with your nifty new Windows shares.  You can connect with Command-K in the finder, but it doesn’t show up in Finder under the Shared section.

You need Avahi.

I won’t bother going into the details of configuring Samba.  If you’ve not gotten that far, there are some pretty good resources out on the ‘net that will tell you how.  Where interacting with Bonjour is concerned, however, most of the references I found were flat wrong with modern OS X and Samba.

To make this work, the steps are simple (I’m running Ubuntu 12.04, so you may have to adjust accordingly for your Linux distro of choice).  The first step is to install Avahi:

root@core:/# apt-get install avahi-daemon avahi-utils

When this command completes, you’ll essentially have Bonjour running on your Linux box.  This has a number of advantages, most notably that you can now log into the thing by hostname (eg. core.local for my machine) without having to configure DNS.  But it still won’t allow you to browse shares in Finder; for that, you need a bit of configuration.

And so we move to step 2: create a file in /etc/avahi/services called smb.service, and place the following content in it:

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
 <name replace-wildcards="yes">%h</name>
 <service>
   <type>_smb._tcp</type>
   <port>445</port>
 </service>
 <service>
   <type>_device-info._tcp</type>
   <port>0</port>
   <txt-record>model=RackMac</txt-record>
 </service>
</service-group>

Upon saving it, your new Linux box will happily appear in the Finder sidebar, and should all work.  You don’t even need to restart Avahi; it’ll pick up the new service file automagically.

There are other references out there for how to do this, but they all use port 139 – which doesn’t work.  I haven’t a clue when Microsoft changed the port number, but whatever; I don’t really care.  I have finder browsing goodness, so I’m happy.

How to Check Open Ports in Linux?

Which ports are occupied by which service? How many open ports are there? Learn to scan for open ports on your Linux system or any remote system.Table of Contents

  1. Method 1: Checking open ports in the currently logged in Linux system using lsof command
  2. Method 2: Checking ports on any remote Linux server using the netcat command
  3. Conclusion

Whether you are using Linux as a server or desktop, knowing open ports or ports in use can be helpful in a variety of situations.

For example, if you are running an Apache or Ngnix based web server, the port in use should be 80 or 443. Checking the ports will confirm that. Similarly, you can check which port is being used by SMTP or SSH or some other services. Knowing which ports are in use can be helpful while allocating the ports to a new service.

You may also check if there are open ports for intrusion detection.

There are various ways for checking ports in Linux. I’ll share two of my favorite methods in this quick tip.

Method 1: Checking open ports in the currently logged in Linux system using lsof command

If you are logged into a system, either directly or via SSH, you can use the lsof command to check its ports.

sudo lsof -i -P -n

This lsof command is used to find the files and processes used by a user. The options user here are:

  • -i: If no IP address is specified, this option selects the listing of all network files
  • -P: inhibits the conversion of port numbers to port names for network files
  • -n: inhibits the conversion of network numbers to host names for network files
Checking open ports in Linux

But, this also shows us a lot of extra ports that the computer does not actually listen to.

You can just pipe this output to the grep command and match the pattern “LISTEN”, like this:

sudo lsof -i -P -n | grep LISTEN

This will only show the ports that our computer is actively listening to and also which service is using said open port.

Method 2: Checking ports on any remote Linux server using the netcat command

nc (Netcat) is a command line utility that read and writes data between computers over network using the TCP and UDP protocols.

Given below is the syntax for nc command:

nc [options] host port

This utility has a nifty -z flag. When used, it will make nc scan for listening daemons without actually sending any data to the port.

Combine this with the -v flag, enabling verbosity, you can get a detailed output.

Below is the command you can use to scan for open ports using the nc command:

nc -z -v <IP-ADDRESS> 1-65535 2>&1 | grep -v 'Connection refused'

Replace IP-ADDRESS with the IP address of the Linux system you are checking the ports for.

As for why I selected values 1 to 65535, that is because the port range starts from 1 and ends at 65535.

Finally, pipe the output to the grep command. Using the -v option, it excludes any line that has “Connection refused” as a matched pattern.

This will show all the ports that are open on the computer which are accessible by another machine on the network.

Conclusion

Of the two methods, I prefer the lsof command. It’s quicker than nc command. However, you need to be logged into the system and have sudo access for that. In other words, lsof is more suitable a choice if you are managing a system.

The nc command has the flexibility of scanning ports without being logged in.

Both commands can be used for checking open ports in Linux based on the scenario you are in. Enjoy.TipsSHARE

What is APIPA (Automatic Private IP Addressing)?

APIPA stands for Automatic Private IP Addressing (APIPA). It is a feature or characteristic in operating systems (eg. Windows) which enables computers to self-configure an IP address and subnet mask automatically when their DHCP(Dynamic Host Configuration Protocol) server isn’t reachable. The IP address range for APIPA is (169.254.0.1 to 169.254.255.254) having 65, 534 usable IP addresses, with the subnet mask of 255.255.0.0.

History

Initially, the Internet Engineering Task Force (IETF) has reserved the IPv4 address block 169.254.0.0/16 (169.254.0.0 – 169.254.255.255) for link-local addressing. Due to the simultaneous use of IPv4 addresses of different scopes, traffic overload becomes high. The link-local addresses are allocated to interface i.e., stateless in nature such that communication will be established when not getting a response from DHCP Server. After that Microsoft refers to this address autoconfiguration method as “Automatic Private IP Addressing (APIPA)”.

Automatic Configuration and Service Checks

It starts with when the user(client) is unable to find the data/information, then uses APIPA to configure the system with an IP address automatically(ipconfig). The APIPA provides the configuration to check for the presence of a DHCP server(in every five minutes, stated by Microsoft). If APIPA detects a DHCP server on the network configuration area, it stops, and let run the DHCP server that replaces APIPA with dynamically allocated addresses.

Note: To Know the given IP address is provided by which addressing, just run the following command:

ipconfig/all

Characteristics

  • Communication can be established properly if not getting response from DHCP Server.
  • APIPA regulates the service, by which always checking response and status of the main DHCP server in a specific period of time.

Advantages

  • It can be used as a backup of DHCP because when DHCP stops working then APIPA has the ability to assign IP to the networking hosts.
  • It stops unwanted broadcasting.
  • It uses ARP(Address Resolution Protocol) to confirm the address isn’t currently in use.

Disadvantages

  • APIPA ip addresses can slow you network.
  • APIPA doesnot provide network gateway as DHCP does.

Limitations

  • APIPA addresses are restricted for use in local area network.
  • APIPA configured devices follow the peer to peer communication rule.