Skip to content

Instantly share code, notes, and snippets.

@vd89
Created March 21, 2020 12:07
Show Gist options
  • Save vd89/55e732695a9d855424c67f563d3b76a6 to your computer and use it in GitHub Desktop.
Save vd89/55e732695a9d855424c67f563d3b76a6 to your computer and use it in GitHub Desktop.
31. Why are we running out of IPv4 Addresses?
Ans:
it is due to the community's responsible stewardship of these resources that we have been able to provide many thousands of new networks in our service region with /22 allocations after we reached our last /8 in 2012.
32. Can a device have both IPv4 and IPv6 address simultaneously?
Ans:
Yes, they can have both the IPv4 and IPv6
33. IPv4 classification is done on which octet of IPv4 address format ?
Ans:
The IPv4 address is a 32-bit number that uniquely identifies a network interface on a machine. An IPv4 address is typically written in decimal digits, formatted as four 8-bit fields separated by periods. Each 8-bit field represents a byte of the IPv4 address. This form of representing the bytes of an IPv4 address is often referred to as the dotted-decimal format.
34. Class E ​ IP Addresses are currently used for which purpose?
Ans:
This IP Class is reserved for experimental purposes only for R&D or Study. IP addresses in this class ranges from 240.0.0.0 to 255.255.255.254.
35. Which class does this ip address ​ 224.255.255.1​ belongs?
Ans:
It belongs to Class D Address.
36. What are Private IP Addresses and What is their range?
Ans:
Private internal addresses are not routed on the Internet and no traffic cannot be sent to them from the Internet, they only supposed to work within the local network.
Private addresses include IP addresses from the following subnets:
Range from 10.0.0.0 to 10.255.255.255 — a 10.0.0.0 network with a 255.0.0.0 or an /8 (8-bit) mask
Range from 172.16.0.0 to 172.31.255.255 — a 172.16.0.0 network with a 255.240.0.0 (or a 12-bit) mask
A 192.168.0.0 to 192.168.255.255 range, which is a 192.168.0.0 network masked by 255.255.0.0 or /16
A special range 100.64.0.0 to 100.127.255.255 with a 255.192.0.0 or /10 network mask; this subnet is recommended according to rfc6598 for use as an address pool for CGN (Carrier-Grade NAT)
Those are reserved IP addresses. These addresses are intended for use in closed local area networks and the allocation of such addresses is not globally controlled by anyone.
Direct access to the Internet using a private IP address is not possible. In this case, the connection to the Internet is via NAT (network address translation replaces the private IP address with a public one). Private IP addresses within the same local network must be unique and cannot be repeated.
37. Given an IP Address can I differentiate between Public and Private IP Address?
Ans:
Private IP address : Scope is Local , it works only in LAN, Range:
10.0.0.0 – 10.255.255.255,
172.16.0.0 – 172.31.255.255,
192.168.0.0 – 192.168.255.255
Public IP Address : Scope is global, It is used to get internet service, Range:
Besides private IP addresses, rest are public.
38. Define Port? What does Port Number represents?
Ans:
A port number is the logical address of each application or process that uses a network or the Internet to communicate. A port number uniquely identifies a network-based application on a computer. Each application/program is allocated a 16-bit integer port number. This number is assigned automatically by the OS, manually by the user or is set as a default for some popular applications.
39. Port numbers used by HTTP, FTP, HTTPS, SMTP are ?
Ans:
80,8080 are assigned to HTTP
443 is assigned to HTTPS
20,21 are assigned to FTP
164 is assigned to SMTP
40. What is a web server and client ? Command used to start simple python HTTP server in Linux?
Ans:
A web server is a piece of software designed to serve web pages/web sites/web services. ... A web client is an application that communicates with a web server, using Hypertext Transfer Protocol (HTTP). Hypertext Transfer Protocol is the protocol behind the World Wide Web.
Command :$ python -m SimpleHTTPServer
41. What is the difference between URI , URL, URN ?
Ans:
The main difference between URI and URL is that every URL is a URI but not vice versa. Similarly, every URN is a URI, but the opposite is not true. Another difference between URI and URL is that URL includes the protocol, which is key to retrieving information from any location. Here are few differences between URI, URL and URN in point format:
1) Every URL and URN is URI because URI is the superset of both URL and URN.
2) URL includes protocol e.g. http://, ftp:// along with location to identify resource e.g. http://www.blogspot.com/abc.html.
3) URN are the unambiguous way to identify a resource. ISBN numbers are best examples of URN.
42. What are Server side programming languages ? Name few server side programming languages ?
Ans:
The server-side code has full access to the server operating system and the developer can choose what programming language (and specific version) they wish to use.
The Programming languages for server-side programming are :
PHP, Javascript, C++, Java and JSP, Python, Ruby on Rails
43. Can JavaScript be considered as a client side programming language ?
Ans:
Yes, It Can be considered as a client side programming language.
44. What does DNS server consists of and what is the importance of it ? Define Root Servers?
Ans:
DNS is a large network of servers located across the globe that contain a distributed database of domain names and IP addresses. Often referred to as the Internet's address book, DNS connects domain names to IP addresses. ... Your browser can then contact the right server and retrieve the website and its content
A root name server (also called a DNS root server or a root server for short) is responsible for fundamental functions when it comes to translating domain names into IP addresses: it answers client requests in the domain name system’s root zone (the root zone marks the largest layer in the DNS’ name space). Here, the root name server doesn’t execute the name resolution itself and instead informs the requesting client about which other name server (DNS server) it can obtain further information from regarding the desired IP address.
45. What is DNS spoofing ?
Ans:
Domain Name Server (DNS) spoofing (a.k.a. DNS cache poisoning) is an attack in which altered DNS records are used to redirect online traffic to a fraudulent website that resembles its intended destination.
Once there, users are prompted to login into (what they believe to be) their account, giving the perpetrator the opportunity to steal their access credentials and other types of sensitive information. Furthermore, the malicious website is often used to install worms or viruses on a user’s computer, giving the perpetrator long-term access to it and the data it stores.
46. What are Status Codes in HTTP? What are HTTP Request Methods? HTTP Status Codes 200, 400 , 502 and 201 for ?
Ans:
HTTP response status codes indicate whether a specific HTTP request has been successfully completed. Responses are grouped in five classes:
Informational responses (100–199),
Successful responses (200–299),
Redirects (300–399),
Client errors (400–499),
and Server errors (500–599).
HTTP defines a set of request methods to indicate the desired action to be performed for a given resource. Although they can also be nouns, these request methods are sometimes referred to as HTTP verbs. Each of them implements a different semantic, but some common features are shared by a group of them: e.g. a request method can be safe, idempotent, or cacheable.
GET : The GET method requests a representation of the specified resource. Requests using GET should only retrieve data.
HEAD: The HEAD method asks for a response identical to that of a GET request, but without the response body.
POST: The POST method is used to submit an entity to the specified resource, often causing a change in state or side effects on the server.
PUT: The PUT method replaces all current representations of the target resource with the request payload.
DELETE: The DELETE method deletes the specified resource.
CONNECT: The CONNECT method establishes a tunnel to the server identified by the target resource.
OPTIONS: The OPTIONS method is used to describe the communication options for the target resource.
TRACE: The TRACE method performs a message loop-back test along the path to the target resource.
PATCH: The PATCH method is used to apply partial modifications to a resource.
47. What is the role of Model , View and Controller in MVC architecture?Role of Client and Server in Client Server Architecture?
Ans:
Model: Model represents shape of the data and business logic. It maintains the data of the application. Model objects retrieve and store model state in a database. : Model is a data and business logic.
View: View is a user interface. View display data using model to the user and also enables them to modify the data.
View is a User Interface.
Controller: Controller handles the user request. Typically, user interact with View, which in-turn raises appropriate URL request, this request will be handled by a controller. The controller renders the appropriate view with the model data as a response.
Controller is a request handler.
Client/server architecture is a computing model in which the server hosts, delivers and manages most of the resources and services to be consumed by the client. This type of architecture has one or more client computers connected to a central server over a network or internet connection.
48. What is a Compiler, How is JavaScript code executed Using Compiler or interpreter??
Ans:
The source code is passed through a program called a compiler, which translates it into bytecode that the machine understands and can execute. In contrast, JavaScript has no compilation step. Instead, an interpreter in the browser reads over the JavaScript code, interprets each line, and runs it.
49. What is a JIT (Just In Time compilers), what is their role in the modern day web Browsers?
Ans:
A just-in-time (JIT) compiler is a program that turns bytecode into instructions that can be sent directly to a computer's processor (CPU). ... JIT compilers contrast different compiler types such as a traditional compiler, which will compile all code to a machine language before a program starts to run.
50. What is the purpose of VPN ? How are VPN and Firewalls Related?
Ans:
A VPN, or Virtual Private Network, allows you to create a secure connection to another network over the Internet. VPNs can be used to access region-restricted websites, shield your browsing activity from prying eyes on public Wi-Fi, and more.
Relationship Between VPN and Firewalls. Being a specially programmed router, firewall usually gets connected with two or more physical network. ... The VPN mainly provides well controlled connectivity while using a public network which can be the Internet. The IP tunnel is the main concept on which the VPN is based.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment