27 Dec 2017

Telnet




Telnet is a application layer protocol where one system can access and use another system over a virtual connection using Telnet Client and Telnet Server by logged into a user's account on port number 23, if they are connected locally.

How telnet works:

Step 1) Install Telnet Client and Telnet server at both client and server side
Step 2) Create a account (Username and password) in client side.
Step 3) Telnet client will send a request to Telnet Server.
Step 4) Telnet server will reply back with asking username and password.
Step 5) If accepted, Telnet Client will established a connection with client.
Step 6) Via virtual terminal, we have access to the client's system.
This all happen when client initiates TCP 3 way-handshake to the server.

Let's see how it does look like, we'll use wireshark for instance.

TCP Handshake before Telent:

Telnet Server IP: 192.168.0.1
Telnet Client IP:  192.168.0.2








 Telnet Server ask for login details to Telnet Client:









Telnet Client response with credentials:

UserID:






Password:






 And Finally Session is closed:

22 Dec 2017

VPN




What is VPN
VPN or Virtual Private Network is a way of connecting a computer to a private network in a public network. It provide us with hard tracking connection by being an anonymous user.

Why We Use VPN
--> Access You Business Network while using public WiFi
--> Access your Home network over VPN while traveling
--> We can Hide our Browsing activity from our ISP
--> We can access Blocked websites
--> We can Download files
--> We can bypass internet over restricted zones...

Setup You Own VPN using OpenVPN: In CentOS

Step 1) Server setup

--> Use this link to select the platform you want to install

https://openvpn.net/index.php/access-server/download-openvpn-as-sw.html 

--> After selecting the OS, choose the OS version.

--> Right click on the OS version and copy link location.

--> Open Terminal and run as root user and type the following command:

--> #wget <Paste the link location>

--> e.g.,
wget "http://swupdate.openvpn.org/as/openvpn-as-2.1.12 CentOS7.x86_64.rpm"

--> After that, enter the following command

--> # rpm -i openvpn-as-2.1.12-CentOS7.x86_64.rpm

--> After some time, you will get server's and client's IP address.

--> For password, type the following command in terminal

--> # passwd openvpn

--> Choose password according to your need.

--> Copy Server's IP address and paste it in the url bar of broswer

--> On the browser you will get login interface, type

--> user : openvpn

--> password: <Your password>

--> Type agree to ULA (User License Agreement)

--> Now you have server up and running.

--> Create a user in the terminal. Use command:

--> # adduser <username>

--> #passwd <password>


Step 2) Client setup

--> In the browser, logout from the admin to come to the connect page and download client openvpn, which will be in the end of interface.

--> Open terminal, become a root user and install client.ovpn file

-->Now type the following command

--> #openvpn client.ovpn

--> # username <type your openvpn username>

--> #passwd <type your openvpn password>

--> Now your openvpn client is up and running

--> Open a new tab in browser and check your IP. It will have new location.


How It Works:

--> As we know, when a computer sends data to another computer through internet, it sends in a series of packets.

--> While in tunneling, the entire packet is send across the internet inside another packer aka encapsulated inside another packet.

--> This encapsulation hides the actual data from external view.

--> VPN creates a secure tunnel across the internet between our system and the our internet destination.

--> This tunnel is first created by authenticating our system with the VPN server (e.g., OpenVPN).

--> Server uses some encryption protocol to secure the data exchange in-between.

Protocols VPN uses:
PPTP: Point To Point Tunneling Protocol
L2TP: Layer 2 Tunneling Protocol
IPSec: Internet Protocol Security
SSL VPN: Secure Socket Layer VPN
SSH: Secure Shell

Other VPN's to use:
1) Openvpn
2) Strong VPN
3) SurfEasy
4) TunnelBear
5) IPVanish VPN
6) HideMyAss
7) Safer VPN

# Although all VPN's are not free, it'll cost you something.


17 Sept 2017

SNMP




Simple Network Management Protocol, works at the Application layer, uses UDP as a transport protocol to manage or monitor hardware and software in a IP network.
It collect and organize information of the network devices like modem, routers, switches, servers used and able to modify them if needed.

How it work: 
1) SNMP Request via snmp manager (A and B)

This is how it looks in wireshark;



2) SNMP Response via snmp agent

This is how it looks in wireshark;



SNMP Manager:
It is an management system or console, which sends IP related query information to the SNMP agent to manage or to make any configuration.

SNMP Agent:
It monitors any system or any network device and responds to the query back to the SNMP manager. It can also send error messages to the SNMP manager if any illegal access has occur.

Step 1) SNMP manager, Host A send a request to another system,  Host B.

Step 2) SNMP manager will create a SNMP message which will contain the number of active sessions, community of SNMP manager, destination (Host B) IP address.

Step 3) SNMP server will then send this message to the Host B.

Step 4) Host B will then receive the requested message.

Step 5) Host B will then verifies or monitor the message, comparing the community of SNMP manager and Source IP address for access permission.

Step 6) If requested content does not match or if it does not have access permission, SNMP agent will send an request of Authentication Error to the community of SNMP manager. And then Community will response to the SNMP agent.

Step 7) In response, Community give the session information of that request to the SNMP agent.

Step 8) SNMP manager will then retrieve that message which contain the IP address of the source Host A back to Destination to Host B.

Step 9) Host B will now response back to the Host A of it's request. Now both the Hosts will communicate.

Use of SNMP:
It is used to reset passwords remotely.
We can re-configure IP addresses.
We can collect error reports, into a log and also send alerts on error condition.
We can also send alerts for device failure or shortage in Memory use or CPU usage.
We can collect information about how much bandwidth is being used.





15 Sept 2017

IP Tables




IP tables, it's an command line linux firewall utility program which allow a system admin for configuration in a linux environment.  It works by checking the packets crossing the network by following some rules to allow or block the traffic in a network.

Firewall is a piece of software or hardware which is used to protect our system from unsecure or untrusted services over the internet. Firewall are often categorized as Network based or Host Based firewall.

Network based Firewall or a packet filter are the software running on a hardware or hardware based application which provide filtering of traffic between two or more networks. Packet filter operate for TCP/IP, where it will not allow or block the IP addresses or any TCP/UDP port when the match is not found with the existing connections. Host based Firewall is a software to control traffic of a single machine.


IP Tables Chain or Rules:
1) Input
2) Forward
3) Output

Input:
It control the incoming connections or the packets that are addressed to our server.

Forward:
It configure the incoming connections which are not created locally or the packets which are destined for other server and route request to the other machine.

Output:
It controls the out going connections or the the traffic created by our sever.

How IP Table Works:
IP table interface, it works by matching each packets that cross the networking interface against a set of rules to decide what to do with the packets. Packets passing through the firewall are directed through one of the policy rule or Chain, depending upon the source and destination address of the packets.

Step 1) Packet or data request come to the firewall.

Step 2) Firewall goes though the process of checking policy.

Step 3) If the packet is coming from the outside source to our machine, it passes through the Input Chain.

Step 4)  If the packet is going to the outside source from our machine, it passes through the Output Chain.

Step 5)  If the firewall does not know packets source and destination address or port number, it passes through the Forward Chain.

Step 6) If the packet does not match with the packet protocol type or, with the source and destination IP address or UDP/TCP port of the interface that is being used, or it's relation with the previous packet, then firewall will either drop the packet or accept the packet.


Types of IP Table:
Filter Table: This table is responsible for deciding whether to accept or drop the packet.

NAT Table: This table is responsible for modifying the packet source and destination address and port when it's access point is unknown. 

Mangle Table: This table is used to alter the IP header, either shortening or lengthening the header size.

Raw Table: This table is used to evaluate the packets with respect to the previous packets functionality.

Security Table: This table is used to set internal SELinux security context marks on packets. Where SELinux security is a kernal modification user space tool to access control security policies.




12 Sept 2017

SYSLog



Syslog or Syslog Sever is an standard System Logging Protocol which works at the transport layer of the OSI model for network devices to send logging messages to a loading server. It collect all the error messages, debugged information, or any alert. It is used for managing and securing network and systems via sending an alert message based on the security level to the admin.

Syslog Server(s) mostly use 3 components for logging:
1) Syslog Listener
2) Database
3) Managing and Filtering Software

Syslog Listener:
It receives the response message which sent over the network over UDP and TCP.

Database:
It is used to store the syslog data when we wish to retrieve it quickly.

Managing and Filtering Software:
It is used to manage the large amount of data to process and filter out the important log messages.


Syslog Message Format:   PRI  HEADER  MSG

PRI: 
or Priority, it indicate the security level based on the level of the message.

HEADER: 
It contain the timestamp when the message was generated with host IP address.

MSG: 
or MESSAGE, where it contain the process name and content of the message.


How Syslog Works:

Step 1: We install Syslog service in our server.

Step 2: Server will communicate with the application services.

Step 3: Server will listen to the tcp and udp communications between the system and the services using Syslog Listener.

Step 4: Logged these communications into it's Database.

Step 5: Check for Message priority levels using Managing and filtering Software.

Step 6: If any security alert found, send an alert message to the admin.




20 Aug 2017

SSL/TLS





Transport Layer Security/ Secure Socket Layer. It works at the application layer which provide a standard security technology for authentication and establishing a secure session using certificates.

How TLS Handshake Works:

Step 1) Client Hello
Step 2) Server Hello
Step 3) Server send message to the client contains Certificates, Server encryption Key, and lastly Server Hello Done.
Step 4) Client responds to the server with encryption key, change cipher spec and Finished Message which contain the integrity check aka SHA Algo.
Step 5) Server sends Change cipher suits and the finished message which contain the integrity check.


How does it actually looks like! We will wireshark for analysis:

Client Hello:

Server Hello:



Server Hello Done:



Client Finished Message:



Server Finished Message:



TLS encryption is done by 3 steps: Key Exchange, Data Encryption and Handshake Integrity. 
Key exchange: Is a method where cryptographic keys are exchange between 2 systems, using a crypt algo like RSA, DH, ECDH.
Data Encryption: In TLS it's called as Ciphers. Eg., 3DES, AES algo(s).
Handshake Integrity: Uses SHA algorithm to provide integrity.

How public and private keys are exchange:

Step 1) Https client connect with the https sever
Step 2) Https server sends a certificate which contains 2 large prime numbers aka Public Keys.
Step 3) Https client choose a Private Key, generate Encryption key using Public Keys sent by https server.
Step 4) Server generate encryption key based on it's private key.
Now both share the same shared key.
Step 5) Now both send encrypted message with their shared secret key.

Certificate Chain:
1) First we need Certificate Authority Server (CA)
2) CA will generate a Root Certificate
3) Root Certificate will generate a Intermediate Certificate
4) We sign that Intermediate Certificate Which matched with the Root Certificate
5) After signed Certificate it will issue a Server Certificate, which contains the Domain name.
6) That Intermediate Certificate in uses by the browser.

When we type "Google.com" in the search bar of the browser and hit enter,
1) Server Sends a Certificate to the browser,
2) Browser will verifies the server certificate issues by the Intermediate Certificate
3) It will then checks whether it contains the "Google.com" domain name or not
4) If matches, it's a secure connection,
5) It it doesn't matches, then connection is not secure. There can be many reasons for error. Like: Expiration of Certificate or Invalid certificate.

Bad TLS Encryption Examples:
1) Browser using TLS version less then 1.2
2) Using 3DES algorithm

For Safe Encryption Examples:
1) TLS version more then 1.2
2) Using ECDHE key exchange algorithm
3) Using AES algo.
4) For message integrity using SHA algo, e.g., SHA1.



19 Aug 2017

SMTP




Simple Mail Transport Protocol. It's a connection oriented text based protocol which works at the application layer of network model that allow message services over TCP connection. It is used for sending messages from a sender to an receiver mail server, in TCP Port 25.

Email Client
It's a computer program designed to read, organised and send electronic messages.
It use POP, IMAP, SMTP protocols for communication.

POP
Post Office Protocol POP is an internet standard that defines an email server and the way to retrieve mail from it. It is used to download mail from the server. And it can not send emails.
It has 3 versions: POP,  POP2 and  POP3. POP3 was designed for authentication purposes. It works by storing messages at a POP server, until the user logs in and download messages into their system.

IMAP
Internet Message Access Protocol which is also used to download mails from the server. It is designed to let us keep emails on the server. But it requires more disk space and cpu resources. Works on port 143.


How SMTP works:
Let us assume:
Host ID : me@sender.com
Host email Server: demo.com
Client Id: client@receiver.com
Client email Server: example.com

Step 1) We send an email from an demo.com host server to sender using their mail address, client@receiver.com.

Step 2) Then our e-mail server take senders mail address demo.com and connects to the SMTP sever.

Step 3) Host Mail server will provide the address information of sender's, receiver's mail address and content of the message to the SMTP server.

Step 4) SMTP server will take client's mail id client@receiver.com and divide it into client's name and the it's domain name.

Step 5) If the receiver have different domain name, SMTP server will send that email message to the POP3 server and then SMTP will communicate with that domain.

Step 6) SMTP server will then communicate with the DNS server to get to the client's mail server. DNS server will then provide the IP address of sender address to the SMTP server.

Step 7) SMTP server at the sender side will connect with the SMTP sever of the receiver server.

Step 8) After the connection has made, SMTP server will differentiate the domain name for client at receiver.com and transmit the message to the receiver's POP3 server and then email will reach to the clients mailbox.

If any trouble occurs between sending senders mail sever and the receiver mail sever, the message goes in sendmail queue. What it does is, it will send mail after some moment of time after troubleshooting the issue. And for some reason it did not works, sendmail queue will return back the message to the sender.



17 Aug 2017

DNS



Domain Name System. It is used to resolve  host name (e.g., www.example.com) to an IP addresses (e.g., 205.60.368.111).

It works at the Application Layer which uses UDP and TCP.
A single UDP for request and get reply between client and server, primarily on port number 53 to serve request.
TCP is used when the response data size is more then 512 bytes or we have to perform Zone transfer.

Example:
Let us suppose, we can enter either  http://27.230.168.43/ or http://example.com/ in browser search bar to get us the results. But using a name instead of their IP is seems more easy way to remember. Here, DNS do that easy job for us.

However, IP address and DNS is not same. Here's why:
IP address is an identifier for a device on a TCP/IP network which is unique for individual device. Whereas, DNS, is to identify that IP address.


How DNS Works: 

1) DNS Query Request 
This is how a DNS Request query look wireshark.



2) DNS query Response 
This is how a DNS Response query look wireshark




1) DNS looks for the the request:
1) Local Machine
2) DNS Cache
3) DNS Server Service

When DNS response are not found locally then, 
1) Root Hints
2) Authoritative and Non Authoritative Response

DNS Cache:
It's recent memory of the DNS lookups that is stored in our system's operating system that it can quickly refer to when it is tying to figure out how to load a website.
This the first step a DNS do when a client issue a request.

Root Hints:
It contains the host information that is needed to resolve the name outside the authoritative DNS domains. It contains the name and the IP addresses of the root DNS servers.

2) Authoritative and Non Authoritative Response:
Authoritative Response are the response we get from the DNS, if the file we are searching for are on the same DNS zone.
Whereas, Non Authoritative Response, is when we get the IP address coming from the global server which is not our own.

Below are the step a DNS follows to get request response.

Step 1: Search Host File
When we issue an request "www.example.com", browser first search it in user system. Basically, it is all stored inside users windows file in their system. If it did not able to find, it'll ask the Router.

Step 2: Search Router
Router has cache to store recent DNS look ups, that our system can quickly refer to when it is trying to figure out how to load a website. If router, did not able to find the request it will ask ISP to look for it.

Step 3: Ask ISP
ISP or Internet Service Provider, look for that request location in it's DNS Cache. If it did not found, ISP will ask the IP to the Root DNS.

Step 4: Ask Root DNS
Root DNS will run a query to look for that request location in it's DNS Cache and if it did not find then, it will then give IP address of TLD to ISP.

Step 5: Ask TLD
Top Level Domain or TLD contains all the top level domains, e.g., .com or .org. It will search for that requested location. If it did not get the result it will IP address of Name server to ISP.

Step 6: Ask Name Server
ISP will then ask Name server, or Google name server for the IP address of the  www.example.com website. Name Server will have the IP location and it will retrieve that result to the ISP.

Step 7: ISP 
After getting the result, ISP will give IP address location to the Router.

Step 8: Router
Router will have the IP and it will give the IP to the browser and now browser will open the website for the user in their system.






15 Aug 2017

HTTP



Hyper Text Transport Protocol, a text based request-response protocol which works at the application layer. It follow certain rules for which a client/browser and a server communicates.

It was designed for transmitting message back and froth between a web client/browser and a web server. When a user issue a URL in the browser, HTTP client (Web browser) then issue an HTTP request (URL - GET/POST) to a HTTP server (Apache Server), which will return a HTTP response (HTML/Text/Audio/Video) back to the HTTP client. Depending upon the request, a response contains the status of the request.


As HTTP is both Request (Header + Body )and Response(Header + Body), this is how HTTP Request (In RED) and Response (In Blue) look in wireshark.



How HTTP Works : 
Step 1) Client issue a request
Step 2) Server response to that request 

Step 1: Client/Browser perform a request:

HTTP request method:
GET Method, URL, protocol version.
It has the HTTP request

HTTP request header:
Content type, length, value.
It has the request

HTTP request body:
It has the message

HTTP Request Raw data:

HTTP Request [
Request-HEADER {
HTTP request method[GET/POST/PUT/DELETE/etc...], URL, protocol version
HOST
etc.
}
Request-BODY {
...
}
]


This is how it looks to the server when client use GET Header for Request:




The HTTP Request body is optional for an HTTP message, if it's available, then it will carry the entire body associate with the request or response which will contain Content Type and Length header a.k.a the actual HTTP request and response data.


HTTP Request Message Body would look like this:



Step 2: Server Response to the request:

Protocol and it's description:

POST Method
It has the HTTP response

HTTP response header:
Content type, length, value
It has the version server machine

HTTP response body:
It has the actual response

HTTP Response raw data:

HTTP Response [
Response-HEADER {
Status 200 OK, etc.
}
Response-BODY {
...
}
]


This is how it looks to the client when server use POST Header for Response:




 Response Body:


Some of the Request and Response Headers:

Request Headers: Accept, Cookie, Date, Host, Content Length, Content Type...

Response Headers: Allow, Connection, Content Encoding, Content Language, Content Type, Data.











13 Aug 2017

TCP/IP Model




TCP/IP is a language or set of rules a system use in order to access the internet. It provide end-to-end connectivity depending upon the message specification like format, addressing, routing with respect to the receiving end.

TCP/IP Model:
1)Application Layer
2)Transport Layer
3) Internet Layer
4) Network Access Layer

Application Layer:
This layer is the combination of Session, Presentation and Application layer of OSI Model. It provide user services for exchanging application messages or data communication. HTTP is a protocol that was designed for transmitting messages back and forth between a web client or browser to a web server. Telnet, it's a protocol/client/server which allow to do TCP connection to any port that we specifies. FTP, is a clear text, a protocol without encryption, it gives us ability to send message back and forth between unix,. we can send message from sender to recipent using SMTP protocol. 
Some of the Protocols it use: HTTP, FTP, SMTP, DHCP, POP, TLS/SSL, Telnet

Example:
This is what application Layer look like in wireshark, containing HTTP Header details.



Transport Layer:
It handle end-to-end delivery using TCP/ UDP. TCP handles connection oriented communications where it guarantees delivery of message and also make sure, somebody on the other end is their to receive it. UDP is connection less communication channel, where it just send the message but not really care about receiver side acknowledgement.

Example:

This is what Transport Layer look like in wireshark.




Internet Layer:
This is same as the Network layer of the OSI model. It provide processing rules, which ensure the data transmission. It does identification, addressing and routing . Protocols uses: IP, ICMP, IGMP.

Example:


This is what Internet Layer look like in wireshark.




Network Access Layer:
This layer is the combination of Physical and Data link layer of OSI Model also called as Link Layer. It handles all the physical connection, error correction and control of physical device. In this layer, we can transmit messages between hosts in a same network and also to other network using tunneling or VPN.

Example:



This is what Network Layer look like in wireshark.




*Groundwork: 
Every piece of communication that goes across the internet is using the TCP/IP protocol suit. When we open a web application, it issue a series of TCP request in order to get all the content on that page to us. All these protocols are interconnected together. Generally, it issue an HTTP request, which gets encapsulated inside TCP which gets encapsulated inside IP, which again encapsulated inside an ethernet and then it sent across the communication channel wire or wireless, till it reach to another networking device and finally to the network provider.

TCP Flags: 
We need Flags in order to identify or to analyse the network traffic in a more efficient way. Here the the 9 types of TCP flags and see how it looks in wireshark :

1) SYN
SYN or Synchronization flag is a first step in establishing a a TCP 3-way Hand-shake between the hosts.


2) ACK
ACK or Acknowledgement flag is used in acknowledging the successful receipt of the packet.



3) FIN
FIN or Finish flag, is generally send from the user side, saying no more data to be send aka last packet.


4) PSH
PSH or Push flag, is used to send data, telling it to process instead of buffering. Similar to URG but may have chances to get avoided or drop of packets.


5) URG
URG or Urgent packet is similar to PSH flag, but for the data to be send over wire with URG flag set, makes TCP to create a separate segment for it. So that, data won't get drop.


6) RST
RST or Reset flag is used to send packet to a specific host, when that host is not accepting it.



7) ECE
 ECE or Explicit Congestion Notification, is an option flag used in tcp connection to notify about the packet drop to both sides, sender as well as to receiver side.

8) CWR 
CWR or Congestion Window Reduced is similar to ECE, used for notification purpose but it is used by sender only.

9) NS
NS or Nonce Sum is used to check and protect against the hidden malicious content in the packet send by sender. It is an experimental flag.



OSI Model





OSI model is a Modular Standard Communication Architecture which has layer approach for communication, where one layer speaks to another layer. 
Each layer adds a header when an message is sent over the network for encapsulation, then each layer goes through process of peeling the header in order to get the message to the other side.

OSI Model Layer Approach:
Application Layer
Presentation Layer
Session Layer
Transport Layer
Network Layer
Data Link Layer
Physical Layer

(aka: All People Seems To Need Data Processing... Easy way to remember)


Application Layer:
In this layer application layer and user communicate directly based on software application. It identifies communication partner, and determine the resource availability in terms of HTTP, FTP, SMTP.

Presentation Layer:
It translate the application layer data to another frame. This layer is responsible to format data in terms of encrypting/decryption and then sent over in XML or JPEG.

Session Layer:
This layer is responsible for session management for encoding and decoding of data to send over. Where it create, specifies, establish, manages, control and terminate the connections. It allow IP between the applications using SSL/TLS or SSH or NetBios.

Transport Layer:
This layer is responsible for reliable end to end data services using ports TCP or UDP. As a message is sent across the network port for communication whether it is connection oriented or connection less.

Network Layer:
It will have packets, where it takes the data and route it back and forth across different network and do re-packaging to cover the gap between the layers. When we do not know about what type of physical connection is being used. It does logical addressing to ensure data reachability.

Data Link Layer:
It sends the data across the network in frames through physical medium. It does physical addressing or MAC Addressing.

Physical Layer
It handles all the physical definition of a data communication using coax, fiber, 4-pair wire where data are sent in raw bits, 0's and 1's.It has NIC and ports, HUBs works in this layer. It also handle error correction and detection on the physical medium.

Ground Work
Suppose we issues a web request, which gets originated at Application Layer for data transmission in HTTP or FTP or SMTP, then at Presentation Layer for data format in JPEG or XML then in Session Layer for encoding or decoding, then in Transport Layer we need to add any TLS communication then we add specific port of source and destination with respect to the mode of communication then in Network Layer we add IP address of the destination then we add ethernet header on top of it and then we sent it off. Each layer adds a header when an message is sent, goes through each layer over the network for encapsulation. When it reaches the other end it will actually repeats this process in reverse order, where each layer goes through the process of peeling the header in order to get the message to the other side.


4 Aug 2017

Networking Basic

                                               


Networking:
" Sharing of information or transmission of data between 2 or more computers connected though a communication channel."
When a computer sends a piece of information to other computer, it sends using a communication medium, physical or wireless.

Physical:  Wire, Ethernet cables, Hubs, Switches, Routers.
Wireless:  Wi-Fi, Bluetooth, cellular data services.

History:
The first internet was designed between one host and one router in the year of 1967. And the year of 1969 they design the network using 4 node which is known as ARPANet. It was designed basically  for defence operation. The earlier protocol they used was NCP(Network Control Protocol). But to give more flexibility to the network they designed different set of NCP protocols called as IPs.

Devices:
Hub: It allow us to connect to computer using ethernet cables.
Switch: It allow to connect many devices to connect in a network.
Router: It's a device where it connect one local computer to another local computer.
Firewall: It's for network security where it monitor and control the network traffic.
Modem: It's device which modulate and demodulate electrical signals coming from cable lines.

Topology:
Topology is a arrangement of network elements via Physical or logically.

Point-to-Point:  Direct link between the two end points.
Bus:  Each node in the network are connected into a cable, where that cable is the centralized connection point.
Star:  Each network host is connected to a central Hub using Point-to-Point connection.
Ring:  It's like a bus topology where it form a ring like structure where data travels around the loop.
Mesh:  It's like ring but every node is connected with every other node in the loop network.
Hybrid: This uses two or more topology connection combine together to form a new connections.

IPv4  and IPv6:

IPv4: It's a Internet Protocol Version 4 which uses packets and switches to form a connection less network . It uses 32 bit addressing scheme divided in 4 octet, where each octet contain 8 bits in binary 0s and 1s.
Ex: 172.20.60.1

IPv6: It's a Internet Protocol Version 6 also uses packets and switches to form a connection but it provide end to end data transmission across the IP network. It's uses 128 bit addressing scheme divided in 8 groups each having 16 bits in hexadecimal values.
Ex: 2001:0db8:0000:0000:0000:ff00:0042:8329

CIDR:
As we know IP addresses consists of two parts, which determines the network and Host, which in tern CIDR define it whole using '/ ' and  "number". Using  '/ '  and  "number"  we can minimize the growth of routing table and can get it's IP address, routing prefix, or subnet mask.
Ex: 192.168.100.0/24, which will have:
IP: 192.168.100.0
Subnet: 255.255.255.0

Routing: 
It's a process of determining a path for data flow across the IP network. For that it uses many schemes like:
Unicast: Transmit message to only one node in a network.
Multicast: Transmit message to group of node who are expecting it to receive in a network.
Broadcast: It transmit message to every node inside the network.
Anycast: Send message to one node in a group of nodes.
Geocast: Transmit messages to a geographical areas.

Cloud:
Sharing of same data across geographical regions.
Service Models:
SaaS:  Software as a Service
PaaS: Platform as a Service
IaaS: Infrastructure as a Service