In Ubuntu, all the IP Address is store on /etc/network/interfaces file. So, i have to open this file by using vi to add the Static IP to this file.
Here are steps
1.
sudo vi /etc/network/interfaces
2.
auto eth0
iface eth0 inet dhcp
this 2 statement show that your Ubuntu server was in DHCP. Enter the following statement to set the IP Address
auto eth0
iface eth0 inet static
address 192.168.1.101
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
after save it. You should able to use the IP address already.
Here are steps
1.
sudo vi /etc/network/interfaces
2.
auto eth0
iface eth0 inet dhcp
this 2 statement show that your Ubuntu server was in DHCP. Enter the following statement to set the IP Address
auto eth0
iface eth0 inet static
address 192.168.1.101
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
after save it. You should able to use the IP address already.
Comments
Post a Comment