Local Area Network (LAN)

Introduction

LAN (Local Area Network) is a computer network which provides the connectivity between hosts (i.e. computers) located within a limited area, e.g. home, office, school, university campus etc. The LAN can be connected to the WAN (Wide Area Network), which covers a larger geographic area (e.g. a city or a country), via the edge router. The two most common transmission techniques used in the local networks are: Ethernet and WiFi.

The most popular scenario is the home network consisting of several hosts connected to the Internet provider network via the home router with access point functionality. It means, that two transmission methods (Ethernet and WiFi) are used in the same network. Thanks to this approach, all computers can exchange data with each other and have the Internet access through the same link. However, these computers are not reachable from an external network (i.e. the Internet).

Network elements

Each local area network consists of: hosts, switches, a router and optionally a wireless access point. Nowadays, the three last elements are combined in one device called a WiFi router. Of course, we can use several wireless access points as WiFi range extenders in order to provide better coverage and performance. Hosts are computers, network printers, mobile phones, smart TVs, gaming consoles, network storages etc. All communication between two hosts is carried out without a router participation. The router forward all packets from LAN hosts to external networks, e.g. the Internet.

IP address

Each host in the network is identified by its IP address. This is a set of 4 numbers separated by a comma, e.g. 192.168.2.10. However, these numbers have to be from defined range. In case of LAN, private IP addresses from 3 classes are used:

·  class A: 10.0.0.0 – 10.255.255.255 (16 777 216 addresses),

·  class B: 172.16.0 – 172.13.255.255 (1 048 576 addresses),

·  class C: 192.168.0.0 – 192.168.255.255 (65 536 addresses).

However, there is no need to set IP address on each host in the network manually. This is done automatically by DHCP (Dynamic Host Configuration Protocol) feature which is supported by all home routers. When a host connects to the network, then it sends DHCP discovery message at 255.255.255.255 broadcast address. The DHCP server will send to the host:

·  assigned host IP address,

·  gateway (i.e. the router) IP address,

·  subnet mask,

·  DNS (Domain Name Server) addresses.

NAT - Network Address Translation

Private IP addresses used in local area networks are not unique worldwide. It means that the same IP addresses can be used in several local networks. However, in order to provide the communication between the host and the server, the router has to translate the host IP address and used port number to the external router IP address and another port. The router simply modifies Source IP address and Source Port in IP datagram packet header. The server responses to the external router IP address and the router forward these packets to the host. These forwarding process is based on the dynamic translation table.

The communication between two hosts located in different local networks is also possible. However, it requires manual configuration of port forwarding feature on both routers. This can be also be done by UPnP (Universal Plug and Play) protocol which is currently supported by most of peer-to-peer clients and home routers. Thanks to this protocol, the port forwarding tables are generated dynamically and applications use the external IP addresses in order to communicate with hosts from other networks.

Link aggregation

In the past, link aggregation solutions were reserved for corporate networks and business applications. These functionalities were mainly used for servers and inter-routers connections. Nowadays, the most advanced home and small office routers also support link aggregation features. This technology can provide for an example 2 Gbps virtual interface using two normal 1 Gbps Ethernet physical interfaces. This feature is applied for an example in high performance NAS (Network Attached Storage) devices.

The link aggregation feature does not allow to exceed the speed limitation for a single data transmission stream. This functionality is supposed to work with several data transmission sessions at the same time. The LACP (Link Aggregation Control Protocol) autonomously load balances the usage of both links. Therefore, the total throughput exceeds the 1 Gbps limit. In order to take the advantage of this functionality both the router and the device (e.g. NAS) have to support the same link aggregation protocol (e.g. 802.3ad).