JAVA SCRIPT

COMPUTER NETWORK BASICS


NETWORK:

Networking is interconnection of  hosts and network devices (Router, Switch, Printer, hub, bridge) which can send and receive data..

A system which is connected to the network is ready for communication . Ex: Internet


IPADDRESS:

An IP address is a unique address that identifies a device on the internet or a local network. IP stands for "Internet Protocol," which is the set of rules governing the format of data sent via the internet or local network.

To identify each device in the world-wide-web, the Internet Assigned Numbers Authority (IANA) assigns an IPV4 (Version 4) address as a unique identifier to each device on the Internet. 

What is IPv4?

IPv4 is an IP version widely used to identify devices on a network using an addressing system. It was the first version of IP deployed for production in the ARPANET in 1983. It uses a 32-bit address scheme to store 2^32 addresses which is more than 4 billion addresses. It is considered the primary Internet Protocol and carries 94% of Internet traffic.


What is IPv6?

IPv6 is the most recent version of the Internet Protocol. This new IP address version is being deployed to fulfill the need for more Internet addresses. It was aimed to resolve issues that are associated with IPv4. With 128-bit address space, it allows 340 undecillion unique address space. IPv6 is also called IPng (Internet Protocol next generation).

Internet Engineer Taskforce initiated it in early 1994. The design and development of that suite are now called IPv6.


KEY DIFFERENCE

  • IPv4 is 32-Bit IP address whereas IPv6 is a 128-Bit IP address.
  • IPv4 is a numeric addressing method whereas IPv6 is an alphanumeric addressing method.
  • IPv4 binary bits are separated by a dot(.) whereas IPv6 binary bits are separated by a colon(:).
  • IPv4 offers 12 header fields whereas IPv6 offers 8 header fields.
  • IPv4 supports broadcast whereas IPv6 doesn’t support broadcast.


MAC ADRESS:

A MAC address is a hardware identification number that uniquely identifies each device on a network. The MAC address is manufactured into every network card, such as an Ethernet card or Wi-Fi card, and therefore cannot be changed.
Both Mac Address and IP address are used to uniquely define a device on the internet. NIC Card’s Manufacturer provides the MAC Address, on the other hand, Internet Service Provider provides IP Address. 

Port: 

A port can be referred to as a logical channel through which data can be sent/received to an application. Any host may have multiple applications running, and each of these applications is identified using the port number on which they are running. 

OSI Model:  Open systems interconnection
These protocols are simply a combination of the rules which regulate each communication over the network.
 These, in turn, decide the path to be followed for communication between the source and destination or the internet.

Application layer
Presentation
Segment layer
Transport
Network layer
Data layer 
Physical  layer

PS: Remember using "Please do not throw sausage pizza away"

TCP/IP MODEL :


TCP/IP Reference Model is a four-layered suite of communication protocols. 

Overall, these four layers take the responsibility of the communication process and end to end delivery of data, voice, packets over the internet on inter and intra network.

The four layers in the TCP/IP protocol suite are −


Application Layer − This is the topmost layer and defines the interface of host programs with the transport layer services. This layer includes all high-level protocols like Telnet, DNS, HTTP, FTP, SMTP, etc.


Transport Layer − It is responsible for error-free end-to-end delivery of data. The protocols defined here are Transmission Control Protocol (TCP) and User Datagram Protocol (UDP).


Internet Layer −It defines the protocols for logical transmission of data over the network. The main protocol in this layer is Internet Protocol (IP) and it is supported by the protocols ICMP, IGMP, RARP, and ARP.


Network Layer −It is the lowest layer that is concerned with the physical transmission of data. TCP/IP does not specifically define any protocol here but supports all the standard protocols.



TCP/UDP:


TCP

The transmission control protocol is connection-oriented as it first set-ups the connection between two hosts and then starts the communication process. It is used for a secure mode of communication processes as it offers secure communication by using a 3-way handshake process.

It ensures the sequential and correct delivery of data from the sender to the receiver. If any error has occurred in sending the data, then the receiver will intimate the source that the data sent was incorrect, and then the source will re-transmit the data until the acknowledgment of proper delivery of data is received by him. EX: https, ftp, smtp

 

UDP

the user datagram protocol is a connection-less protocol as no proper connection is established between host A and host B to start the communication. The hosts are just two end devices of any processes which are initiating communication.

The host A will keep transmitting the data and the host B will receive it without being the concern of the sequential and error-free delivery of data.

Thus this is an un-reliable protocol and is used where secure data transmission is not important but faster communication is required like in streaming video and playing games online. ex: dhcp, dns, tftp


PUBLIC/PRIVATE IP ADDRESS :


Public address

A public IP address is an IP address that can be accessed directly over the internet and is assigned to your network router by your internet service provider (ISP). Your personal device also has a private IP that remains hidden when you connect to the internet through your router’s public IP.

Using a public IP address to connect to the internet is like using a P.O. box for your snail mail, rather than giving out your home address. It’s a little bit safer, but a lot more visible.


Private address

Your private IP address exists within specific private IP address ranges reserved by the Internet Assigned Numbers Authority (IANA) and should never appear on the internet. 

Used for communicating within your private network, with other devices in your home or office


Subnet :


Ip address has two parts network address and host address.

IP subnetting is a method for dividing a single, physical network into smaller subnetworks, or subnets for short. 

 This is accomplished by manipulating the 32-bits available in an IPv4 address, which can be divided into two parts: a network ID and a host ID. 


What is a subnet mask?

A subnet mask defines which chunk of an IP address is the host ID and which portion is the subnet network ID. This trick is accomplished using a subnet mask, another 32-bit number. A subnet mask works like a filter with the mask identifying the IP address bits that represent the network ID with a 1, and the bits that represent the host ID with a 0. The more host bits you have, the more devices that can connect to your subnet at the expense of the total number of sub networks you can set up, and visa-versa. The subnet mask is always a string of ones on the left followed by a string of zeroes on the right.      

Class A -   255.0.0.0                    -  0 to 127 Range

Class B -  255.255.0.0              -  127 to 191 Range

Class C -   255.255.255.0         - 192 to 223 Range


Why subnet?

To more efficiently allocate a limited IP addresses from a limited range.

To improve network performance. Running lots of network devices on the same subnet can gum up the works, especially if there’s a lot of broadcast traffic.

To make IP networks more secure and easier to manage. Creating multiple networks partitions allows you to confine traffic and network breaches or virus outbreaks.

suppose an IP packet is addressed to the IP address 192.0.2.15. This IP address is a Class C network, so the network is identified by "192.0.2" (or to be technically precise, 192.0.2.0/24). Network routers forward the packet to a host on the network indicated by "192.0.2."

Once the packet arrives at that network, a router within the network consults its routing table. It does some binary mathematics using its subnet mask of 255.255.255.0, sees the device address "15" (the rest of the IP address indicates the network), and calculates which subnet the packet should go to. It forwards the packet to the router/switch responsible for delivering packets within that subnet, and the packet arrives at IP address 192.0.2.15    


SUPERNETTING/CIDR  
vlsm(variable length subnet mask

Classless Interdomain Routing (CIDR) was introduced in order to improve both address space utilization and routing scalability in the Internet. It was needed because of the rapid growth of the Internet and growth of the IP routing tables held in the Internet routers.

The idea is that you can add a specification in the IP address itself as to the number of significant bits that make up the routing or networking portion.

For example, we could express the idea that the IP address 192.168.0.15 is associated with the netmask 255.255.255.0 by using the CIDR notation of 192.168.0.15/24. This means that the first 24 bits of the IP address given are considered significant for the network routing.



VPN

These days, the quickest way to ensure your IP address is safely hidden online is to connect with a VPN.The best way to protect your real IP address is to use a  VPN, which routes all your online traffic through a separate server nowhere near your actual location.


ICMP

ICMP is an Internet Control Message Protocol. It provides messaging and communication for protocols within the TCP/IP stack. This is also the protocol that manages error messages that are used by network tools such as PING.


PING

Ping is a utility program that allows you to check connectivity between network devices on the network. You can ping a device by using its IP address or device name, such as a computer name.


CLIENT/SERVER

Client/server is a type of network wherein one or more computers act as servers. Servers provide a centralized repository of resources such as printers and files. Clients refer to a workstation that accesses the server.


No comments:

Post a Comment