How to setting ip on ubuntu server 10.10 |
And now i ll share How to setting ip on ubuntu server 10.10 simply.
Check this out :
1. We need to know what the network interfaces name on ubuntu.And to see interfaces name, Run this script :
ifconfig -a
eth0 Link encap:Ethernet HWaddr 18:a9:05:df:62:d6
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:17
2. Ok, now we know what is interfaces name and 4 next step edit file /etc/network/interfaces with :
sudo nano /etc/network/interfacesWe have 2 choice available,
1. We face choice with static IP address :
If U want your Ubuntu has static IP address, you need to add this scripts bellow :
auto eth0
iface eth0 inet static
address 10.1.1.250
netmask 255.255.255.0
gateway 10.1.1.210
2. We face choice IP address with DHCP:
If U want your Ubuntu has dynamic IP address or you make DHCP on your network area, you need to add this scripts bellow :
auto eth03. Do not forget to save the document with Ctl+X and press Y to save the document and then restart network with :
iface eth0 inet dhcp
sudo /etc/init.d/networking restart4. Done! check your ip address with
ifconfig