Network Configuration in Ubuntu

Hi, How are you !! Hope you doing good....
I got introduced to Cloud initially. As I went ahead learning what is cloud and how it works, then got to know a field which is DevOps that makes Cloud model more effective.
So, as I started working & got good experience on AWS. I have been learning the DevOps tool and technologies on how to use it with the Cloud, which will give me good understanding on how Cloud and DevOps go hand in hand to deploy my applications.
Last Blog Review →
In the last blog we understood, what is GNuPG key, how to make the public key accessible and how to create and use a GNuPG key.
Local DNS Resolution
The local dns resolution of Linux OS, is stored in “/etc/hosts”. Because it contains list of hosts that are to be resolved locally.
Example of such file
1.2.3.4 your-node-name.your-domain-name localhost.localdomain localhost
X.X.X.X node-name
Directory for DNS Servers for domain name resolution
The file in which the directory for DNS Servers for domain name resolution is “/etc/resolv.conf”
Example
nameserver 1.1.1.1 # IP address of the primary name server
nameserver 1.2.1.3 # IP address of the secondary name server
Inorder to query a domain “A” record
dig your-domain-name +short
Manipulating Routes
Displaying Route
route # Displays or lists routes and resolve hosts names
route -n # Displays or lists routes without resolving hosts name for faster result
Add or Delete route
add or delete = It will add or delete a route
Ex. add route
route add -host 1.1.1.1 eth1Ex. Delete route
route del -net 1.1.1.1/1-host x.x.x.x = Add route to a single host identified by IP address
-net x.x.x.x = Add route to a network identified by network address
Ex.
route add -net 2.2.2.0 netmask 255.255.255.0 eth0gw x.x.x.x = specify the network address
Ex.
route add default gw 1.1.1.1 eth1netmask x.x.x.x = specify the network netmask
default = add’s a default route
Conclusion →
In the this blog we understood, where we can have fun with local dns resolution, and Directory for DNS Server for name resolution, also we checked how to display route on the NIC cards of the Linux machine.




