Hello Captains, Crew Members, and Owners or Sail and Motor Yachts.
In continuing on my legacy of writing interesting articles and providing information (see marinetelecom.net and wifiyacht.net) to empower Marine Users …
Computer Networking 101 – By Alan Spicer
A lot of articles on Computer Networking can be very complicated and intricate … I will try not to be.
I will start from the top and work down to your individual devices.
The Internet – is the biggest network – or more correctly an Internetwork. And interconnected system of LOTS of computer networks and end users. It’s difficult really to find the TOP because nobody – no network is really The Top. That’s the whole point – to have everyone for practical purposes on a even position in the Internet.
Web sites that you visit are hosted in large data centers with large servers with FAT DATA PIPES or High Capacity Internet connections. Some use elaborate data caching schemes and have multiple redundant sites to serve you wherever you are (Google is such an example.) They are either their own BACKBONE PROVIDER or they peer (connect) with one. From there there are Internet Exchange Points with large routers that interconnect the larger networks to each other … and they peer or share each others connections. Large Backbone providers have links that go across the country (US) and the world via wire cable, fiber optic, RF – Radio Frequency, and Satellite links. Cellular Data / Internet providers are also connected to these large backbone providers.
Everyone has an ISP. Some of us may have more than one. On Cellular and Satellite you have a specific provider which is arrange by your contract for Internet Service. On WiFi – you are on whatever ISP the WiFi Hotspot is on. So you don’t really have a choice – you are on whatever they chose to be on. *This article isn’t about SPEED or BANDWIDTH of your Internet connection. Perhaps that will be covered in a later article.
Your ISP connection has a router or routers that are considerably large … they take the connection from YOU, from your router (which might also be your connection Modem) and link it up with their networks and the larger Internet. You may have multiple Internet connections – especially on a boat or yacht. When you change that connection – you change your ISP.
Internet Protocol – is the protocol that encapsulates (packages) and transports your data on your local network, your ISP’s network, and to elsewhere on the Internet at large. It handles connections, routing, and other messaging to accomplish this. There can be other protocols used, for example Border Gateway Protocol, by the ISP’s and Backbone Providers (sometimes ATM – Asyncrhonous Transfer Mode and Multi-Protocol Label Switching, among others … but you don’t need to know about those.), because it is sufficient to know that these things get the job done … and they are not your problem.
Down to your local network … once we are past the ISP’s router and we are looking at YOUR router then that device has to take the Internet Connection (Real Internet IP Address) and pass it safely on to your local network. How does it do that?
Your router will run some protocols of its own. Up until recently we have been on IPv4 … Internet Protocol Verion 4, however IPv6 has been implemented and will start popping up everwhere very soon if it has not already.
NAT – Network Address Translation – Your router uses a protocol and service called NAT which translates the real Internet IP Address to another Network Address Range (See: RFC-1918 Private Addressing) for use on your local network. When you request a web page or other data from the Internet your router translates your private IP Address to the public Internet IP Address on your outbound transmission … it also handles translating inbound related transmissions coming back. This provides some level of security because most inbound traffic not related to an existing outbound request (connection) will be ignored and dropped. Most routers allow making holes in the NAT by allowing certain types of inbound connections to go to certain computers or devices (Port Forwarding) allowing you to make something available on the Internet without your being actively personally involved in it.
DHCP – Dynamic Host Control Protocol – Your router uses DHCP to manage the private IP Address Space (RFC-1918 Addresses) on your Local Area Network. It “leases” IP Addresses to individual computers and computing / networked devices and also provides Default Gateway and DNS Server information to them.
DNS – Domain Name Service – provides the translation from Internet Names (like Google.com) to their real IP Address. Your ISP, a network of Master DNS Servers on the Internet, and your own router provide DNS lookup services (DNS Proxy) to allow you to get around on the Internet without having to know how all of this works. But now you sort of do.
Your local network – LAN – Local Area Network – is the network inside your vessel (or premises on land) and includes both wired and wireless capabilities. For all intents and purposes Wireless is the same as Wired … if we skip the technical details of how 802.11 (all versions B, G, N) works … then a Wireless Router is just a Wireless Network Switch-Hub. You could pretend a wire was connected to the end computer or device in place of the Wireless Signal (and protocols) required to make that happen.
So how do computers know how to talk to each other on a LAN? Do they call 411? Or use some kind of Directory Assistance? Well yes, sort of …
On a “Switched” (the new name for Network Hubbing is “Switching” and it’s much better!) LAN computers still talk using IP Addresses. But they don’t know about each other. Also the switch hubs have to set up a path to what Ethernet Jack or Port each computing device is connected to. Wireless Routers have to do that too. Switches and Wireless Routers have to set up a “switching table” by your devices MAC address, they don’t care about your IP Address. They just switch MAC addresses to the correct port. The IP Addressing is encapsulated (or packaged) in the Ethernet Packets (called Frames). So your computer gets the Ethernet Frame packages and gets to sort out (by unpacking them) what else to do … namely route them by the IP Address information and any local virtual Port Numbers or Applications that the “stuff” gets delivered to. When I say computer in that last sentence the same thing applies to any network device including your router that has a Network Card (Ethernet or Wireless Connection port) in it. The idea being that the switching part is pretty much Transparent Bridging. You could pass anything over the bridge link. You could sneak in, although I don’t recommend it, more than one LAN IP Address range. The wired switches and wireless access points (not in router mode) would not care. That is an important point. If your network had a missing DHCP server you could configure a network device on the correct IP Address Range and it would still work. If you also manually gave it DNS and Gateway / Router settings .. it would be fully functional. That’s called a Static IP Address set up.
ARP – Address Resolution Protocol – Is a protocol kind of like looking for a person in a large hall when you don’t know what that person looks like. So you shout out “John …” “John are you here?” and hopefully John would answer. In ARP – one network device “broadcasts” a message asking who has a certain Local Area Network IP Address. “ARP – Who has 192.168.0.1?” and the device that has that IP Address would answer “ARP – 192.168.0.1 is at 01:23:45:67:89:ab ” (http://en.wikipedia.org/wiki/MAC_address.) And then the device builds its own MAC Address to IP Address Table. It uses that table for a length of time until it expires and then asks again.
So basically on the LAN we can almost transparently hop across Ethernet Switch Ports (or CAT5 jacks) and Wireless Access Points or Routers as if they were not there … assuming nothing in the middle is in Router Mode … Router Mode kills and divides Local Area Networks. So there will always be one or more routers between different networks. It’s not normally possible to communicated across a network barrier (two different IP Address ranges) without a router to bump you across to where you need to go.
Internet Protocol Version 6 – IPv6 – changes some of these things. In many cases it is no longer necessary to do NAT. There is just so much IPv6 Address Space and so much given to end user connections that NAT is pretty much not needed any more. DHCP version 6 could be used … but it is pretty much common now to just advertise a large chunk of IPv6 Space (called your Address Prefix) and allow the individual computing devices to create their own IPv6 address within that range. A server or service called “Router Advertisement” (RADVD on Linux / Unix) does this. It basically says via broadcast “I am an Ipv6 Router, here is the Address Range / Prefix, and here is your Gateway and DNS Settings”.
Many connections (local area networks) may be operating Dual Stack … which means IPv4 and IPv6 are both available. Your router then would probably do the same NAT and DHCP stuff as described above for IPv4 and run the RADV service to get your devices going on IPv6.
It is possible and still happening, particularly on marine vessels, where only IPv4 is being used … despite the fact that the computing devices are active on IPv6. In that case the devices only have their Local IPv6 connectivity running. They are running the protocols to discover their neighbors (other computing devices) but will not discover a router if one is not available. They will then only be able to communicate via their “Link Local” (or FE80:: prefixed) addresses and will not have an IPv6 Gateway (Router) to get off of the local area network. They still get each other Link Local and Mac Addresses … via newer protocols similar to the functionality of ARP. But it’s called Neighbor Discovery now.
That’s all for now!
Alan Spicer Marine Telecom
+1 954 683 3426
communications @ marinetelecom.net