Thursday, 29 October 2015

The Layered Approach (OSI and TCP/IP Models)

Understanding how data flows in a network is quite easy once you have a good understanding of the layered approach.

Using a layered approach helps to break down network functions in a very cool way.
You can think of a layered approach as a conceptual model that standardizes network functions without considering the structure of the network or the technologies in use.

Here, I will briefly talk about two models used to break down network functions: The OSI Model and the TCP/IP Model.

OSI (OPEN SYSTEM INTERCONNECTION) MODEL
The OSI model consists of 7 layers, (numbered from bottom up) that is used to standardize network communications and explain network functions.
OSI Model Layers (source: Google)



The functions of each layer of the OSI model are explained below:

LAYER 1 (PHYSICAL LAYER): This layer provides the hardware means for sending and receiving data on a carrier (cables, cards etc). Since cables understand electrical signals (0s and 1s), data passing through this layer are referred to as "bits".

LAYER 2 (DATA LINK LAYER): In this layer, data is encoded and decoded into bits, before being passed on the physical layer. Data in this layer can be referred to as "frames".
The Data Link layer is sub-divided into 2 layers namely: Media Access Control (MAC) layer, and Logical Link Control (LLC) layer. The MAC layer handles how computers on the network access data and whether they have permission to transmit it, while the LLC layer handles synchronization of frames, flow control and checking errors.
A switch usually resides in this layer

LAYER 3 (NETWORK LAYER): This layer provides routing (and switching) technologies, using logical addresses, and handles transmitting of data from source to destination. Data in the network layer is referred to as "packets".
A router is a device that commonly resides in this layer.

LAYER 4 (TRANSPORT LAYER): This layer handles end-to-end delivery of data. It also manages error correction and flow control. It ensures complete transfer of data.
Data at this layer is referred to as "segments"

LAYER 5 (SESSION LAYER): The main function of this layer is to manage connections between communicating devices. It makes sure that sessions are created, maintained and terminated once data transfer is complete.

LAYER 6 (PRESENTATION LAYER): This layer makes sure that the format of the data being transmitted can be read and understood by the application layer. It majorly encrypts the data to protect its formatting, and translates the data between network format (so it can be transmitted across the network), and application format (so it can be understood by the application layer).

LAYER 7 (APPLICATION LAYER): This layer handles user-interaction. The protocols that exist in the application layer makes provision for file transfers, e-mail, and other network services.
Everything in the application layer is application-specific, meaning that it depends on the application being used.

Please note that data at layers 5,6 and 7 of the OSI Model are still referred to as "Data". As it flows down the layers (from 7 down to 1), it changes to Segments, Packets, Frames and Bits at layers 4, 3, 2 and 1 respectively.



TCP/IP MODEL

TCP/IP stands for TRANSMISSION CONTROL PROTOCOL / INTERNET PROTOCOL
This model was proposed by the U.S. Department of Defense (DoD), so, it is sometimes referred to as the "DoD Model".

The TCP/IP model doesn't differ so much from the OSI model, only that it comprises of 4 layers (also numbered from bottom-up).
TCP/IP Model (source: Google)

Let's look at the functions of these layers:

LAYER 1 (NETWORK ACCESS LAYER): This layer defines how bits are signaled by hardware that interface directly with a network medium (cables, etc), and also specifies how data is physically sent through the network.
This layer of the DoD model maps into the functions of Layers 1 and 2 of the OSI model.

LAYER 2 (INTERNET LAYER): This layer maps into the function of the Network Layer of the OSI model. It packages data into IP datagrams (packets) that include logical address information used to forward data to the appropriate destinations.

LAYER 3 (TRANSPORT LAYER): Sometimes referred to as "Host-to-Host Layer", the Transport Layer of the TCP/IP model has the same function as the Transport Layer of the OSI model; i.e. handling transfer of segments from source to destination.

LAYER 4 (APPLICATION LAYER): The application layer of the DoD model combines the functions of the last three layers of the OSI model (Session, Presentation, Application).
This layer defines application layer protocols, and also defines how host programs make use of the network when interfacing with end users.



The following diagram shows the OSI and DoD models in contrast.

OSI vs TCP/IP Models (source: ccna-cme.blogspot.in)


...and there you have it! Network functions explained in easy-to-grasp conceptual models.
Your knowledge of the OSI Model and TCP/IP Model will go a long way in helping you achieve full understanding of network transmission, as well as provide ease in troubleshooting networks when problems arise.




Friday, 14 August 2015

Network Topologies

Network topology simply talks about the way a network is set up. You can think of it as the way network devices are set up and how data flows in a network.

We can have two types: Physical and logical topologies.

When talking about physical topologies, this refers to the way the "physical" devices are arranged; e.g. Routers, Switches and Hubs.

Logical topology refers to the way data flows across a network.

We have 4 "main" network topologies:

1. BUS TOPOLOGY: In bus topology, all computers share a common "bus". Think of this like a single wire, where various users "tap" at various points in order to gain connectivity. This is really a very old kind of set up.


Bus Topology, Source: www.tutorialspoint.com

You can see from the picture above that all computers share a single cable, that is terminated at both ends. It is clear that this kind of set up will only permit one user to transmit at a time.



2. RING TOPOLOGY: A ring topology setup will see computers connected in a loop. One computer is connected to the next, and so on; in a ring layout.
Ring topology, Source: Google

Using this kind of layout on a network has disadvantages too. Once there a failure in any of the links, it could fully cut of full network connectivity.


3. STAR TOPOLOGY: This topology is the most popular example of network topologies. In this kind of topology, there is usually a central device, such as a switch or hub, where all computers on the network connect to.
Star Topology, Source: Google

This kind of network layout usually permits more than one device to transmit at a time.


4. MESH TOPOLOGY: This is a network topology in which computers are connected to one another so that all computers can access each other and share information.
Mesh Topology: Source: www.technologyuk.net

A mesh topology layout is expensive, considering the cost of cabling, and considering the fact that computer systems usually come with only one Network Interface Card (where you plug in your network cable); hence, you would have to purchase additional units of those.

Mesh topology can be either partial mesh or full mesh.
Partial mesh allows some computer systems to be connected to all others, while full mesh ensures that every computer on the network is connected to every other computer (such as in the diagram above)

There are other network topologies that exist, such as the extended star (which consists of multiple star topologies connected together); but all are based on the four mentioned above.

Wednesday, 29 July 2015

Communication Modes

Just wanna take a moment to briefly explain the communication modes you will find in networking.

We have Four (4) communication modes:

1. Unicast: This is referred to as one-to-one communication.
In a scenario where one device sends data to ONLY one device at a time, that is an example of a unicast message.

2. Multicast: This is referred to as one-to-many communcation
In a multicast mode of communication, messages are sent from one source to multiple destinations at the same time.
A good example of a multicast message can be where you have a classroom full of people, and you walk in with a wish to speak to only those with brown hair. That way, you (the source) sends the message to only those group of people (one-to-many), out of the total number of people available.

3. Broadcast: This is referred to as one-to-all communication.
Broadcast messages are sent from one source to every destination connected to the source.
A good example of a broadcast is a radio. Everyone tuned in to that radio station will get the messages being transmitted, whether it is intended for them or not.
Having broadcasts on a network can significantly slow down activities, as the whole network could be flooded with messages not meant for everyone being broadcasted to everyone connected.

4. Anycast: This is referred to as one-to-nearest communication.
This communication mode is being utilized by IP version 6 (IPv6) and allows a form of communcation where a device communicates with the nearest of multiple destinations that can respond to its request.
This means that if there are say, two destinations that can receive and respond to the request initiated by a device, using anycast communication mode, only the "nearest" destination would respond.



IP version 4 (IPv4) makes use of Unicast, Multicast and Broadcast modes of communication, while IP version 6 (IPv6) makes use of Unicast, Multicast and Anycast modes of communication.

Network Devices

Okay, so I was talking to a few friends today about networking, and I decided to introduce them to it.
After explaining the general concept behind computer networking, I felt there was a need to show them a few devices and explain what those devices do.

Well, networking is made possible by connecting devices together, and these devices are simply called network devices.

Examples of network devices are: Hubs, Switches, Routers, Access Points, Firewalls, etc.

Let me briefly talk about each of the above mentioned devices.

Hubs: Think of a hub like a cable with ports on it. Hubs really don't do anything apart from broadcasting whatever they receive to everyone connected to it. A hub is NOT intelligent, since it can not make decisions on whether or not to forward the data it receives; it just sends it to everyone.

Switches: A switch can sometimes be called an intelligent hub. This device is still one of the most widely used network devices today. A switch has three main functions:

1. Address Learning - This is usually the first thing a switch does before it can perform its other functions. Switches learn addresses called MAC (Media Access Control) Addresses, which is really a unique address for every network capable device. Once a switch has learnt addresses connected to it through its ports, then it is easy to forward data to only the intended recipient, as opposed to forwarding data to everyone (like a hub does)

2. Forward & filter frames - A switch can filter frames, as well as forward it if no filtering is required. Meanwhile, a frame is what data is called at the point where it encounters a device such as a switch. More details about that later.

3. Loop avoidance - A switch has a way of making sure that there are no loops in data transfer. This characteristic makes it a much more preferable device than a hub, since certain things (which will be talked about later) can be done to determine what is sent, and where it should be sent to.


Routers: A router is a device that connects various networks together. It has 4 main functions:

1. Packet Switching - A router can easily switch a packet from one point to another.

2. Packet Filtering - A router can filter packets, and decide whether or not to forward them.

3. Path selection - A router can weigh various options, and determine the best path through which a packet should be sent in order to get to its destination safely.
*Meanwhile, a packet is what data is called at the point where it encounters a device such as a router*

4. Internetwork communication - Once a router is connected to more than one network, it can allow users on different networks to communicate and share resources.

Access Points: An access point, widely known as Wireless Access Point, is a device that allows users to connect to a network wirelessly. This means that users do not need to connect through network cables in order to access the resources that are being shared on a network.

Firewalls: A firewall is a security device that either permits or denies data traffic to a network. A firewall can be configured to accept/deny traffic based on different criteria; and this is usually dependent on the security policy of the organization involved.


So, you can see how interesting it is just knowing about some of these devices. After talking about these to my friends, I could see smiles on their faces, and I'm sure you've gained enough to put one on your face too.

Feel free to ask questions and make contributions.

Tuesday, 28 July 2015

Computer Networks and Classifications

A computer network is a collection of computers for the purpose of information exchange. This exchange of information is made possible through network media such as cables. Networks can be either wired or wireless.

Computer networks differ in size, as well as the kind of data that is shared across the network.
Networks are classified into 3 main categories, namely:

Local Area Network (LAN): This kind of network is usually set up in a small geographic area; usually covering a small room or up to a single building. A good example of a Local Area Network is a home network set up to provide basic file sharing between users, as well as basic internet connectivity.

Metropolitan Area Network (MAN): This kind of network covers a much larger geographic area than a LAN. Such networks are usually city or nation wide, and connects multiple network devices in different locations. A good example of a Metropolitan Area Network is a network that services say, a bank with branch offices across various states of a country.

Wide Area Network (WAN): This is the largest of the three classifications of computer networks. There is virtually no limit to how large a WAN can be, as it connects networks across countries and contents. The internet is the largest Wide Area Network in existence.

Your knowledge of what a computer network is, as well as its classifications, will help you to better understand other concepts that will be touched in subsequent posts.

Welcome on board.