We help IT Professionals succeed at work.

Linux Network Configuration storing information

cmb991
cmb991 used Ask the Experts™
on
I have Back-Track 4 one of the laptops.  Whenever I boot it up and I'm not plugged into a network cord, it takes forever to load.  It sits at the Configuring Network Interfaces.  How can I speed this up?  I was thinking if I could figure out how to store wireless network information, it would be able to connect quicker.  Any suggestions?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Duncan RoeSoftware Developer

Commented:
It might have a long dhcpc timeout. You could shorten that, once you find the dhcpc line (you'll have to do that - I'm not familiar with Back-Track 4).
Another common cause of slow startup is waiting for DNS (network name resolution) to time out. I've experienced that myself with no network connection. You may be able to avoid this by having all scripts that access remote systems do so by numeric IP address rather than system name. Things get harder if these systems themselves have dynamic addresses
nociSoftware Engineer
Distinguished Expert 2018

Commented:
If you have enabled network based logins like LDAP etc. then it might wait too long to get a network connection for authentication.

You then need to modify the setup, to not allow for X but only for one retry, and also not doing X attempts bu only 1 and let it timeout in a few seconds instead of 10's of seconds.

for Open LDAP that is /etc/ldap.conf
settings like:
nss_reconnect_tries 1                   # number of times to double the sleep time
nss_reconnect_sleeptime 1               # initial sleep value
nss_reconnect_maxsleeptime 1    # max sleep value to cap at
nss_reconnect_maxconntries 2    # how many tries before sleeping

As mentioned the dhcpc timeout is 60 seconds by default. That can be shortend.
Other contributing factors:
- blocking ICMP messages in firewalls/ipfilters.
- connecting on different networks with nearly identical settings.



Insert some debugging output in init.d/network and see where it's hanging.

Cheers,
-Jon

Author

Commented:
I didn't enable network based logins.  I made my network connections startup when BackTrack is started.

Author

Commented:
I followed these directions to start the networking on startup:

http://www.powercram.com/2009/12/how-to-start-networking-in-backtrack-4.html



Its just when I don't have a network cord plugged it, it takes forever to startup.
nociSoftware Engineer
Distinguished Expert 2018

Commented:
If you don't use LDAP then you have one of:

time-out on name/number translations
time-out on attempts to access remote resources (30seconds-2 minutes).
Behind the scenes attempts to access network resources

you could check if you can use ifplug as a tool for detecting if a cable is present or not.
http://linux.softpedia.com/get/Programming/Libraries/ifplugd-5695.shtml
Steve JenningsSr Manager Cloud Networking Ops

Commented:
Probably not your issue, but if you have postfix or sendmail server or client, load is very slow without a network attachment.

Good luck,
SteveJ
"postfix or sendmail server or client, load is very slow without a network attachment"

Actually, that's applies any server that relies on a functional resolver when starting.  In other words, it has everything to do with DNS and not much to do with mailservers.

Once again, insert some debugging output in init.d/network and you can easily determine where it's hanging.  Is there some reason you're avoiding this?

Cheers,
-Jon

Steve JenningsSr Manager Cloud Networking Ops

Commented:
Thanks Jon

Author

Commented:
If you don't use LDAP then you have one of:

time-out on name/number translations
time-out on attempts to access remote resources (30seconds-2 minutes).
Behind the scenes attempts to access network resources

you could check if you can use ifplug as a tool for detecting if a cable is present or not.
http://linux.softpedia.com/get/Programming/Libraries/ifplugd-5695.shtml






I don't need it to detect if there is a cable present or not... Its tring to find if there is a cable already connected.  I'm trying to cut the detection time down.     These are the direction I followed to do this http://www.powercram.com/2009/12/how-to-start-networking-in-backtrack-4.html   But its just taking way to long...
Software Engineer
Distinguished Expert 2018
Commented:
No but the system start all kinds of stuff regardless of the presence of a cable or not.
ifplug verifies if there is a cale and makes the start of the interface conditional...->
no network service start in the background  unless it is needed.....

ifplug add a little intellligence to the IP startup, without it everything just plain starts and later on detecting it cannot function after a lot of delays. Also if you decide to plugin in a cable later it will start the interface later for you.

The way you reference is the way to blindly start the whole network stack.