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


 
 
LinkBack Thread Tools
 
Old 01-14-2011, 06:30 AM
shawn wilson
 
Default networking

On Fri, Jan 14, 2011 at 2:17 AM, Tom H <tomh0665@gmail.com> wrote:
> On Fri, Jan 14, 2011 at 2:04 AM, shawn wilson <ag4ve.us@gmail.com> wrote:
>>
>> allow-hotplug eth0
>> iface eth0 inet dhcp
>> allow hotplug eth1
>> iface eth1 inet dhcp
>
> How about with "allow-hotplug eth1" rather than "allow hotplug eth1"?
>

hummm, maybe that's why the first one worked and the second
didn't..... thanks


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTimw4T8fEZTvokHdMnZ0We3_YW=QvXtVC=+jUcc+@mail .gmail.com">http://lists.debian.org/AANLkTimw4T8fEZTvokHdMnZ0We3_YW=QvXtVC=+jUcc+@mail .gmail.com
 
Old 01-14-2011, 09:08 AM
Tom H
 
Default networking

On Fri, Jan 14, 2011 at 2:30 AM, shawn wilson <ag4ve.us@gmail.com> wrote:
> On Fri, Jan 14, 2011 at 2:17 AM, Tom H <tomh0665@gmail.com> wrote:
>> On Fri, Jan 14, 2011 at 2:04 AM, shawn wilson <ag4ve.us@gmail.com> wrote:
>>>
>>> allow-hotplug eth0
>>> iface eth0 inet dhcp
>>> allow hotplug eth1
>>> iface eth1 inet dhcp
>>
>> How about with "allow-hotplug eth1" rather than "allow hotplug eth1"?
>
> hummm, maybe that's why the first one worked and the second
> didn't..... thanks

You're welcome. Hope this was the problem.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTinjuO0OAtBCif9f=EUh6qK7CFBaXfrXUr+OX+V7@mail .gmail.com">http://lists.debian.org/AANLkTinjuO0OAtBCif9f=EUh6qK7CFBaXfrXUr+OX+V7@mail .gmail.com
 
Old 01-14-2011, 01:13 PM
"Bonno Bloksma"
 
Default networking

Hi,

>> # The primary network interface
>> allow-hotplug eth0
>> iface eth0 inet dhcp
>> allow hotplug eth1
>> iface eth1 inet dhcp
>replace 'allow hotplug' with 'auto'

>auto eth0
>auto eth1

I have been wondering about this and have not seen any definitive
documentation, or if there is, I have not understood it.
Does "auto" imply "allow-hotplug"? If not, should I have both
auto eth0 eth1
and
allow-hotplug eth0 eth1
lines in my interfaces file?

Bonno Bloksma




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/01d601cbb3f5$3a06ba70$ae142f50$@bloksma@tio.nl
 
Old 01-14-2011, 01:43 PM
Mihira Fernando
 
Default networking

On 01/14/2011 07:43 PM, Bonno Bloksma wrote:

Hi,


# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
allow hotplug eth1
iface eth1 inet dhcp

replace 'allow hotplug' with 'auto'
auto eth0
auto eth1

I have been wondering about this and have not seen any definitive
documentation, or if there is, I have not understood it.
Does "auto" imply "allow-hotplug"? If not, should I have both
auto eth0 eth1
and
allow-hotplug eth0 eth1
lines in my interfaces file?

Bonno Bloksma
AFAIK, allow-hotplug makes the interface come up only when a cable is
plugged in. auto makes the interface come up at boot time regardless of
the cable state.


Mihira.


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

Archive: 4D30611A.2030806@gmail.com">http://lists.debian.org/4D30611A.2030806@gmail.com
 
Old 01-14-2011, 06:54 PM
Bob Proulx
 
Default networking

Mihira Fernando wrote:
> Bonno Bloksma wrote:
> > I have been wondering about this and have not seen any definitive
> > documentation, or if there is, I have not understood it.
> > Does "auto" imply "allow-hotplug"? If not, should I have both
> > auto eth0 eth1
> > and
> > allow-hotplug eth0 eth1
> > lines in my interfaces file?
>
> AFAIK, allow-hotplug makes the interface come up only when a cable
> is plugged in. auto makes the interface come up at boot time
> regardless of the cable state.

You are exactly correct. Having 'auto' is the old way that starts
networking with '/etc/init.d/networking start'. But that does not
enable event driven actions such as link status change from plugging
and unplugging the cable. For that you need 'allow-hotplug'. But
that new way doesn't enable '/etc/init.d/networking restart' to do
anything.

Since hotplugging is the new way the debian-installer now sets that up
for new systems. Using an event driven network configuration is
definitely an improvement in general and the right direction to go.
But us old-timers who want to be able to restart the networking then
find that '/etc/init.d/networking restart' doesn't do anything. For
that we also need 'auto' to be present.

This came up in discussion in the past. I don't have the time at the
moment to find a reference link however. But it is okay to have both
trigger conditions present. Then both networking restart and link
status changes will affect the network configuration.

And of course for wicd or network-manager neither of auto or
allow-hotplug can be present. For those tools only configure
interfaces that do not have any local configuration.

Bob
 
Old 01-14-2011, 07:13 PM
Mike Viau
 
Default networking

> On Fri, 14 Jan 2011 12:54:49 -0700 <bob@proulx.com> wrote:
> > Mihira Fernando wrote:
> > Bonno Bloksma wrote:
> > > I have been wondering about this and have not seen any definitive
> > > documentation, or if there is, I have not understood it.
> > > Does "auto" imply "allow-hotplug"? If not, should I have both
> > > auto eth0 eth1
> > > and
> > > allow-hotplug eth0 eth1
> > > lines in my interfaces file?
> >
> > AFAIK, allow-hotplug makes the interface come up only when a cable
> > is plugged in. auto makes the interface come up at boot time
> > regardless of the cable state.
>
> You are exactly correct. Having 'auto' is the old way that starts
> networking with '/etc/init.d/networking start'. But that does not
> enable event driven actions such as link status change from plugging
> and unplugging the cable. For that you need 'allow-hotplug'. But
> that new way doesn't enable '/etc/init.d/networking restart' to do
> anything.
>
> Since hotplugging is the new way the debian-installer now sets that up
> for new systems. Using an event driven network configuration is
> definitely an improvement in general and the right direction to go.
> But us old-timers who want to be able to restart the networking then
> find that '/etc/init.d/networking restart' doesn't do anything. For
> that we also need 'auto' to be present.
>

Would executing '/etc/init.d/networking stop' followed by
'/etc/init.d/networking start' work to restart networking when using only
the new way ('allow-hotplug')?



I understand ifup/down can also be used, but what would t look like? I
have only used ifconfig to bring interface either up or down.


>
> This came up in discussion in the past. I don't have the time at the
> moment to find a reference link however. But it is okay to have both
> trigger conditions present. Then both networking restart and link
> status changes will affect the network configuration.
>

This is something to keep in mind as it only adds minimal line to the /etc/network/interfaces file

Thanks.

>
> And of course for wicd or network-manager neither of auto or
> allow-hotplug can be present. For those tools only configure
> interfaces that do not have any local configuration.
 
Old 01-14-2011, 07:21 PM
Bob Proulx
 
Default networking

Mike Viau wrote:
> Would executing '/etc/init.d/networking stop' followed by
> '/etc/init.d/networking start' work to restart networking when using only
> the new way ('allow-hotplug')?

Without 'auto' calling /etc/init.d/networking will bring the interface
down. But it won't bring the interface up. With 'auto' there then it
will bring the interface up. I just verified that now with a quick
test on a Lenny and Squeeze machine. And you definitely want to keep
'allow-hotplug' there so that link status events will trigger
configuration too.

> I understand ifup/down can also be used, but what would t look like? I
> have only used ifconfig to bring interface either up or down.

Call it with the network device name.

$ sudo ifdown eth0

$ sudo ifup eth0

Bob
 
Old 01-14-2011, 07:48 PM
Paul Cartwright
 
Default networking

On 01/14/2011 03:21 PM, Bob Proulx wrote:
> Without 'auto' calling /etc/init.d/networking will bring the interface
> down. But it won't bring the interface up. With 'auto' there then it
> will bring the interface up. I just verified that now with a quick
> test on a Lenny and Squeeze machine. And you definitely want to keep
> 'allow-hotplug' there so that link status events will trigger
> configuration too.

so how exactly would it look in the interfaces file. here is mine:
auto lo
iface lo inet loopback
#iptables loaded here:
pre-up iptables-restore < /etc/firewall-rules


# static setup
auto eth0
iface eth0 inet static
address 192.168.10.2
netmask 255.255.255.0
dns-nameservers 4.2.2.3 208.67.222.222 208.67.220.220 4.2.2.2 192.168.10.1
gateway 192.168.10.1


did I put that iptables entry in? I don't remember.. should it be there?
--
Paul Cartwright
Registered Linux user # 367800


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4D30B6A8.9050705@pcartwright.com">http://lists.debian.org/4D30B6A8.9050705@pcartwright.com
 
Old 01-14-2011, 08:31 PM
Bob Proulx
 
Default networking

Paul Cartwright wrote:
> Bob Proulx wrote:
> > Without 'auto' calling /etc/init.d/networking will bring the interface
> > down. But it won't bring the interface up. With 'auto' there then it
> > will bring the interface up. I just verified that now with a quick
> > test on a Lenny and Squeeze machine. And you definitely want to keep
> > 'allow-hotplug' there so that link status events will trigger
> > configuration too.
>
> so how exactly would it look in the interfaces file. here is mine:
> auto lo
> iface lo inet loopback

The loopback device doesn't need to be hotplugged since it always
exists. The debian-install sets it up with 'auto' only.

> #iptables loaded here:
> pre-up iptables-restore < /etc/firewall-rules

That looks like something local to your system. It seems like an odd
place to put that. It looks like someone was trying to reload the
firewall rules at startup time but didn't know about the directory of
scripts /etc/network/if-up.d/* and so associated the timing with the
loopback device coming online instead. Eww...

> # static setup
> auto eth0
> iface eth0 inet static
> address 192.168.10.2
> netmask 255.255.255.0
> dns-nameservers 4.2.2.3 208.67.222.222 208.67.220.220 4.2.2.2 192.168.10.1
> gateway 192.168.10.1

Looks okay. It is a static entry. Therefore it doesn't really need
to dynamically configure anything when the link is established. It
won't hurt anything to have allow-hotplug there. It would look like
this in that case:

# static setup
auto eth0
allow-hotplug eth0
iface eth0 inet static
address 192.168.10.2
netmask 255.255.255.0
dns-nameservers 4.2.2.3 208.67.222.222 208.67.220.220 4.2.2.2 192.168.10.1
gateway 192.168.10.1

The more typical use would be with a dhcp device. Which would look
like this:

auto eth0
allow-hotplug eth0
iface eth0 inet dhcp

And again, you wouldn't have any configuration for a wicd or
network-manager controlled device since those only control devices
without a local configuration.

> did I put that iptables entry in? I don't remember.. should it be there?

I think you did put that in there. It has that look. As to whether
it /should/ be there... well *I* wouldn't put it there. :-) I think
that type of reloading belongs elsewhere such as in an if-up.d/*
script. But I don't know about your firewall setup. I could guess
something like this in /etc/network/if-up.d/local-firewall using your
current config as a template.

#!/bin/sh
case $IFACE in
eth*)
iptables-restore < /etc/firewall-rules
;;
esac
exit 0

That will run your command whenever any eth* device is brought up.

Personally I like the shorewall package quite a bit for setting up
firewalls.

Bob
 
Old 01-14-2011, 09:18 PM
Paul Cartwright
 
Default networking

On 01/14/2011 04:31 PM, Bob Proulx wrote:
> I think you did put that in there. It has that look. As to whether
> it /should/ be there... well *I* wouldn't put it there. :-) I think
> that type of reloading belongs elsewhere such as in an if-up.d/*
> script. But I don't know about your firewall setup. I could guess
> something like this in /etc/network/if-up.d/local-firewall using your
> current config as a template.
I just googled it and found this:
http://www.linuxquestions.org/questions/ubuntu-63/where-is-iptables-config-file-584024/

There's no default. You can set your iptables config anywhere you want.
Add a "pre-up" line to your //etc/network/interfaces/ file, calling
the/iptables-restore/ command. Say you choose //etc/example.txt/ - in
your //etc/network/interfaces/ file you'd have a line like:
Code:

pre-up iptables-restore < /etc/example.txt

This loads the iptables config before the network interfaces are put
online. BTW, make sure you never edit your config file manually.
Populate it with a /iptables-save/ command, like:
Code:

iptables-save > /etc/example.txt




--
Paul Cartwright
Registered Linux user # 367800


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4D30CBA2.40205@pcartwright.com">http://lists.debian.org/4D30CBA2.40205@pcartwright.com
 

Thread Tools




All times are GMT. The time now is 02:20 AM.

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