LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Inquiries about eht0 and eht0:1 (https://www.linuxquestions.org/questions/linux-newbie-8/inquiries-about-eht0-and-eht0-1-a-603145/)

thok 11-28-2007 09:36 PM

Inquiries about eht0 and eht0:1
 
Preface:

my /etc/sysconfig/network-scripts/eht0 is :

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=209.67.213.242
NETMASK=255.255.255.248
GATEWAY=209.67.213.241
i wanted to add an ip to my linux server and i completely replicated the above file by the name of eth0:1 and only changed the

IPADDR=209.67.213.242

I have these questions:

  1. What are ONBOOT and BOOTPROTO ?
  2. And do I need to include them in eth0:1 ?
  3. And is this a problem if i have started configuring new ip from eth0:1 and not from eth0:0?

dkm999 11-28-2007 10:57 PM

To answer your questions specifically:

1a. ONBOOT determines whether the interface is started when the system comes up (not strictly onBoot, but rather when you or your scripts say "network start"); the answers are "yes" or "no".

1b. BOOTPROTO determines how the interface acquires its IP address when it comes up. The choices are "static", "bootp", or "dhcp". The only two that are actually used much these days are "static", which means that you put the IP address in the config file, and "dhcp", which means that the IP address is handed out by a DHCP server somewhere on your network. That is handy for laptops and other machines that can't or won't handle fixed IP addresses.

2. If you want the virtual interface to come up and have an IP address, you need to include these parameters in the ifcfg-eth0:1 file.

3. You are allowed to name the virtual interface with any number after the colon.

There remains the question of why you want to do what you describe in the first place. If your ISP is supplying you with several IP addresses, it could be reasonable to try to set up your system to respond to them all. But if you are trying to overlay a (private) network on the same wires that face the public network, this is a *bad idea*. It would be much better to buy a second ethernet interface for your server, and keep the private network separate from the public Internet.

thok 11-29-2007 05:12 AM

no actually this is a web server and so it will be a public network. I need to setup multiple ips address on the webserver.


All times are GMT -5. The time now is 10:23 PM.