Saturday, January 7, 2012

Configure Network Debian

Those who work in redhat flavour will find setting network in debian a bit tricky. Here is the simple and correct way of doing it.

Open the file: /etc/network/interfaces. This is the file where we can add single or muliple ips. I will show examples of how to do both and also to set via DHCP.

Setup interface to dhcp
auto eth0
iface eth0 inet dhcp

To add single IP
auto eth0
iface eth0 inet static
address 192.168.1.5
netmask 255.255.255.0
gateway 192.168.1.254

To add multiple ips
auto eth0 eth0:1 eth0:2 eth0:3 eth0:4
iface eth0 inet static
    address 74.120.246.194
        netmask 255.255.255.192
        gateway 74.120.246.193
iface eth0:1 inet static
        address 74.120.246.195
        netmask 255.255.255.192
        gateway 74.120.246.193
iface eth0:2 inet static
        address 74.120.246.196
        netmask 255.255.255.192
        gateway 74.120.246.193
iface eth0:3 inet static
        address 74.120.246.197
        netmask 255.255.255.192
        gateway 74.120.246.193
iface eth0:4 inet static
        address 74.120.246.198
        netmask 255.255.255.192
        gateway 74.120.246.193




0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Affiliate Network Reviews