

Setting Static IP, DNS and Gateway Address in UbuntuĪs we know network interfaces in Ubuntu 18.04 are configured via NetPlan using YAML configuration files stored under /etc/netplan directory with a. When you no longer need the interface configuration you can purge all configuration from an interface using following command. # ip route # ip route add default via # ip route # ip route del default via # ip route showįlush IP settings from an interface using ip command Run the following commands to add and delete default gateway address. To verify your default gateway configuration run the following command: # ip route show We can configure/modify the default gateway in order to to match our network requirements. # ip a s | grep # ip link set dev eth1 # ip a s | grep # ip link set dev eth1 # ip a s | grep eth1Ĭonfigure a default gateway using ip command The ip command can be used to set the interface link up or down as well. Set the interface link up or down using ip command # ip a s | grep # ip addr del 172.62.62.200/24 dev # ip a s | grep eth1 You can remove or delete ip address assignment from an interface using ip command. # ip a s | grep # ip addr add 172.62.62.200/24 dev # ip a s | grep eth1ĭeletion of an IP Address using ip command The changes made with ip command will be immediately effective, however they will not be persistent and will be lost after a reboot operation. We can set temporary IP address to any interface using ip command. Temporary IP Address setting using ip command Ifconfig command only shows enabled interfaces whereas ip command shows all the interfaces whether enabled or disabled. Earlier configuration file /etc/network/interfaces used to use to configure network interfaces in Ubuntu. Netplan is based on YAML based configurations. Netplan is the tool to configure Network interfaces on Ubuntu systems starting from Ubuntu 17.10. In this article I am going to demonstrate the step by step procedure to configure Network interfaces, DNS and gateway settings on Linux operating systems. Linux operating system has a very strong set of networking instruments to provide and manage routing, bridging, virtual networks and monitoring.

Networks can be as small as two computers connected at your home and as large as in a large company or connected systems worldwide known as Internet. Networking is an essential part as we start learning about any operating system.
