UnderHost Networks Ltd


If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.



Reply
  #1 (permalink)  
Old 10-07-2009, 07:51 AM
UnderHost's Avatar
UnderHost Management
 
Join Date: Jul 2008
Posts: 502
Default Debian IP Configuration

The IP configurations on the Debian distribution of the Linux operating system are stored in the file /etc/network/interfaces. Below is a sample that will configure the device eth0 to have an IP address of 192.168.1.42 on a class C network with 192.168.1.1 as the default gateway.
Code:
/etc/network/interfaces:
# /etc/network/interfaces – configuration file for ifup(8), ifdown(8) # the loopback interface auto lo iface lo inet loopback auto eth0 iface eth0 inet static
address 192.168.1.42 netmask 255.255.255.0 broadcast 192.168.1.255 gateway 192.168.1.1
In order to assign multiple IP addresses on the same interface (eth0), add the following stanza (incrementing the subinterface name as necessary). The below example will add three more IP addresses to the same interface:
Code:
auto eth0:0
              iface eth0:0 inet static
address 192.168.1.41 netmask 255.255.255.0 broadcast 192.168.1.255
auto eth0:1 iface eth0:1 inet static
address 192.168.1.44 netmask 255.255.255.0 broadcast 192.168.1.255
auto eth0:2 iface eth0:2 inet static
address 192.168.1.45 netmask 255.255.255.0 broadcast 192.168.1.255
To update your system’s IP configuration after making changes to /etc/network/interface, execute
Code:
# /etc/init.d/networking                 restart
Make sure to double-check your configuration as this could leave your server unreachable.
__________________

•
UnderHost • Providing Affordable and Quality Web Hosting & Offshore Hosting
• 24/7 Fast Support / 99.9% Uptime Guarantee
• UHVPS • Virtual Private Servers & Premium Offshore VPS
• Hong Kong - Singapore - USA - Canada - Netherlands - United Kingdom - Germany •
Reply With Quote
underhost.us
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Loading...


All times are GMT -4. The time now is 01:02 AM.
Copyright © 2009 UnderHost Networks Ltd