How to activate IP#s in Linux ?

How to activate IP#s in Linux ?

Post by root » Wed, 31 Dec 1997 04:00:00



In Solaris it is a simple addition to the /etc/ifconfig file:

ifconfig le0:2 208.140.169.345 up # www.domain.com

But this doesn't work in Linux and the man page isn't very clear. Does the
le0:x part need to be eth0:x or are there some other files in Linux that
maintain the list af active IP#s?

Thanks in advance.

Joe

 
 
 

How to activate IP#s in Linux ?

Post by Miquel van Smoorenbu » Wed, 31 Dec 1997 04:00:00



>In Solaris it is a simple addition to the /etc/ifconfig file:

>ifconfig le0:2 208.140.169.345 up # www.domain.com

>But this doesn't work in Linux and the man page isn't very clear. Does the
>le0:x part need to be eth0:x or are there some other files in Linux that
>maintain the list af active IP#s?

ifconfig eth0:2 208.140.169.345
route add -host 208.140.169.345 dev lo

Make sure that your kernel has IP aliasing compiled in

Mike.
--
 Miquel van Smoorenburg |  The dyslexic, agnostic, insomniac lay in his bed


 
 
 

How to activate IP#s in Linux ?

Post by root » Sat, 03 Jan 1998 04:00:00




Quote:

> ifconfig eth0:2 208.140.169.345
> route add -host 208.140.169.345 dev lo

> Make sure that your kernel has IP aliasing compiled in

Thanks for the tip -

one question though, What happens if one leaves out the line:
route add -host 208.140.169.345 dev lo

The machine is currently running now with only the
ifconfig eth0:2 208.140.169.345        part in place.

Any forseable problems by not setting the route?

 
 
 

How to activate IP#s in Linux ?

Post by Bud Roger » Sat, 03 Jan 1998 04:00:00





> > ifconfig eth0:2 208.140.169.345
> > route add -host 208.140.169.345 dev lo

> > Make sure that your kernel has IP aliasing compiled in

> Thanks for the tip -

> one question though, What happens if one leaves out the line:
> route add -host 208.140.169.345 dev lo

> The machine is currently running now with only the
> ifconfig eth0:2 208.140.169.345        part in place.

> Any forseable problems by not setting the route?

Sorry to come into the middle of this, but I think what you need is

route add -host 208.140.169.345 dev eth0:2

I think you'll have to add the route to get out that interface, and it
needs point to the aliased device.  FWIW, I've got about a dozen
virtuals running like that at tanet.net.

--


 
 
 

How to activate IP#s in Linux ?

Post by Miquel van Smoorenbu » Sun, 04 Jan 1998 04:00:00







>> > ifconfig eth0:2 208.140.169.345
>> > route add -host 208.140.169.345 dev lo

>> > Make sure that your kernel has IP aliasing compiled in

>> Thanks for the tip -

>> one question though, What happens if one leaves out the line:
>> route add -host 208.140.169.345 dev lo

>> The machine is currently running now with only the
>> ifconfig eth0:2 208.140.169.345        part in place.

>> Any forseable problems by not setting the route?

Well, you can't _locally_ ping the machine. Remotely it will work,
so I don't see any real big problems with this. But it might casue
something strange in the future and you'll have a hard time finding
out what it is ..

Oh, Linux 2.1.x adds the route itself as soon as you up the interface.
In that case you don't need to add the route manually, ofcourse.

Quote:>Sorry to come into the middle of this, but I think what you need is

>route add -host 208.140.169.345 dev eth0:2

>I think you'll have to add the route to get out that interface, and it
>needs point to the aliased device.  FWIW, I've got about a dozen
>virtuals running like that at tanet.net.

I don't know why yet, but all the docs recommend against adding a route
through the aliased device and say you really want to add the route through
"dev lo". Works fine BTW, the route is NOT used to get out of the machine,
it's only so you can reach that IP address locally.

Mike.
--
 Miquel van Smoorenburg |  The dyslexic, agnostic, insomniac lay in his bed

 
 
 

1. How can I activate/de-activate DTR and RTS in Unix

We have an application using the serial ports ( Intelliports) for
reading a signal. For this purpose, we need to activate/de-activate
DTR and RTS pins on the ports (RS-232 and Intelliports)

How can we do this in UNIX (SCO)

Any help is much appreciated. Thanks

Barto


The Netherlands

2. SunPciIII

3. how do I activate/de-activate dns entry?

4. TIA port redirection

5. IP Accounting doesn't work for PPP dial-ins :-(( ??

6. Help - looking for detail description on signal_pending(current)

7. Sherlock linux plug-ins / sherlock for linux?

8. Server that won't Die on logout/timeout?

9. activating TCP/IP

10. Activate NIC at boot without an IP

11. IP conflict - eth0 not activated

12. IP Forwarding Can Not Activate From rc3.d

13. List of plug-ins for linux/netscape please!