Network Basics PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

0.

Network basics

0.1 Introduction
In today’s high-tech environment, information is our most valued resource. From a
historical point of view, people have always found ways to share information, whether
it be by smoke signals, mail or classic telephone links. Today’s information networks
are just the next step in this evolution. Understanding the devices and concepts that
make up this system is therefore imperative, so that all information and ideas can be
exchanged smoothly, without fault and efficiently.
This chapter will familiarize
you with the basics of
network design. We will
cover the various devices
that exist on a network,
their roles and how they
communicate with each
other. We will also take a
look at the ISO/OSI model,
a specialized system that
allows for interoperability
between various devices in
a network. Lastly, we will
learn how to read and
create IP addresses.
If you are already familiar with these topics, feel free to skip this chapter and continue
with the next one, Simple Network Design. Note however, that information entailed in
this chapter is considered basic network knowledge and will not be explained in the
next one.
0.2 What is a network?
When most people talk about a network they talk about two or more devices
connected by a common medium. Because of this connection, devices can share
data or provide various services to each other. Many factors influence the size of the
network:

- The geographical area the network covers


- The number of users the network can support
- The various services the network will provide

A network that covers a single


geographic area (a building, a
campus or a single business),
and thus provides services for
this area, is usually called a
LAN (Local Area Network). A
LAN is usually governed by a
single organization, meaning
this organization can change
the rules of communication
whenever and as much as
they like.

However, bigger organizations


usually have multiple branches.
These are sometimes divided
by large geographical
distances. A LAN can easily
provide services for one
branch, but multiple LAN
networks have to be connected
by a WAN (Wide Area
Network). In such a case, the
organization requires the
services of an ISP (Internet
Service Provider) to connect
said networks. The
organization still has full control
over the LAN networks. But the
connection between them is
controlled by the ISP.
In this course however, the word “network” means that it has all the properties of a
LAN, so we shall focus our attention on those.
0.3 Network Components
When data travels from source to destination, it can be as simple as crossing one cable
connection from one computer to another or it can be as complex as crossing hundreds
of connections across the globe. This infrastructure is composed of various hardware
and software. First, let’s talk about the hardware.
Hardware is the physical part of the network, all the devices you can touch. A
computer, a router, a switch or the cabling between these devices is all part of the
hardware. Sometimes the hardware isn’t as visible though. For example, when using
a wireless connection to communicate, even the air between the devices is considered
hardware. In a network, hardware devices can be divided into three classes:
- End devices
- Intermediary devices
- Network Media

0.3.1 End devices


End devices are the most familiar type of device, especially for people who aren’t IT
engineers, as these are the ones that form the interface between the human
network and the communication network. In any network communication, an end
device is always the source of this communication and an end device is always its
destination. The most typical end device is probably the computer, however, in a
wireless communication it can also be a phone, a printer, a PDA or even a mobile
barcode scanner.
0.3.2 Intermediary devices
End devices are the ones we are most familiar with, but it’s the job of intermediary
devices to work behind the scenes and maintain network connectivity. These
devices connect individual hosts to the network and connect various networks to form
an internetwork, also known as a network of networks. It is also the role of
intermediary devices to make sure that information arrives where it is supposed to,
but we will cover that in much more detail later. Examples of intermediary devices
include: routers, switches, hubs, wireless access points or firewalls.

Exhibit n.2: a Router


Exhibit n.1: a Switch
0.3.3 Network media
Communication on any given network is carried over what is called a medium. In
other words, the medium provides the channel over which the message travels
from its source to its destination. Today we primarily recognize three types of
media:
- Copper cable
- Fiber optic cable
- Wireless
All of these have different advantages and disadvantages which have to be taken into
account when constructing a network. The most important criteria for choosing a
particular type of medium are:
- The distance over which a medium can successfully carry a signal
- The environment in which the medium can be installed
- The speed and amount of data the medium can carry, known as bandwidth:
bandwidth is a limited resource, too much data and the medium becomes congested
- The financial cost of the medium

Exhibit n.3: Copper cable Exhibit n.4: Fiber optic cable

0.4 Communication Rules


All communication, whether it be human or network communication, is governed by
rules. If a Norwegian confronts a Spanish person and they both start talking in their
native language their communication will most likely end up nowhere. But if both of
them agree to speak English then they are getting somewhere. Even if they both
speak the same language, if one of them keeps interrupting the other in the middle of
his sentence, then communication cannot occur. The other person always has to wait
his turn after the other finished his sentence.
The same is true for devices on a medium. But while rules of human communication
are more or less universally known, the rules of network communication are written in
a set of rules called a protocol. There are many protocols, each handles a different
aspect of communication and each has its benefits and drawbacks.
The use of some protocols is so popular that they become standards. A standard is
a protocol that is widely accepted by the network industry and acknowledged by a
standards organization, for example the Institute of Electrical and Electronics
Engineers (IEEE) or the Internet Engineering Task Force (IETF). The use of
standards is vital in the network industry, so that products from different
manufacturers can communicate with each other. If a manufacturer ignores protocol
standards, their devices will only be able to communicate with devices from the same
manufacturer. If every manufacturer would do this, global network communication as
a whole would cease to exist.
Since there are so many protocols, there has to be some sort of system that helps to
visualize their roles and interaction between them. One of the best ways to do this is
using a system of layers.
In our previous example, the communication between the Spaniard and Norwegian
had three layers:
- The physical layer: the medium they used was the air between them, other
examples include radio communication or telephone
- The “rules” layer: they had to agree to a common language (English), they had to
talk one at a time
- The “content” layer: this depends on the topic of their conversation, for example,
one of them could have been asking for directions in an unknown environment.
Network communication is a little more complex than this, but in principle, it works
exactly the same. Many models exist to show how exactly information is handled on
a network. However, the most widely accepted model is the ISO/OSI model, which
consists of seven layers:

Exhibit n.5: The ISO/OSI networking model


Each of these layers has its own unique task and only together can they guarantee
successful communication. The functions of individual layers will be explained in the
next chapter. Note that a networking model does not show how a network actually
looks like. A model is only a representation of network operation. Actual devices and
individual connections are depicted in a network diagram or topology. An example of
a network diagram or topology is depicted below.

Exhibit n.6: A network diagram

0.5 Travelling from source to destination


Previously we talked about the various components of a network. We defined the
hardware part of a network in the form of network devices and that these devices are
governed by sets of rules called protocols. Now we shall see how data actually travels
through the network, from source to destination.
When sending data, for example in the form of a video, through the network, this data
could theoretically be sent in its original form: as a continuous, undivided stream of
information, from start to finish, until every last bit of information has been received by
the destination host. This is called circuit switching or circuit switched networks. The
sender and receiver open a path between them through which the data will travel. No
other data can enter this path until the original data has been sent. The path is then
closed. Circuit switched networks present certain benefits: no data is lost during
transmission and, since this communication is strictly point to point, sender to receiver,
the quality of the transmission is easily assured.
However, in larger networks, circuit switching is simply impossible to implement.
Imagine a large network with 100 users who constantly send data to each other. If we
used circuit switching in such a network, 98 users would always have to wait until two
users finished sending data. This situation can be avoided if we divide the data into
smaller parts first. These parts can then travel freely across the network and once all
the pieces are received by the destination, they are simply put back together to form
the original data. This is what we call packet switching or packet switched networks,
because these pieces of data are usually referred to as packets.

Exhibit n.7: Sending five packets through a network


By using packet switching, a lot space is freed up on the network since different
packets from different users can all travel on the same connection. No circuits
between various pairs of end devices are necessary. However, packet switching
presents other advantages:
- Packets don’t need to arrive in their original order. It doesn’t matter if some packets
are sent sooner but arrive later. The original message will be reconstructed anyway.
- Packets don’t need to travel through the same medium. If there are multiple paths to
the destination host, those paths will be used to avoid congestion (congestion = a
medium cannot carry infinite data, it becomes congested if there is too much data on
a single medium).
- When using certain protocols (for example UDP, more about that later), some
packets don’t even have to arrive for communication to be successful, i.e. minimal
packet loss is acceptable.

0.6 ISO/OSI or How to prepare a packet


Now you should know what form information takes when travelling from one end
device to another. But how does an individual packet know how to reach its
destination? How does your system recognize packets that belong to an e-mail from
packets belonging to a file you are downloading? And how does your system place
packets on a certain medium, for example a copper cable?
The answer is simple: all of these tasks are carried out by various protocols on every
layer of the ISO/OSI networking model. When sending information through a network,
every layer adds additional information that make up the final packet, which is then
sent through the medium. On the receiving end of the communication, the same
process happens again, only in reverse order. In this chapter, we will explain the basic
principles of every layer.
0.6.1 The Application layer
The application layer resides at the very top of the ISO/OSI model. This is the layer
which communicates with the human network. When we start up a net browser, a
document viewer or a computer game, an application is started. The application’s
program is the put into the computer’s memory where it is shown as a process. An
application is no more than the communication between the computer and its user.
The protocols of the application layer serve this function, to exchange information
between you and your computer.
A typical example of an
application layer protocol is
the Domain Name Service
protocol (DNS). In
networking, every device
present on an active
network is identified by a
unique number called an IP
address. You cannot
communicate with a device
on a network without
knowing this number. Since
web pages are stored on
devices as well, you cannot Exhibit n.8: Simple DNS lookup
visit a page on the internet
without knowing the address of the device this page is hosted on. For example, you
could type 147.251.49.45 into your browser and arrive at the IS of our university.
Most people however have a hard time trying to memorize these numbers. Thus,
domain names were created. A domain name is the same as an IP address, only
written in plain speech. Unfortunately, your computer does not understand the
meaning of domain names. To arrive at your desired destination, your computer
needs to know the IP address of the domain name you typed into your browser. This
is exactly what the Domain Name Service protocol does. It sends the domain name
from your browser to a special device called a DNS server. A DNS server transforms
the domain name into an IP address which is then sent to your computer.
Of course, there are other application layer protocols, like Hypertext Transfer
Protocol (HTTP) which is used to transfer files that make up the web pages of the
internet or File Transfer Protocol (FTP) which helps with interactive file transfers
between systems.
0.6.2 The Presentation layer
The sole function of the presentation layer is to convert the data created by the
application layer. Application layer data cannot be simply inserted into a packet and
then set through the network. The presentation layer has to:
- Make sure that the data is coded and converted properly, so that it can be
recognized by the appropriate application on the destination device.
- Compress the data in such a way that it can be decompressed by the presentation
layer on the destination device.
- Encrypt the data for security reasons, also decrypt any received data.
The presentation layer does not have its own protocols. Rather it depends on the
classic standards of audio, video and graphic presentation, coding and compression.
For example: MPEG, JPEG, GIF, etc.

0.6.3 The Session layer


The session layer serves to create and maintain dialogues between the application
on the source device and the application on the receiving device. These dialogues
are known as sessions. The information used in keeping these dialogues active is
processed by the session layer. For example, if a dialogue between two applications
is idle for too long, the session layer starts it back up again.

0.6.4 The Transport layer


Previous layers of the ISO/OSI model work with raw data streams. At the transport
layer, this raw data is divided into smaller fragments called segments.

Exhibit n.9: Marking individual fragments with port numbers

Every fragment is an individual data unit and is handled separately by the transport
layer.
The transport layer serves the following functions:
- Division and reassembly of data
- Identifying individual applications
- Assure quality of data delivery
At the start of this chapter we asked an interesting question: How does your
computer separate data coming from, for example, your e-mail from data belonging
to a video you are downloading? In other words: how come the information from an
e-mail doesn’t get mixed up in your video? As you can see above, identifying these
individual applications is the task of the transport layer. To this end, every fragment is
marked with a special number called a port number. A port number is a 16-bit
identifier, which means these numbers range from 0 to 65535. Every fragment is
marked with two port numbers.
The source port number is simply a random number greater than 1023. Simple.
The destination port number defines which application or protocol you are currently
using. Every one of these applications has its own unique port number.
For example: if you are requesting a web page in your browser, all fragments leaving
the transport layer will be marked with a destination port number of 80, as this is the
port number for the HTTP protocol (which we mentioned in the application layer
section). Fragments belonging to the Simple Mail Transfer Protocol (SMTP) are
marked with a destination port number of 25. Requesting the download of a file using
File Transfer Protocol (FTP) will use the number 21.
The transport layer also makes
sure the data sent to another
device is received with sufficient
quality. To handle quality
assurance, the transport layer
has two powerful protocols at its
disposal.
Transport Control Protocol
(TCP) is one of them. This
protocol is what we call a
connection-oriented protocol.
This means that when sending
data, the sender and the
receiver are in a constant
connection. Apart from the
actual data, the two end devices
also exchange frequent control Exhibit n.10: Primary principle of TCP and UDP
messages to make sure that
every single bit of data has been successfully sent and received. If not, then that data
is simply sent again. To start a connection, the two end devices exchange a special
set of control messages called a Three-way handshake. Once all fragments are sent,
the connection is closed using a Two-way handshake. TCP is a reliable protocol,
perfect for applications which require complete, high-quality data. FTP is one of them.
If you downloaded a document, for example, and parts of the document would be lost
in transmission, then the whole document would probably be unusable.
User Datagram Protocol (UDP) is the complete opposite of TCP, therefore it is
referred to as a connectionless or best-effort service. UDP exchanges only very few
control messages and fragments that are lost in transmission are not resent again.
This makes for a fast and effective protocol ideal for certain applications, like video
chat. If some parts of the video are missing, or a few seconds of video are in bad
quality, the overall readability suffers only very little. Such video streaming would be
impossible using TCP, as too much time would be lost in exchanging control messages
and resending damaged or lost data.

0.6.5 The Network layer


We shall study the network layer in much more detail later on, specifically in the first
chapter. For now, know that the network layer primarily handles the routing of data, i.e.
makes sure the data arrives successfully from one host to the other. To this end it
utilizes special numbers called IP addresses, which are attached to the end of a
transport layer fragment. Every device on a network is identified by its IP address.
Fragments on the network layer are referred to as packets. The most widely used
network layer protocol is the Internet Protocol (IP), either in version 4 or version 6.

0.6.6 The Data Link layer


Same as the network layer, the details entailing the inner workings of the data link layer
shall be revealed in a later chapter. What you should know however, is that while the
network layer handles communication from end device to end device, the data link
layer handles communication from one device to the next. The difference? We saw
earlier that most networks consist of three types of devices, not just end devices. When
trying to reach its destination, packets must cross the medium through intermediary
devices as well. The data link layer has its own address type called a Media Access
Control (MAC) address. Once this address is added to a packet, the packet transforms
into a frame. Examples of the most widely used data link layer protocols include the
Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) protocol and
the Carrier Sense Multiple Access with Collision Detection (CSMA/CD) protocol.

0.6.7 The Physical layer


Once a frame leaves the data link layer, it is ready to be transmitted on the medium
connecting our device to the rest of the network. On a medium, for example a copper
cable or a fiber optic cable, data travels in the form of signals. Even though data
leaving the data link layer is clustered in the form of frames, it is still just data. As we
know, data is nothing more but a continuous stream of bits, i.e. repeating ones and
zeroes. The job of the physical layer is thus based on two major elements: encoding
and signaling.
So what is actually encoding? When sending data frames, one after another, how do
we recognize the end of one frame and the beginning of the other? They are all just
ones and zeroes after all. Or how do we distinguish between control messages and
actual data frames? This is what encoding is for. Encoding transforms a stream of bits
into a predefined code, recognizable by both the sender and receiver. A great example
of a simple encoding technique is 4B/5B.

Exhibit n.11: 4B/5B encoding table


This method transforms groups of four bits into groups of five, providing for simple
encoding of data. Encoding techniques used in today’s modern networks are usually
much more complex than this, nevertheless the principle remains the same.
Once the data is encoded, it needs to be converted into a signal. As with encoding,
there are many signaling techniques in today’s diverse networking industry, but all of
them use different values of a signal’s amplitude, frequency and phase to represent
different bits. Non Return to Zero (NRZ) uses a high voltage value to represent a
binary one and a low voltage value to represent a binary zero.

Exhibit n.12: NRZ signaling


0.6.8 Recapitulation
Now you are familiar with the basic functionalities of each layer. Data created at the
application layer is passed down to the lower layers, divided and is given additional
control information to ensure successful transmission. To sum up:

Exhibit n.13: Data passing through the ISO/OSI model

- The application layer handles interaction with the, chooses the correct protocol to
satisfy his requirements and passes created data to the presentation layer
- At the presentation layer, the data is converted, compressed and encrypted
- The session layer maintains the dialogue between interacting applications
- The transport layer divides the data into fragments and marks each fragment with
port numbers, according to the protocol used in the application layer, either TCP or
UDP are used to ensure sufficient transport quality
- The network layer adds a source and destination IP address to the packet
- The data link layer adds a source and destination MAC address to the frame and
decides when to place the frame on the medium
- The physical layer encodes the frame and converts it into signals which are then
placed on the medium
Using the addresses added by the network and data link layer, the frame can navigate
its way through the network. At the destination device, the frame is decoded, stripped
of all control information and the original information is restored using the rest of the
frames of the original message. The original information is the presented to the correct
application thanks to the destination port number.
0.7 Layer 3 addressing
Earlier we mentioned that the third layer of the ISO/OSI model uses a type of address
called an IP address which uniquely identifies every device on the network. To properly
understand the later concepts of networking, we must first find out how to read these
addresses.
There are two versions of IP addresses, according to the version of the IP protocol
used. For now, we will focus on the older IPv4 address type.

Exhibit n.14: Composition of an IPv4 address

An IPv4 address is 32 bits long, or 4 bytes. Since remembering so many continuous


bits of information can sometimes be a problem, IP addresses are usually written in
the form of a dotted decimal. In the picture above, the 4 bytes represent the address
172.16.254.1 because:
1 0 1 0 1 1 0 0 = 1 x 27 + 0 x 26 + 1 x 25 + 0 x 24 + 1 x 23 + 1 x 22 + 0 x 21 + 0 x 20 =
128+0+32+0+8+4+0+0 = 172
0 0 0 1 0 0 0 0 = 0 x 27 + 0 x 26 + 0 x 25 + 1 x 24 + 0 x 23 + 0 x 22 + 0 x 21 + 0 x 20 =
0+0+0+16+0+0+0+0 = 16
1 1 1 1 1 1 1 0 = 1 x 27 + 1 x 26 + 1 x 25 + 1 x 24 + 1 x 23 + 1 x 22 + 1 x 21 + 0 x 20 =
128+64+32+16+8+4+2 = 254
0 0 0 0 0 0 0 1 = 0 x 27 + 0 x 26 + 0 x 25 + 0 x 24 + 0 x 23 + 0 x 22 + 0 x 21 + 1 x 20 =
0+0+0+0+0+0+0+1 = 1
Not only devices have their own addresses, but a network itself has an IP address, too.
Every IP address therefore has a network part and a host part. The network part
identifies the address of the network, while the host part marks the host present on this
network. So how do we separate these two parts? Using an identifier called a network
mask. If, for example, the above address has a mask of 24 bits (172.16.254.1/24), the
address of the network are the first 24 bits, the rest if the bits are all zeroes, meaning:
172.16.254.0. Should the mask be 22 bits long, the network would have an address of
172.16.250.0 (the first 22 bits count, the rest are zeroes).
0.7.1 Address space of a network
As mentioned above, the mask identifies the length of the network part of an IP
address. In the previous example, using a 24 bit mask would create a network address
of 172.16.254.0. The rest of the bits are left for host addresses. The first host on this
network could therefore have the address 172.16.254.1 and the last host has the
address 172.16.254.254. Why not 255? The last address of a network is always
reserved for the broadcast address. If you want to contact ALL hosts on your network
at once, you need to use this address. Also, while the first address of a network could
theoretically belong to a normal user, this address is mostly reserved for a network’s
gateway (more about that later).
This means that a network’s mask defines the number of hosts a network can support.
A mask of 24 means the network can support 253 users (8 bits in the host part means
255 addresses, minus the first address reserved for the gateway, minus the last
address reserved for the broadcast address).

0.7.2 Reserved IPv4 ranges


Not all IP addresses can be used in a network, however. You already know that the
last address of a network is always the broadcast address. When the IPv4 address
system was implemented, whole address blocks have been reserved for special
purposes. Exhibit n.15 shows these reserved address ranges:

Exhibit n.15: Reserved address ranges


0.8 IPv6
Although we’ll be using IPv4 almost exclusively in this course, you should know that
this protocol is not without its drawbacks. The most obvious one is that 32 bits of
address space just isn’t enough for today’s fast growing networking needs. Thirty-two
bits of address space can support approximately 4.3 billion addresses. Although an
impressive number, it’s not as impressive when you think about the fact that there are
approximately eight to ten billion devices connected to the internet today. A lot of
effort has been made to enlarge the IPv4 address space as much as possible
(classless routing, DHCP, etc.), but these solutions merely put off the problem, they
don’t solve the problem.

0.8.1 IPv6 address format


That’s the main reason why a new protocol, IPv6, was created. IPv6 addresses are
128 bits long, so running out of address space won’t become a problem so soon,
especially since with this protocol, each human on the planet can own up to 5 x 1028
addresses. IPv6 addresses are a little more complicated, not just because they are
longer, but also because they are written in hexadecimal format where pairs of bytes
are divided by the “:” character. An example is shown in exhibit n.16.

Exhibit n. 16: The structure of an IPv6 address


Like IPv4 addresses are divided into a network part and a host part, so are IPv6
addresses divided into smaller parts as well. The first 16 bits are always the same
and represent the value 2001 written in hexadecimal form. The next 16 bits are
assigned by the Regional Internet Registry (RIR) and the 16 bits after these are
assigned by the Local Internet Registry (LIR). The next 16 bits form the subnet mask.
The last 64 bits are the address of the device itself. Also of note is that in IPv6, there
are no broadcast messages. Broadcast is just a special type of a multicast message.
Multicast means that the message is addressed to a certain group on a network.
0.8.2 Mobility support
Although the small address space of IPv4 was by far the most important reason for
creating IPv6, it was not the only one. Another relatively important disadvantage of
IPv4 is that it has no mobility support. When a mobile device travels from one
network to another, it must change its IP address so that it reflects the new network.
This may cause several problems. The new network must always have a certain
number of unoccupied addresses, else it cannot support a new member. The second
problem is that after changing the network, it may prove difficult for other devices to
locate the travelling device.
That’s why these problems were addressed when IPv6 was created. Every device
using IPv6 can have two addresses:
- Home address: A global persistent address, through which a mobile device is
always accessible, even when the device is not located in its “home” network.
- Care-of address: A global address based on the network the mobile device
currently occupies.
A mobile device is always accessible through its home address, even when said
device is not located in its home network. When the mobile device is not located in its
home network and another device tries to contact it using its home address, the
message is instead received by a special device called the home agent. The home
agent is usually a router connected to the home network. The router receives the
packet and forwards it to the mobile device using a secure tunnel. Of course, there
are certain security liabilities when using this technique. Mainly, the mobile device
has to prove to other devices that it owns both the home address and the care-of
address. This is done by performing a special action called a Return Reliability
Procedure (RR). This is done by exchanging a set of security keys and performing
various tests after which other nodes have a reasonable amount of assurance that
the mobile device is in fact the legitimate owner of both addresses.

Exhibit n.17: Mobility support in IPv6


0.8.3 Security support
IPv4 has optional security support in the form of IPSec. IPSec is a protocol
framework containing various protocols for authentication, encryption and key
production. IPSec however is a mandatory and integral part of IPv6.
When two hosts using IPv6 communicate with each other, they first have to form a
Security Association (SA). These associations contain various information about
the particular kind of secure connection the hosts wish to perform. They contain:
- A key
- A mechanism for authentication and encryption
- Other parameters (counters, duplicity protection, etc.)
The two communicating hosts first have to agree on these mechanisms and
negotiate keys. Various protocols exist to ensure this agreement runs smoothly. One
of the most employed ones today is Internet Key Exchange version 2 (IKEv2). This
protocol automatically authenticates the pair of devices and creates/deletes the
necessary cryptographic material. At the end of the process, two security
associations are created. One for the secure channel used to exchange
cryptographic material and one for the data exchange itself.
IPSec can work in two modes: transport mode and tunneling mode. The transport
mode is called that, because all security information is added when the segment is
encapsulated in the transport layer of the ISO/OSI model. Once the transport layer
information and security information has been added, the segment enters the
network layer where it is equipped with an IP address. On the other hand, the
tunneling mode adds security information only after the entire IP datagram has been
constructed. The IPSec information is added in front of the IP datagram and new IP
information is added before that. In other words, the original IP datagram is stored
within another IP datagram.

0.8.4 IPv6 conversion


The vast majority of devices still use IPv4 and the transition between IPv4 and IPv6 is
a slow and gradual transition at best. Therefore, a mechanism must exist for
successful IPv4 and IPv6 coexistence. Several solutions exist:
- Dual Stack: A device supports both IPv4 and IPv6. This is the most flexible
solution, but the most resource consuming one as well. The device must run both
protocols at the same time and always determine whether the message is IPv4 or
IPv6 first.
- Tunneling: IPv6 datagrams are encapsulated within an IPv4 datagram. This allows
IPv6 messages to travel within the IPv4 infrastructure. The drawback is that
additional load is put upon routers, as they may encounter fragmentation, maximum
packet size or security problems.
- Translators: A device translates IPv6 datagrams into IPv4 and vice versa. This is
only a temporal solution however as this form of conversion doesn’t allow the
advanced features of IPv6 to operate correctly.
0.9 Ad-hoc networks
The last segment of this chapter is focused on ad-hoc networks. To properly explain
what an ad-hoc network is, we must first ask an important question: How do you
receive network connection with a mobile device (phone, laptop, etc.)? The obvious
answer would be using a wireless network. Wireless networks usually divide the land
into smaller cells and each cell is governed by a central station, a transmitter. But what
if the wireless infrastructure becomes unavailable due to power outages, natural
disasters, emergency maintenance, etc.? Or simply what if it is too expensive to set up
the infrastructure in the first place? The solution is to set up an ad-hoc network. An ad-
hoc network is a network without an infrastructure. The network relies solely on the
networking abilities of the participants. These networks usually are constructed for a
special purpose, the phrase “ad-hoc” in Latin means “for this purpose”.

0.9.1 Wireless ad-hoc networks


There are various types of ad-hoc networks. The first type are so called wireless ad-
hoc networks. These networks are formed by various nodes/devices which maintain
connectivity in a decentralized manner. Each node functions as both the host and the
router. The topology is extremely dynamic as new nodes may appear and old nodes
may depart anytime. The drawback of these networks is that they require extremely
complex routing protocols which allow for communication over a multi-hop path in an
efficient way. This problem presents a lot of promise for potential research. Remember
that without a solid infrastructure, even simple network problems can prove to be much
more difficult.

Exhibit n.18: A diagram of a wireless ad-hoc network

Wireless ad-hoc networks can be employed in a variety of ways. Due to their fast
construction and resiliency, the individual nodes are often allowed movement during
the communication, which is known as a Mobile Ad-hoc Network (MANET). This has
practical applications in factory production, disaster recovery or military usage. Another
type of wireless ad-hoc networks are Vehicular Ad-hoc Networks (VANET), which uses
vehicles as routers. This way, vehicles can even interact with roadside equipment.
When compared to MANETs, the nodes in a VANET move in a considerably more
organized fashion.
0.9.2 Wireless sensor networks
Sensor networks are another type of ad-hoc networks. The main difference here is
that whereas standard networks interact with humans, sensor networks interact with
the environment. Nodes in a sensor network are equipped to measure/influence the
environment, process this information and then communicate it wirelessly.

Exhibit n.19: Example of a wireless sensor

Typical applications of wireless sensor networks include emergency operations (for


example wildfire monitoring), habitat monitoring or agriculture (to apply
fertilizers/pesticides only where needed). One important drawback in ad-hoc networks
(not just sensor networks) is limited energy. Devices in ad-hoc networks mostly rely on
batteries for energy, which can become a problem in the long run. An energy-efficient
protocol is needed for these devices to function properly. Oftentimes, some form of
energy saving or energy scavenging from the environment is employed to maximize
the energy available to individual devices.
0.9.3 Ad-hoc routing
Typically in an ad-hoc network, nodes are not within direct communication of each
other. They need to discover efficient routes through which they can deliver packets to
distant destinations. Earlier we mentioned the need for complex routing protocols when
using ad-hoc networks. Generally, there are two types of routing within an ad-hoc
network:
- Address-based routing: Similar to the IPv4/IPv6 protocol. Devices within the ad-hoc
network need to be uniquely identifiable if they are to be reached. This type of routing
supports classic forms of IP communication like unicast, multicast or broadcast.
- Data-centric forwarding: Especially used in sensor networks. In this type of routing,
nodes are not identified by an address, but by their interest in certain kinds of
information. The data itself contained in the message determines where the message
should travel.
Routing protocols can be classified in a variety of ways:
-Proactive and reactive protocols: Proactive protocols discover routes before they are
needed. This produces large routing overheads (time before the network is able to
function normally), but small latency. Reactive protocols discover routes only when
they are truly needed, thus producing small routing overheads, but higher latency.
-Table-driven and source-routing protocols: In table-driven protocols, nodes only
know the next immediate destination for a message. This is fast, but can cause routing
loops (incorrect routing information). Source-routing protocols recognize the whole
path to the destination. This takes more time, but usually is free of incorrect information.
-Flat and hierarchical protocols: When using a flat protocol, all nodes use the same
exact algorithm. In hierarchical protocols however, some nodes have added
responsibilities. This is better when trying to construct a larger network.
-Location-based and non-location-based protocols: Location-based protocols make
use of the physical location of the device. This reduces routing overhead, but on the
other hand these nodes need to be equipped with a GPS or similar equipment. Non-
location-based protocols are completely oblivious to their physical location.

You might also like