How to configure IP addressing on ubuntu

Normally the DHCP protocol will take care of the settings for you. If you need to configure our card manually then you need to do the following:

File to use:

/etc/network/inferaces – card network configuration settings

/etc/resolve.conf – (DNS server is configured)

Useful software:

bridge-utils – used for bridging multiple inferfaces

ethtool – a program that display and changes Ethenert Card settings such as auto-negatiation, port speed ,duplex mode, and Wake-on-LAN.

The example show as network configuration.

#The primary network inferface

auto eth0

iface eth0 inet static #use ‘auto’ for DCHP

address 192.168.0.2

netmask 255.255.255.0

gateway 192.168.0.1 #this might your router at home or 192.168.1.1 is a common configuration used

once this is done.

Before making the next step make sure that you have console access in case you mis configured your network card.

You need to reset reset the card ifdown eth0 && ifup eth0 – runs second command only if the first was successful.

DNS configuration:

In many Linux distributions the /etc/resolve.conf is still used. Ubuntu team has taken it a bit forward and automate /etc/resolve.conf generation.

To amend an auto-generated list of DNS add the dns configuration to your /etc/network/interfaces configuration by adding the following entry

dns-serach yourdomain.com (This might be useful if you server is added to domain)

dns-nameservers 8.8.8.8 8.8.4.4 #there is space between both addresses.

Some more detailed info can be found here:

https://help.ubuntu.com/lts/serverguide/network-configuration.html

Any questions please ask ?

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s