Fundamentals of Cloud Networking II
This article covers more fundamentals in cloud networking, under the following headings
- Subnetting
- Classless Inter Domain Routing (CIDR)
- The Communication Models: OSI Model and TCP/IP Model
- Port Numbering System
- Types of port numbers
- Some well-known port numbers and their designations.
- Protocols and their Uses
Subnetting
A subnet is a logical subdivision of an Ip network.
Subnetting is converting of host bits into network bits by increasing the network bits. It is done in order to maximize/optimize the use of Ip addresses.
Below are some examples that can further explain subnetting.
Example 1
Divide 192.168.10.0/24 into two subnets
Solution:
Since it is a class C network, the network mask is N.N.N.H
That is, 255.255.255.0
Also 11111111.11111111.11111111.00000000
Dividing it into two would be achieved by replacing a '0' with a '1'/ adding a '1' to the existing host
That means that instead of
11111111.11111111.11111111.00000000, we now have
11111111.11111111.11111111.10000000
Which is now 255.255.255.128 when converted back to an octet.
Also, the number of 1s in it has increased to 25. Hence the short form has now become /25. This is known as the subnet mask
Example 2
Divide 192.168.10.0/24 into four subnets
Solution:
Dividing into 4 would imply adding another 1 to what has already been divide into 2 in the previous example
That equals 11111111.11111111.11111111.11000000
Which is now 255.255.255.192 when converted back to an octet. The new result also now has 26 number of 1s. Hence the shortform has now become /26.
Note that in the network that was divided into two, the first block would now range from
192.168.10.0
.
.
192.168.10.127
where 192.168.10.0 is now the network id
and 192.168.10.127 is now the broadcast id.
Subsequently, the number of valid hosts would be 126
The second block would range from
192.168.10.128
.
.
192.168.10.255
where 192.168.10.128 is now the network id
and 192.168.10.255 is now the broadcast id.
Subsequently, the number of valid hosts would be 126
Anything with subnet mask of /8,/16,/24 is of Class A, Class B or Class C. Anything greater or less than these is now a classless addressing system and its use in practice is called classless inter domain routing. (CIDR)
One can consult the networking table from www.calculator.net. One can calculate subnets from there during network designing.
Classless Inter Domain Routing (CIDR)
CIDR is a more flexible approach to describing blocks of IP addresses. It explains more on the concept of subnetting by using subnet masks to divide networks. CIDR is where we get the shorthand slash notation.
This slash notation is also known as CIDR notation. CIDR abandons the concept of address classes entirely, allowing an address to be defined by only two Individual IDs which are the network ID, and the subnet ID.
For example, taking 9.100.100.100 with a net mask of 255.255.255.0. This can also be written as 9.100.100.100/24. Since the address class of an IP is no longer necessary, all that is needed is the network mask which is the slash value, to determine the network ID.
In the case of the aforementioned, that would be 9.100.100, the host ID remains the same. This simplifies how routers and other network devices think about parts of an IP address. It also allows for more versatile network sizes.
Before CIDR, network sizes were static, having only class A, class B, or class C. Only subnets could be of different sizes. CIDR allows for networks themselves to be differing sizes.
Before CIDR, if a company needed more addresses than a single class C could provide, they need an entire second class C. With CIDR, they could combine that address space into one, with a net mask of /23 or 255.255.254.0.
This means, that routers now only need to know one entry in their routing table to deliver traffic to these addresses instead of two. You also obtain additional available host IDs out of this practice. Just as we always lose two host IDs per network (that is, the network ID and the broadcast ID).
So, if a /24 network has two to the eight or 256 potential hosts, you really only have 256 minus two, or 254 available IPs to assign. If you need two networks of this size, you have a total of 254 plus 254 or 508 hosts. A single /23 network, on the other hand, is two to the nine or 512. 512 minus two, 510 hosts.
Classless Inter-Domain Routing (CIDR) allows network routers to route data packets to the respective device based on the indicated subnet. Instead of classifying the IP address based on classes, routers retrieve the network and host address as specified by the CIDR suffix
The Communication Models: OSI Model and TCP/IP Model
Around 1980, Computers couldn't talk to computer. For example, dell can't talk to dell, Hp can't talk to Motorola and so on until an organization called Department of defense came together to form ISO (International Standards Organization). They built a framework called TCP/IP, a five-layer model. It graduated to OSI- Open System Interconnection, which has 7 layers.
The OSI Model is as follows
Layer 7. Application layer - We interact mostly with this on a day-to-day basis. Some protocols that are found here are http, ftp, smtp (simple mail transfer protocol)
Layer 6. Presentation - This layer is in charge of packaging information in a way each computer, for example, whether Dell, Hp and co would understand
Layer 5. Session Layer - Before any communication there must be a session that keeps the connection. When your network is off, your session would be off. This layer takes care of this connection.
Layer 4. Transport layer - It is responsible for ensuring that the data packets arrive accurately and reliably between a sender and receiver. It mostly uses Transmission Control Protocol (TCP) or User Datagram Protocol (UDP).
Layer 3. Network layer- This layer takes care of how information is delivered to several networks. It askes questions such as: what is the shortest path to get to our destination? The most common protocol used at this layer is known as IP or Internet Protocol. IP is the heart of the Internet and most small networks around the world.
Layer 2. Datalink layer - This layer is also called the network interface or the network access layer. Protocols exist from here to the layer 7. The data link layer is responsible for defining a common way of interpreting signals from the physical layer, so that network devices can communicate.
Lots of protocols exist at the data link layer, but the most common is known as Ethernet. Beyond specifying physical layer attributes, the Ethernet standards also define a protocol responsible for getting data to nodes on the same network or link. This layer tells interacts with the mac address of end devices.
Layer 1. Physical layer - It answers questions such as, "what is the physical link the information can pass through?". This includes the specifications for the networking cables and the connectors that join devices together along with specifications describing how signals are sent over these connections.
The TCP five layer consists of
The Application Layer
The Transport Layer
The Network Layer
The Data Link Layer
The Physical Layer
The sessions and presentation layer of the OSI model are inside the application layer in TCP.
Port Numbering system
What is port Number?
A port number is a number assigned to a service that the computer is handling/running. A port number can also be said to be an application or service running on a server or computer.
Port number starts from 0-65565
Types of port number
A. Well-known port numbers
They range from 0-1023. They are the port numbers reserved for assignment by the Internet Corporation for Assigned Names and Numbers (ICANN). They are reserved for use by the application end points that communicate using the Internet's Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP). Each kind of application has its own designated (and hence, "well-known") port number.
Before ICANN, the well-known port numbers were being administered by the Internet Assigned Numbers Authority (IANA).
B. Registered ports
They range from 1024-49151. A registered port is a network port designated for use with a certain protocol or application.
C. Dynamic port
They range from 49152 - 65565. A dynamic port, also called a private port is a port that is assigned to a process or service just at the time the port is needed or required. This is usually when the process or service is initiated. They are not assigned, controlled or registered.
Some well-known port numbers and their designations.
7 ECHO
20 FTP--Data
21 FTP--Control
22 SSH Remote Login Protocol (management protocol)
23 Telnet (Used to access servers remotely. And it is not secure. It came before SSH)
25 Simple mail Transfer Protocol (SMTP) for email delivery.
37 Time
53 DNS (Domain Name System)
69 Trivial File Transfer Protocol (TFTP)
79 Finger
80 HTTP
110 POP3(Post Office Protocol 3)
115 Simple
137 NetBIOS Name Service
139 NetBIOS Datagram Service
143 Interim Mail Access Protocol
156 SQL server
161 SNMP
194 Internet Relay Chat (IRC)
389 Lightweight Directory Access Protocol (LDAP)
443 HTTPS
445 Microsoft-DS
458 Apple QuickTime
546 DHCP Client
547 DHCP
Protocols and their Uses
In networking, a protocol is a standardized set of rules for the formatting and processing of data. They enable computers to communicate with one another, dictates how a communication happens, secures communications, and so on.
Below are some protocols and their uses.
A. Application Layer Protocols:
1. HTTP (Hypertext Transfer Protocol)
Used in Web communication.
2. HTTPS (Hypertext Transfer Protocol Secure)
Used for secure web communication.
3. FTP (File Transfer Protocol)
Used in file sharing.
4. SSH (Secure Shell Protocol)
Used for secure remote access/login.
5. SMTP (Simple Mail Transfer Protocol)
Used in email transmission.
6. DNS Protocol (Domain Name System)
It allows internet users to access the internet using hostnames instead of numeric IP addresses of the sites they want to visit.
7. DHCP (Dynamic Host Configuration Protocol)
It is used for dynamic IP address assignment in network configuration.
B. Transport Layer Protocols
1. TCP (Transmission Control Protocol)
It is a connection-oriented communication protocol. It is used for secure file transfers, email, web browsing.
2. UDP (User Datagram Protocol)
It is a connectionless communication protocol. It is used in real-time applications (video streaming, gaming).
3. SCTP (Stream Control Transmission Protocol)
It is a connection-oriented communication protocol. It is used in telephony, video conferencing.
C. Network Layer Protocols:
1. IP (Internet Protocol) -
It is used in routing and addressing in network communication
2. ICMP (Internet Control Message Protocol)
It is used for error reporting and diagnostics during communication in the network layer
3. ARP (Address Resolution Protocol)
It is a communication protocol used for discovering the link layer address, such as a MAC address that is associated with a given Ip address.
D. Link Layer Protocols:
1. Ethernet
It is used for Local area network (LAN) connectivity and communication.
2. Wi-Fi (Wireless Fidelity)
It is used in Wireless local area network (WLAN) connectivity and communication.
3. FCoE (Fibre Channel over Ethernet)
This is a storage area networking (SAN) protocol. It enables storage devices to communicate over Ethernet networks.
4. LACP (Link Aggregation Control Protocol)
This is ethernet link aggregation protocol. It is used in combining multiple ethernet links for increased bandwidth.
5. LLDP (Link Layer Discovery Protocol)
It is a network device discovery protocol. It identifies nearby devices, their capabilities, and network topology.
E. Security Protocols:
1. SSL/TLS (Secure Sockets Layer/Transport Layer Security)
It is used for secure communication during web browsing.
2. IPSec (Internet Protocol Security)
It is a secure IP communication protocol. It is used in VPNs (Virtual Private Networks).
3. DNSSec (Domain Name System Security Extensions)
It is a secure DNS protocol. It is used in preventing DNS spoofing and ensures authentic domain name resolution.
4. EAP (Extensible Authentication Protocol)
It is a wireless authentication protocol. It secures Wi-Fi networks by authenticating users and devices.
F. Management Protocols:
1. SNMP (Simple Network Management Protocol)
This Protocol is used in Network monitoring and management.
2. NTP (Network Time Protocol)
It is used in Time synchronization, for example, clock synchronization.
G. File Sharing Protocols:
1. NFS (Network File System)
It is used in file sharing.
2. SMB (Server Message Block)
It is used in file and printer sharing.
Well thought out. Thanks for sharing!