Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu User (http://www.linux-archive.org/ubuntu-user/)
-   -   How to set up static IP in 12.04 and avoid these start-up delays? (http://www.linux-archive.org/ubuntu-user/709608-how-set-up-static-ip-12-04-avoid-these-start-up-delays.html)

Tom H 10-04-2012 02:02 PM

How to set up static IP in 12.04 and avoid these start-up delays?
 
On Thu, Oct 4, 2012 at 8:51 AM, compdoc <compdoc@hotrodpc.com> wrote:
>>
>> dns-nameservers 127.0.0.1 195.74.113.58 194.72.0.114
>
> Should you refer to your own machine for name resolution before the others?
> Don't think mine list 127.0.0.1 at all, but then I don't run a dns service
> on them.

If you're running dnsmasq (or bind) locally, you definitely want to
have "127.0.0.1" first, otherwise why would you bother?

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Tom H 10-04-2012 02:23 PM

How to set up static IP in 12.04 and avoid these start-up delays?
 
On Thu, Oct 4, 2012 at 9:06 AM, Chris Green <cl@isbd.net> wrote:
> On Thu, Oct 04, 2012 at 01:59:24PM +0100, Chris Green wrote:
>> On Thu, Oct 04, 2012 at 08:08:43AM -0400, Tom H wrote:
>>>>
>>>> To debug the situation you could create /etc/network/if-up.d/0000debug with
>>>>
>>>> exec >> /var/log/ifup-d.log 2>&1
>>>> echo "Running if-up.d scripts for $IFACE"
>>>> set -x
>>>>
>>>> and then look at that log file when the server boots.
>>>
>>> I'd put that snippet (more or less) into every script in
>>> "/etc/network/if-up.d/" because I don't think that 0000debug'll act on
>>> the other scripts - and it should be "chmod -x"'d.
>>>
>> You're quite right, the 0000debug didn't do any good so I have added the
>> above (with the name of the script changed) to each script in if-up.d.
>>
>> ... listen to this space! :-)
>
> Here's the result (attached, it's a bit long), I can't see anything wrong.

Your attachment looks like the output of the wpasupplicant script -
and it looks OK. Is it the only one in "/etc/network/ifup.d/"?

Before you follow Marius' debug suggestion (which is good), I'd
correct the "broadcast" line "/etc/network/interfaces" (or delete it
and the "network" line), comment out the eth1-related lines, and check
whether the pause in your boot sequence's still there. If it still is,
add debug lines to all the "/etc/network/ifup.d/" scripts and...

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Chris Green 10-04-2012 02:31 PM

How to set up static IP in 12.04 and avoid these start-up delays?
 
On Thu, Oct 04, 2012 at 10:23:17AM -0400, Tom H wrote:
> On Thu, Oct 4, 2012 at 9:06 AM, Chris Green <cl@isbd.net> wrote:
> > On Thu, Oct 04, 2012 at 01:59:24PM +0100, Chris Green wrote:
> >> On Thu, Oct 04, 2012 at 08:08:43AM -0400, Tom H wrote:
> >>>>
> >>>> To debug the situation you could create /etc/network/if-up.d/0000debug with
> >>>>
> >>>> exec >> /var/log/ifup-d.log 2>&1
> >>>> echo "Running if-up.d scripts for $IFACE"
> >>>> set -x
> >>>>
> >>>> and then look at that log file when the server boots.
> >>>
> >>> I'd put that snippet (more or less) into every script in
> >>> "/etc/network/if-up.d/" because I don't think that 0000debug'll act on
> >>> the other scripts - and it should be "chmod -x"'d.
> >>>
> >> You're quite right, the 0000debug didn't do any good so I have added the
> >> above (with the name of the script changed) to each script in if-up.d.
> >>
> >> ... listen to this space! :-)
> >
> > Here's the result (attached, it's a bit long), I can't see anything wrong.
>
> Your attachment looks like the output of the wpasupplicant script -
> and it looks OK. Is it the only one in "/etc/network/ifup.d/"?
>
If you look carefully it's the output from all the scripts in
/etc/network/ifup.d/. There are:-
avahi-daemon openssh-server postfix upstart wpasupplicant
in there.

> Before you follow Marius' debug suggestion (which is good), I'd
> correct the "broadcast" line "/etc/network/interfaces" (or delete it
> and the "network" line), comment out the eth1-related lines, and check
> whether the pause in your boot sequence's still there. If it still is,
> add debug lines to all the "/etc/network/ifup.d/" scripts and...
>
OK.

But what's wrong with the broadcast and network lines?

I've deleted them and commented out the USB/eth1 stuff, off I go to
reboot again! :-)

--
Chris Green

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Chris Green 10-04-2012 02:42 PM

How to set up static IP in 12.04 and avoid these start-up delays?
 
On Thu, Oct 04, 2012 at 10:23:17AM -0400, Tom H wrote:
> >> You're quite right, the 0000debug didn't do any good so I have added the
> >> above (with the name of the script changed) to each script in if-up.d.
> >>
> >> ... listen to this space! :-)
> >
> > Here's the result (attached, it's a bit long), I can't see anything wrong.
>
> Your attachment looks like the output of the wpasupplicant script -
> and it looks OK. Is it the only one in "/etc/network/ifup.d/"?
>
> Before you follow Marius' debug suggestion (which is good), I'd
> correct the "broadcast" line "/etc/network/interfaces" (or delete it
> and the "network" line), comment out the eth1-related lines, and check
> whether the pause in your boot sequence's still there. If it still is,
> add debug lines to all the "/etc/network/ifup.d/" scripts and...
>
... of course! Silly me, that bit at the end of /etc/network/interfaces
was the culprit:-

# The USB network interface
auto eth1
iface eth1 inet dhcp

It's trying to use DHCP to configure eth1 and that causes the delay.
Commenting it out has fixed the problem, I don't currently have a USB to
ethernet dongle plugged in anyway.

Thanks for all the help everyone.

--
Chris Green

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Tom H 10-04-2012 04:31 PM

How to set up static IP in 12.04 and avoid these start-up delays?
 
On Thu, Oct 4, 2012 at 10:31 AM, Chris Green <cl@isbd.net> wrote:
> On Thu, Oct 04, 2012 at 10:23:17AM -0400, Tom H wrote:
>>
>> Before you follow Marius' debug suggestion (which is good), I'd
>> correct the "broadcast" line "/etc/network/interfaces" (or delete it
>> and the "network" line), comment out the eth1-related lines, and check
>> whether the pause in your boot sequence's still there. If it still is,
>> add debug lines to all the "/etc/network/ifup.d/" scripts and...
>
> OK.
>
> But what's wrong with the broadcast and network lines?

I'd pointed out in an earlier post that the broadcast line is
incorrect and that these two lines aren't necessary because they're
calculated from the ip address and the netmask. It doesn't hurt to
have them but they're not needed and not having them means that there
are fewer things that can be set up incorrectly.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Tom H 10-04-2012 04:32 PM

How to set up static IP in 12.04 and avoid these start-up delays?
 
On Thu, Oct 4, 2012 at 10:42 AM, Chris Green <cl@isbd.net> wrote:
> On Thu, Oct 04, 2012 at 10:23:17AM -0400, Tom H wrote:
>>
>> Before you follow Marius' debug suggestion (which is good), I'd
>> correct the "broadcast" line "/etc/network/interfaces" (or delete it
>> and the "network" line), comment out the eth1-related lines, and check
>> whether the pause in your boot sequence's still there. If it still is,
>> add debug lines to all the "/etc/network/ifup.d/" scripts and...
>
> ... of course! Silly me, that bit at the end of /etc/network/interfaces
> was the culprit:-
>
> # The USB network interface
> auto eth1
> iface eth1 inet dhcp
>
> It's trying to use DHCP to configure eth1 and that causes the delay.
> Commenting it out has fixed the problem, I don't currently have a USB to
> ethernet dongle plugged in anyway.
>
> Thanks for all the help everyone.

:)

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


All times are GMT. The time now is 09:43 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.