Tag Archives: networking

Getting the most out of your router – part 2

RT-N66U

The ASUS RT-N66U – a modern, high-end home wireless router

In the last article in this series, I discussed what a home router is and a little bit about how it works, as well as providing guidance on how to set up the DHCP server.

IP addresses on your LAN are assigned one of two ways: either by the router’s DHCP server, which provides them out of the DHCP address pool (which I suggested should be 192.168.1.50 to 192.168.1.254) or by statically assigning them yourself (which I suggested should be out of the remaining 192.168.1.2 to 192.168.1.49 addresses). Assigning static addresses is very seldom necessary on modern routers, however, because most modern routers have a feature called “DHCP Reservations.” This allows you to specify the MAC address of a device and make sure it is assigned the exact same address via DHCP every time it is connected to the router. Using DHCP reservations, you can ensure that your laptop always gets the same IP address without having to configure a static address for it (which is a pain, since you’d have to re-configure it every time you go to the coffee shop).

Using either static addressing or DHCP reservations, you may want to make sure that “infrastructure” on your home network, like file servers, entertainment systems, or security devices always have the same IP address.

Your router’s NAT usually automatically closes off all the ports on your public IP address, making it impossible to access anything on your LAN from the Internet. In most cases, that’s a good thing – you don’t want the Internet able to reach your private network. But, in some cases, you want to make devices on your network available from the Internet (ALWAYS protected with strong passwords, of course!). The classic example is the IP camera set to watch something important on the farm – it could be the front drive, livestock, or your machine shed – you want to be able to access it from wherever you are so you can check up on it. But you might also want to be able to check and operate machinery like your grain dryer, pumps, irrigation systems, HVAC systems, etc. from a distance.

firewall1

The IP camera has a webserver that uses port 80 (usually) for its interface, so the trick of port forwarding is to open one port on your public IP address and tell your router to “forward” all packets coming to that port automatically to port 80 (or whatever port you configure) on the camera. So you “knock a brick” out of the router’s firewall by specifying one port on the public side (I like to use ports 7001-7099, because very few services use these ports) and forward that public port to a port on your camera.

firewall2

The way you do this varies from router to router, but the drill usually entails going to the “port forwarding” interface on your router and specifying the incoming or public port (7001), the device that’s receiving the packets (your camera’s IP address – 192.169.1.something), and the port on the device that will receive the packets (port 80). Then, if your public IP address is 101.102.103.104, you can access your camera on the Internet at http://101.102.103.104:7001 (the IP address, a colon, and the port number). Some routers allow you to specify only certain incoming IP addresses that can access the camera, but that’s usually not a good idea because, for instance, if you want to look at the camera from your smartphone, you won’t know the IP address of the smartphone.

NOTE: some routers (stupidly, in my opinion) require that the port numbers on the public side and the private side be the same – they won’t forward port 7001 on the public side to port 80 on your camera. If you have a router like that, you’ll need to reconfigure your camera (or whatever device you have) to the appropriate port (e.g. 7001) port before you can do the port forward. You shouldn’t forward ports under 1024 unless you know exactly what you’re doing, because you might be disabling something your router needs to function properly. Forwarding extremely popular ports like 80, 20, 21, 22, 23, 25, etc. can also attract password crackers and other undesirable elements to your network.

Let me emphasize at this point the importance of a strong password on anything that’s exposed to the Internet – if you can access it, so can anyone else, so make sure it’s locked down.

On my own home network, I have several ports forwarded to different IP cameras around my property, as well as ports forwarded to my desktop Windows machine (using VNC so I can access it easily when I’m away) and my Linux development machine (using SSH). I can actually access any of those devices using my smartphone, so I can stay on top of things anywhere I have an Internet connection.

Click here to go to Part 3

Getting the most out of your router – part 1

wrt54g

The venerable Linksys WRT54G – Courtesy of Linksys

The world of networking is complex, including that little bundle of technology sitting on your shelf – your router. It is actually a pretty amazing little device that can probably do more than you realize. In truth, the typical “consumer” router is a combination of three devices:

  1. A router – a router is a device with two or more ports that is used to connect two or more networks together. Typically, the consumer router has a “WAN” port that connects to the “Wide Area Network” of your Internet Service provider and “LAN” ports for your Local Area Network.
  2. An Ethernet switch – you may have noticed that your router doesn’t have two ports; most actually have five: one WAN port and four LAN ports. Inside the box is an Ethernet switch that turns the LAN port of the router into 4 LAN ports to which you can connect wired computers, servers, and even additional Ethernet switches if needed. Actually, it’s 5 LAN ports, because the fifth one is connected to…
  3. A WiFi Access Point – this is simply a wireless radio connected to an internal LAN port that provides a WiFi signal for computers, tablets, smartphones, IP cameras, entertainment systems, and all kinds of other things. This WiFi radio is usually optimized for short-range, indoor use, providing maximum throughput for a short distance.

One of the odd and important facts about a router is that it has two Internet Protocol (IP) addresses: one on the network to which its WAN port is connected (which should be a public IP address, visible from the Internet – e.g. 108.162.198.52, ayrstone.com’s address), and one on the LAN port, the network it creates for you (a private address, not usable from the Internet, e.g. 192.168.1.1). Its job is to take data packets from each network and move them to their destination network. So, if your computer is at 192.168.1.50 on the LAN, and it receives a packet on its WAN port destined for 192.168.1.50, it passes it to the LAN port where it finds its way to your computer. Similarly, if your computer creates a connection to 108.162.198.52, the router receives packets from your computer on its LAN port and routes them to the WAN port. When you print to your networked printer (at, say, 192.168.1.100), it receives packets from your computer and then just turns them around and sends them back down the LAN port, since they are not destined for the Internet.

The ability of the router to accept traffic on a single public IP address and enable several different computers at private IP addresses to have separate “conversations” with the Internet is called “Network Address Translation” or NAT. The way it does this is by using “ports” – simply numbers associated with every IP address.

Each IP address has 65,535 possible ports. Some ports have pre-assigned purposes, some are available for use by applications, and some are ephemeral – here’s a good explanation of which are which. NAT uses those ephemeral ports to keep the conversations between your network and the Internet straight; for instance, your computer’s conversation with this website might be using your public IP address’s port 55135, while another computer on your network might be having a conversation with another website on port 61234. To the two websites, it looks like the traffic is coming from a single computer, specifically your router. Your router then routes the responses from the websites to the correct computer based on the port on which the data comes in.

The private IP addresses on your network are usually assigned by your router using Dynamic Host Configuration Protocol or DHCP. When a computer connects to your network, it will ask the router for an address via DHCP, and the router will provide it one (assuming it has one to provide). The address is referred to as a “lease,” because it will expire at some point after the device leaves the network, so it can be used by another device. However, note that you can simply assign a static IP address to a device in your network, as long as (1) it is an IP address inside your network (usually meaning it has the same three first numbers as everything else on your local network, e.g. 192.168.1.x) and (2) it does not interfere with the DHCP settings on your router (if your DHCP server begins at 192.168.1.50 and your router is at 192.168.1.1, use static addresses between 192.168.1.2 and 192.168.1.49, and KEEP TRACK OF THEM WHEN YOU ASSIGN THEM!!!)

The first tip for getting the most out of your router is this: set up your router’s DHCP server carefully. I suggest setting your router’s IP address as 192.168.1.1 and setting your router’s DHCP range from 192.168.1.50 to 192.168.1.254 (204 addresses). The reason for this particular range is that, first, it allows for a large number of devices to automatically use your router, getting private IP addresses via DHCP (204) but still leaves you 48 addresses you can use for devices you want to statically assign. This gives you the flexibility to maintain, expand, and control your home network.

Click here to go to part 2

Myths about Wireless Farm Networking

dragon

Myths are fun, but this guy won’t help you get the work done.

We have been talking about the myths of Wireless Farm Networking lately, and I wanted to add my own two cents worth here.

The article about the myths is excellent and stands on its own – I strongly suggest you read it. I thought I’d add a little about the topic here, by focusing on three aspects: Wireless, Farm, and Networking.

Wireless – I have seen “wired” farm networks – a number of livestock producers have trenched and buried fiber lines to their livestock buildings (Ethernet can only go 100 yards) for monitoring and control. However, it’s much cheaper now to go wireless, and it gives you much more flexibility. To build a good wireless network on your farm, you have to learn about “line of sight” (or, more correctly, Fresnel Zones) and position equipment so it has both power available and good radio signal from the rest of the network. It used to be that having a private wireless network across your farm was either technically impossible or cost-prohibitive, but we are proving that wrong every day.

Farm – A farm is pretty much defined as being in a rural area, and we’ve all seen that what works in town doesn’t necessarily work on the Farm, and vice-versa. The AyrMesh network is designed for farm use – relatively few people and machines spread out over a relatively large area. There are lots of good solutions for networking in town, where there are a lot of people in a small area, but they will never work as well as a solution designed specifically for the farm.

Network – The Internet Protocol (IP) network is the single, unified data communications medium for this century. I have seen farms that had a wireless link for their weather station, another wireless link for their GPS corrections, a home WiFI system and cellular coverage. Getting rid of the “point-to-point” solutions and putting everything on the network enables you to collect and transmit the data you need more easily, deliver what you need over the Internet, and gives you the option of adding new technologies to your operation quickly and easily.

Some people think this is revolutionary, but I would argue nothing could be further from the truth: this is the result of a clear evolution over time. In the 1970s academicians started tying computers together and transferring data over the first networks. In the 1980s networks came out of academia and started being used for business and even personal purposes; in the meantime, ham radio operators and researchers were starting to send digital data over radio waves. In the 1990s companies started to network their offices to share files and printers, as well as sending emails. Building-to-building microwave links became relatively common, and Industrial Automation moved to IP networks. In the 2000s the consumer internet became a reality, as did WiFi for wireless data, and we all got “on the net.” Now, in the 2010s, we have the Internet of Things and the low cost of high-power wireless networking, making this the decade of Wireless Farm Networking. The ability to monitor farm data and even control farm operations using a local network connected to the global internet will change agriculture forever.

What do YOU want for Christmas???

Santa Claus with a big bagWe were curious about that question ourselves, so we commissioned a survey of growers across the corn belt.

We got over 100 responses to our call from Minnesota to Tennessee and Ohio to Nebraska, all across the Midwest.

All things wireless top the list of technology-related gifts that farmers want for Christmas this year. More than 40 percent of those surveyed are putting wireless remote cameras and wireless remote weather station / soil sensors on their lists. And nearly 50 percent would like a wireless farm network that extends up to 7.5 miles from their homes.

Farmers are also frustrated by the lack of connectivity on their farms. In fact, nearly 80 percent of those surveyed said they are frustrated that their wireless network does not extend to sheds, grain bins or nearby fields.

Other technology-related gifts that farmers say they want according to the survey include wireless remote grain monitoring, an iPad or other tablet, a new router, and remote thermal imaging.

If you’re worried that Santa might not deliver this year, you might want to take care of yourself: go to ayrstone.com and start a new AyrMesh Network for yourself (or expand your existing network) so you have the wireless access you need!

The hard part of wireless networking: the wires.

iStock_000009813431XSmallIt’s actually an old joke in the wireless networking world: what’s the worst part of wireless networking? The wires!

(OK, it’s an old dumb joke…)

While having WiFi all over the farm is incredibly useful, the only way to make it happen is using Ethernet cables. While Ethernet cables are very simple devices, there are an amazing number of variations and types of Ethernet cables, an choosing the wrong ones (or using them poorly) can cost you time and money.

What is an Ethernet cable?

Cat_5

Courtesy of WikiMedia

Ethernet cables all have some common characteristics: they contain 4 pairs of wires, with each pair twisted around each other (so they are called “twisted-pair” cables). They have an outer sheath to protect the wires inside and they use RJ-45 connectors to connect to networking devices.

The 4 pairs of wires inside the sheath are usually colored green, brown, blue, and orange – one solid and one striped for each color. The wires are usually 100% copper, but some cheaper cables are made of alloys. Alloy cable works OK for short lengths, but should not be used for cables longer than 25 feet. There is sometimes an uninsulated wire running down the middle of the cable called a “drain wire” – this is meant to provide a common ground for the equipment the cable is connected to.

The wires are usually about 24 gauge (AWG), but some cheaper cables use 26 gauge wire, and some more expensive cables use 22 gauge wire. Obviously, the bigger the wire the better, as long as it’s pure copper, but bigger wire also makes heavier cables. It makes a difference if you’re hauling it up a ladder, believe me.

Kinds of Ethernet Cables

Under the sheath, some cables have a shield made of metallic braid or foil. This shield keeps outside noise from penetrating the cable and disrupting the signal on the wires. Unshielded cables are designated as “UTP” (Unshielded Twisted Pair), while shielded cables are designated “STP” (Shielded Twisted Pair). Our experience shows that any cable over 25 feet should be shielded to prevent corruption of the data on the wires and maintain the speed of the data.

You will see, shopping for Ethernet cables, that there are several “Categories” of cable – Cat 5, Cat 5e, and Cat 6 are the common ones available now. The differences are in the speed rating of the cables – Cat 5 can pass data at 10 Mbps or 100 Mbps, Cat 5e can pass data at 10, 100, or 1000 Mbps, and Cat 6 can go up to 10 Gbps. Any of these will work well with AyrMesh equipment – we usually buy Cat5e cables because they are less expensive and widely available. The main physical differences in the cables is how tightly the wire pairs are twisted together.

Finally, the sheath itself can differ quite widely. The normal sheath is usually a form of polyolefin, which does not burn easily. “Plenum-rated” and “Riser-rated” sheaths are coated with a low-smoke PVC, which makes them even more flameproof and reduces the toxicity of the smoke if they do catch on fire. “Direct burial” cables generally have a very thick and heavy sheath, and they may contain a gel that prevents a nick or cut in the cable from admitting water into the cable. Obviously, if water gets into the cable, the wires can corrode and the cable will go bad, but direct burial cables are usually very stiff and very heavy, making them extremely difficult to work with.

Whichever cable you choose, it is imperative that you handle it correctly. Because the cable consists of a bunch of small wires, it is really no stronger than any of those wires. It’s very easy to get a kink in a cable when you’re pulling it through a hole, for instance, and break one of the wires. When that happens, the cable is generally useless.

General Guidelines for Ethernet cables used with AyrMesh products

  • Make sure the cables are all-copper and shielded (STP) if they’re 25 feet or longer.
  • Try to get 24 or 22 AWG wires in the cable.
  • Get plenum-rated or riser-rated cables for use indoors, but don’t use direct burial cables unless you’re going to bury them – they’re too hard to manage.
  • ALWAYS leave a “drip loop” when you’re bringing a cable run from outside to inside a building so water doesn’t run down the cable and ruin equipment!
  • Be VERY careful pulling cables – they are more fragile than they seem!

New Ayrstone Product: the AyrMesh Receiver

Receiver July 2013 Front_400hiToday we’re announcing a new product in the Ayrstone AyrMesh line: the AyrMesh Receiver.

The AyrMesh Receiver is actually, of course, more than a receiver – it transmits and receives data – but it is designed as a simple, low-cost way to put one or more “wired” (Ethernet) devices onto an AyrMesh network. It is very similar to our AyrMesh Hub, but with a couple of important differences:

  1. The AyrMesh Receiver connects to the Hub’s WiFi signal, not the wireless mesh signal.
  2. The AyrMesh Receiver does not create its own WiFi access point – it is a client device only
  3. The AyrMesh Receiver uses a directional antenna for maximum range – it can be positioned up to 2 miles away from an AyrMesh Hub (optimal conditions).

Typical uses for the AyrMesh Receiver include:

  1. Using high-end IP cameras or other network devices that do not have WiFi
  2. Bringing the AyrMesh network inside of metal buildings – an AyrMesh Receiver can be placed on the outside of the building and devices inside can be connected to the LAN port of the receiver. You can even put a WiFi access point inside the building so you have WiFi indoors as well as outdoors.
  3. Connecting devices like network-enabled weather stations in more distant fields – since the AyrMesh Receiver can be up to 2 miles from your furthest Hub, you can now include areas in your network that were previously unreachable.

The AyrMesh Receiver is available now from Ayrstone – please see our website for details.

Welcome to the Ayrstone Blog!

My photo -2002- smiling_small

This is me, but I’ll probably never look this good again.

AyrMesh Hub

This is what it’s about: Ayrstone on the farm. This is Matt Hughes’s farm in IL

This is a blog about Ayrstone, our products, networking, particularly wireless networking, the internet, farm/ranch management, and whatever else we find interesting. The primary author is Bill Moffitt, President and Chief technical guy for Ayrstone Productivity.

As Ayrstone customers who have spoken to me can attest, my interests are many and varied, but they always circle back to ways to get things done better, cheaper, safer, and more effectively. I am a strong proponent of technology, but I’m not really what you might call an “enthusiast.” I think of myself more as a crash-test dummy: I want to try new things, see what the potential is, and then talk about what I find (good or bad). The nice thing about this is, I hope, I can find things that are genuinely helpful. The bad part, of course, is that you may not always agree with my assessment. But, of course, that’s what makes this interesting: I expect some lively comments and discussions about the relative merits of different approaches here.

Just so you know what to expect, I’m a “machine gun” writer: I’ll go a long time without writing anything, and then I’ll put up several posts in rapid succession.

I welcome your comments, both positive and negative. This world of networking on the farm has a lot of big, new opportunities, and I hope I can help you make the most of it.

If so, I’ll have done my job.