FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 07-23-2008, 09:38 AM
Alex Samad
 
Default Multiple static ips and dhcp mixed

On Wed, Jul 23, 2008 at 10:48:10AM +0200, Armin Häberling wrote:
> Hi all,
>
> I'm currently setting up a development machine of ours. For testing our
> application it need two static ips. it does not need to be accessible
> under these ips from outside.
> Another interface should be configured via dhcp. I would use a static
> ip, but it's a laptop that may be used in a lots of different networks.
>
> My /etc/network/interfaces looks like this
>
> auto lo
> iface lo inet loopback
>
> auto eth1
> iface eth1 inet dhcp
>
> auto eth1:0
> iface eth1:0 inet static
> address 172.16.2.201
> netmask 255.255.255.0
> broadcast 172.16.2.255
>
> auto eth1:1
> iface eth1:1 inet static
> address 172.16.2.201
> netmask 255.255.255.0
> broadcast 172.16.2.255

they are the same address ?
>
> I set up the static ips in a private subnet.
>
> The problems with this solution is that eth1:0 and eth1:0 are not set up
> at boot time. They are only set up if I do a /etc/init.d/networking
> restart. The second is that if I unplug the network eth1:0 and eth1:1
> also go down. I would really like them to be up all the time (remeber
> that I don't care if they are not accessible from another machine).

why not add the addresses to lo then

>
> There must be a better solution for this.
>
> Thanks in advance for your help
>
> Regards
> Armin
>
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a
> subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>

--
"I think the American people -- I hope the American -- I don't think, let me -- I hope the American people trust me."

- George W. Bush
12/18/2002
Washington, DC
 
Old 07-23-2008, 09:50 AM
Armin Häberling
 
Default Multiple static ips and dhcp mixed

Alex Samad wrote:

On Wed, Jul 23, 2008 at 10:48:10AM +0200, Armin Häberling wrote:

Hi all,

I'm currently setting up a development machine of ours. For testing our
application it need two static ips. it does not need to be accessible
under these ips from outside.
Another interface should be configured via dhcp. I would use a static
ip, but it's a laptop that may be used in a lots of different networks.


My /etc/network/interfaces looks like this

auto lo
iface lo inet loopback

auto eth1
iface eth1 inet dhcp

auto eth1:0
iface eth1:0 inet static
address 172.16.2.201
netmask 255.255.255.0
broadcast 172.16.2.255

auto eth1:1
iface eth1:1 inet static
address 172.16.2.201
netmask 255.255.255.0
broadcast 172.16.2.255


they are the same address ?


Thats a typo, thanks


I set up the static ips in a private subnet.

The problems with this solution is that eth1:0 and eth1:0 are not set up
at boot time. They are only set up if I do a /etc/init.d/networking
restart. The second is that if I unplug the network eth1:0 and eth1:1
also go down. I would really like them to be up all the time (remeber
that I don't care if they are not accessible from another machine).


why not add the addresses to lo then


how can I do that?


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-23-2008, 10:15 AM
Andrei Popescu
 
Default Multiple static ips and dhcp mixed

On Wed,23.Jul.08, 10:48:10, Armin Häberling wrote:
> Hi all,
>
> I'm currently setting up a development machine of ours. For testing our
> application it need two static ips. it does not need to be accessible
> under these ips from outside.
> Another interface should be configured via dhcp. I would use a static
> ip, but it's a laptop that may be used in a lots of different networks.

I think the 'dummy' interface is better suited for this, but this is
just a guess (never used it myself).

Regards,
Andrei
--
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)
 
Old 07-23-2008, 08:28 PM
Alex Samad
 
Default Multiple static ips and dhcp mixed

On Wed, Jul 23, 2008 at 11:50:10AM +0200, Armin Häberling wrote:
> Alex Samad wrote:
>> On Wed, Jul 23, 2008 at 10:48:10AM +0200, Armin Häberling wrote:
>>> Hi all,
>>>

[snip]

>>
>> why not add the addresses to lo then
>
> how can I do that?

have a look at man interfaces, the section you want is "up" and
something like

up ip a a dev lo 192.168.1.1/32 || true



>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a
> subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>

--
Better to light one candle than to curse the darkness.
-- motto of the Christopher Society
 
Old 07-23-2008, 08:38 PM
Mike Bird
 
Default Multiple static ips and dhcp mixed

Hi Armin,

Use dummy0 for the static ip's, e.g.:

auto eth1
iface eth1 inet dhcp

auto dummy0
iface dummy0 inet static
address 172.16.2.201
netmask 255.255.255.0
broadcast 172.16.2.255

auto dummy0:1
iface dummy0:1 inet static
address 172.16.2.202
netmask 255.255.255.0
broadcast 172.16.2.255

--Mike Bird


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-23-2008, 11:08 PM
Alex Samad
 
Default Multiple static ips and dhcp mixed

On Wed, Jul 23, 2008 at 01:38:43PM -0700, Mike Bird wrote:
> Hi Armin,
>
> Use dummy0 for the static ip's, e.g.:
>

any erason for dummy instead of loopback ?

[snip]

>
> --Mike Bird
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>

--
"The American people wants a president that appeals to the angels."

- George W. Bush
08/01/2000
in his speech during the GOP convention
 

Thread Tools




All times are GMT. The time now is 03:21 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org