Skip to main content

Commands used in Dockefile - Part4

  Docker is an opensource tool used for virtualization and deliver software in the form of packages called Containers. It is one of the most important tools used in networking domain.  Dockerfile  is a template for building the image which contains commands needed to package the software. In this post, I am going to explain the commands ADD & COPY used in  Dockerfile .   ADD Command:   ADD command is used to copy files, directories or files from remote URLS to destination path in the image. The source paths can contain wildcards.   If the destination has relative path, it is relative to the Working directory of the image. Note that source path is always relative to the Docker build context.   ADD command will not support authentication. So, if there are any protected files to be added in  Dockerfile  building, use other tools like curl or  wget   Dockerfile  copying Single & Multiple files, directory using ADD inst...

IP Address and its types Explained

IP stands for Internet Protocol. An IP address is used as a label for device connected to network that uses IP for communication. This IP address is used for communicating to a particular device in the network. IP address space is managed by Internet Assigned Numbers Authority (IANA) at the global level. 
Generally, an IP address is made of 4 digits which are in the range of 0-255. These four numbers are separated by a dot. IP addresses are of two types. They are static IP addresses and dynamic IP addresses. 

Static IP addresses: 
Static IP addresses are the addresses that never changes except when there is a need for change as part of the network administration. It provides a simple and reliable way of communication. Using static IP address of a system, one can get the following details about a particular computer: 
  • Continent, Country, and Region 
  • Internet Service Provider Serving the computer 
  • Latitude and Longitude 
  • Locale of the computer 
You can find all these details of your IP address here. 

Dynamic IP addresses: 
Dynamic IP addresses are temporary IP addresses. These are assigned to the computer each time when they get connected to the internet. These are borrowed from a pool of IP addresses and shared across computers. ISP reserves portion of IP addresses to share among its subscribers. Dynamic IP addresses are more secure than static IP addresses which are easier to track.

Versions of IP Address: 
At present, there are two versions of IP addresses namely IPV4(Version4) and IPV6(Version6). 

IPV6: 
IPV6 is a version of IP that is recently emerged as a result of shortage of IPV4 address space. This is developed by the Internet Engineering Task Force (IETF) for replacing IPV4. This version uses 128-bit addresses. IPV6 address is represented using 8 groups of four hexadecimal digits and groups are separated using colons. A sample IPV6 address will be like 2019:0ac8:0001:0041:0020:8d2b:0379:7652.  

Features of IPV6: 
IPV6 has the following features: 
  • When compared with IPV4, IPV6 has better end-to-end connectivity 
  • IPV6 is faster in routing 
  • It is easy for administration in IPV6 
  • IPV6 is more secure in the network as well as applications 
  • Has support for multicast and anycast ability 
  • Has better mobility features 
  • By following the design guidelines of IPV4, there is smooth transition between IPV4 and IPV6 
IPV4: 
IPV4 which is defined in 1981 uses 32-bit IP addresses. IPV4 provides 232 unique IP addresses. IPV4 is represented using four 8-bit fields separated by dots. IPV4 representation is known as the dotted-decimal format. It has two parts namely Network part and the Host part. 
  1. Network Part: It specifies the unique number of the network. It takes 2-bytes of the IP address and useful in finding the class of the network 
  2. Host Part: It is the part of the IPV4 address that uniquely identifies the machine in your network. For all the hosts on a given network, the network part remains the same and the host part keeps changing 
Classes of IPV4 addresses: 
IPV4 addresses are classified into 5 classes which are identified using the first octet of the address. They are: 
  1. Class A 
  2. Class B 
  3. Class C 
  4. Class D 
  5. Class E 
Class A IP address: 
In class A IP address, the first bit of the first octet will be zero. Then the first octet range is 1-127. Class A IP address will be between 1.x.x.x to 126.x.x.x.  The range of IP addresses 127.x.x.x is allocated to loopback IP addresses. The default subnet mask of these IP address will be 255.0.0.0. Class A has 127 networks (27 - 2) and 224 – 2 hosts. The format of Class A IP address will be 0NNNNNNN.HHHHHHHH. HHHHHHHH. HHHHHHHH. Class A IP addresses are assigned to networks that contain a large number of hosts.

Class B IP Addresses: 
The first two bits of the first octet of the class B IP address is set to 10. The range of class B IP addresses is between 128.0.x.x and 191.255.x.x. Default subnet mask of class B is 255.255.0.0. Class B has 214 networks and 216-2 hosts. The format of Class B IP address is 10NNNNNN.NNNNNNNN. HHHHHHHH. HHHHHHHH. Class B IP addresses are assigned to large scale and medium scale networks.

Class C IP Addresses: 
The first three bits of the first octet of the class C IP address is set to 110. The range of class C IP addresses is between 192.0.x.x and 223.255.255.x. Default subnet mask of class C is 255.255.255.0. Class C has 221 networks and 28-2 hosts. The format of Class C IP address is 110NNNNN.NNNNNNNN.NNNNNNNN. HHHHHHHH. Class C IP addresses are assigned to large scale and small sized networks.

Class D IP Addresses: 
The first four bits of the first octet of the class D IP address are set to 1110. The range of class D IP addresses is between 224.0.x.x and 239.255.255.x. These class of addresses is used for Multicasting. As multicasting is intended for many hosts, there is no need for extraction of the host address from class D IP address. Also, Class D does not have a subnet mask at all.

Class E IP Addresses: 
The first four bits of the first octet of the class E IP address is set to 1111. The range of class E IP addresses is between 224.0.0.0 and 255.255.255.254. Class E IP Addresses also does not have a subnet mask. These IP Addresses are used for experimental and R&D purposes.

Special IP addresses: 
There are some IP Addresses allocated for some special purposes. They are: 
  • 169.254.0.0 to 169.254.0.16 used to assign a link-local IPV4 address when a host fails to dynamically acquire an address
  • 127.0.0.0 to 127.0.0.8 is used for the loopback addresses
  • 0.0.0.0 to 0.0.0.8 is used to communicate within the same network and serves as default static route
Rules while Assigning Host Part: 
Host part in an IP address which is used to identify hosts are based on the following rules: 
  • The host part of any host should be unique in a given network
  • All the bits of the host part cannot be set to 0 as it represents the network part of the IP address 
  • Also, all the bits of host part cannot be 1 as it serves the purpose of broadcast address that is used in sending the packet to all hosts of that network
Rules while Assigning Network Part: 
Hosts on the same physical network will have the same network part. So, hosts on the same physical network are identified using Network Part. Network part is based on the following rules: 
  • Network Part cannot start with 127 as it is used for loopback addresses 
  • All the bits of network part cannot be set to zero as it denotes an IP broadcast address 
  • Also, all the bits of network part cannot be set to one as it denotes a specific host on the local network 

Comments

Popular posts from this blog

Commands used in Dockefile - Part4

  Docker is an opensource tool used for virtualization and deliver software in the form of packages called Containers. It is one of the most important tools used in networking domain.  Dockerfile  is a template for building the image which contains commands needed to package the software. In this post, I am going to explain the commands ADD & COPY used in  Dockerfile .   ADD Command:   ADD command is used to copy files, directories or files from remote URLS to destination path in the image. The source paths can contain wildcards.   If the destination has relative path, it is relative to the Working directory of the image. Note that source path is always relative to the Docker build context.   ADD command will not support authentication. So, if there are any protected files to be added in  Dockerfile  building, use other tools like curl or  wget   Dockerfile  copying Single & Multiple files, directory using ADD inst...

Commands used in Dockerfile - Part3

  Docker is an opensource tool used for virtualization and deliver software in the form of packages called Containers. It is one of the most important tools used in networking domain.  Dockerfile  is a template for building the image which contains commands needed to package the software. In this post, I am going to explain the commands WORKDIR & HEALTHCHECK used in  Dockerfile .   WORKDIR Command:   WORKDIR command is used to set the directory of the image on which the commands like RUN, COPY, ADD, ENTRYPOINT, CMD operates.   The command usage is WORKDIR < Path_To_Dir >. If the directory not exists, it will be created. If the relative path is given to WORKDIR, that path will be relative to the previous WORKDIR command’s path.    In Ubuntu, by default the WORKDIR will be  / . Please find the below sample  Dockerfile  to get clear picture of WORKDIR command:   FROM  ubuntu: 16.04   WORKDIR  /root ...

Vyos - An Open Source Network Operating System

What is  a  Network Operating System?   Networking Operating System (NOS) is an O perating system  that  has the capability to  support workstations, database sharing, application sharing, file ,  and printer access sharing among multiple computers in a network. In general ,  NOS is a specialized operating system used for devices like router, switch or firewall. Features of Networking Operating System:   NOS has the following features: Basic features like protocol support, processor support, hardware detection and multiprocessing support for applications Authentication, access control, authorization ,  and restriction facilities are supported to provide security Provides file service, web service, printing and replication Has Naming and Directory Management services Has  the provision  for user management and remote access & system management Also has internetworking features like routing and ...