Monday 9 November 2015

Introduction to TCP/IP Protocols

Transmission Control Protocol / Internet Protocol (TCP/IP) is a not just a model used to describe network functions, but a suite of protocols that define how various operations are carried out in the different layers of the TCP/IP model, as data flows through a network.

Let's check out some of these protocols below:

Bear in mind that these protocols also apply to the OSI model, but since the TCP/IP model is the most popular and commonly used, we could easily make reference to it as we explore these protocols briefly.

1. TELNET
Let's assume you want to configure a network device (say, a switch or router), and you happen to be far away, you obviously need a way to connect to this device so you can go ahead and configure it.
TELNET makes it possible for a user to establish a remote connection to a network device, usually for the purpose of configuring it.
The only problem with TELNET is that once the remote connection is established, everything is sent via plain text (no encryption), and could be visible to anyone tapping into that session with say, a sniffing tool.
You would want to use TELNET when security is not really an issue; for example, in a classroom setting or in a personal home network.

2. Secure Shell (SSH)
To solve the problem of TELNET (plain text transmission), Secure Shell (SSH) was developed.
SSH does the same thing as TELNET (establish remote connections with a device), but the difference is that SSH does this securely.
This means that upon using SSH to establish a remote connection, everything sent within that session is encrypted, making is safe from prying eyes.
We can confidently say that SSH is a secure form of TELNET.

3. File Transfer Protocol (FTP)
FTP is a protocol that is used by requesting devices to retrieve files from an FTP server.
File Transfer Protocol is reliable, meaning that there is a connection-oriented session established between the requesting device and the FTP server.

4. Trivial File Transfer Protocol (TFTP)
Just like FTP, Trivial File Transfer Protocol is also used to retrieve files from a TFTP server.
The major difference between FTP and TFTP is that TFTP is not reliable, meaning that there is NO connection-oriented session established between the requesting device and the TFTP server.
The only concern in a TFTP transmission is the need to get the files from the server down to the client; not mainly the connection between the two devices. This makes TFTP transmissions faster than FTP transmissions.

5. Simple Network Management Protocol (SNMP)
Simple Network Management Protocol is a protocol that helps to collect information about devices connected on a network. The kind of information collected by SNMP ranges from device temperature, logging messages, etc.
The information collected via SNMP are stored on an SNMP server, and an administrator can log in to the SNMP server to view this information.
SNMP goes a long way to keep track of what's happening in your network, and helps particularly in a large network where an administrator cannot possibly physically monitor all network devices.

6. HyperText Transfer Protocol (HTTP)
HTTP is a very popular protocol and it defines a standard for communication across webpages.
It dictates how operations are carried out in interacting with web pages, and websites as a whole.

7. Network Time Protocol (NTP)
You wouldn't agree more that keeping the correct time is important.
Most businesses run real-time applications, and the job of the Network Time Protocol is to make sure that the time across all connected network devices are synchronized.
Typically, an NTP server exists on a network, and all devices contact it to get the correct time at every point in time.

8. Domain Name Service (DNS)
Domain Name Service acts like a translator by translating the text you type in a web browser to the equivalent IP address needed to complete the connection.
Usually when you type in "www.netcue.blogspot.com", there is a DNS server that converts that web address to an IP address, so that you can receive the correct web page you requested for. Really cool protocol if you ask me...

9. Dynamic Host Configuration Protocol (DHCP)
The Dynamic Host Configuration Protocol is used to help us with a part of our IP addressing problems.
Imagine you had to manually configure say, 500 computers each with its own IP address information! Sounds stressful!
DHCP helps to avoid this stress by handing out IP addresses to computers that are in need of it.
This means that you have less work configuring IP addresses on computers, since only the very important devices would need to be configured statically, while others would get their IP address information from the DHCP server.

DHCP uses what we call a DORA process (Discover, Offer, Request, Acknowledgment).
The Discover and Request messages are sent by the requesting devices, while the Offer and Acknowledgement messages are sent by the DHCP server.

10. Transmission Control Protocol (TCP)
Transmission Control Protocol is the protocol that resides in the host-to-host layer of the TCP/IP model (Transport layer in the OSI model), and makes sure that data is transmitted reliably.

11. Unified Datagram Protocol (UDP)
UDP also resides in the host-to-host layer of the TCP/IP model, but differs from TCP in the sense that it works with unreliable transmission.

12. Internet Control Message Protocol (ICMP)
The Internet Control Message Protocol is used by communicating devices to tell each other if a destination is reachable or unreachable. Routers for example, would send ICMP packets to a requesting device (say, a computer) to inform it that the destination is unreachable.

13. Address Resolution Protocol (ARP)
The Address Resolution Protocol is used at the network access layer of the TCP/IP model (usually by switches) to request for the MAC address of a destination device.
Since the destination MAC addresses is needed in order to successfully complete a transmission, it has to be included in the frame.
When a switch has the destination IP address and not the destination MAC address, it uses ARP to request that the destination device sends its MAC address.

The Address Resolution Protocol is actually a broadcast message, and only the concerned device (in this case the destination device) will respond by sending its MAC address.
Once this is done, the transmission can be successfully done.



......and that is it! (at least for now).
Knowledge of TCP/IP in easy-to-grasp bullets.

When it is required of you to have an understanding of TCP/IP, what is really required is that you have good understanding of the protocols that reside in the TCP/IP model; as this would go a long way in helping you to successfully configure and troubleshoot networks.


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.