How can I configure the network interface on Linux to automatically reconnect if the cable was disconnected.?

I have my Red Hat Enterprise 5 workstation set up to use Active Directory authentication.  I also have it configured to lock the screen after 30 minutes of inactivity.  The problem is - if someone disconnects my network cable even momentarily while the screen is locked, I can't authenticate and unlock the screen because the network interface is inactive (so it can't communicate with AD).  Is there a way to configure the system to automatically activate the network interface once the cable is reconnected?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Are you talking about reconnecting to the network or re-authenticating with AD?

If you are using a static IP it will reconnect instantly  when the cable is plugged back in.

I am not sure about how AD handles lost connections.
esbfernAuthor Commented:
I am talking about reconnecting to the network.  I am set up to use DHCP and if I disconnect the cable then reconnect it, I have to manually activate the connection again.  I am wondering if there is a way to have the OS auto reconnect to the network.  The AD part is only related in the sense that I can't log back in and manually activate the network interface because my AD credentials can't be authenticated since AD is unreachable.   I hope this explanation is clear.
you might want to taking a look @ dhclient.conf

here is some information on users having issues switching between connections -

You may want to try running a script to check network connectivity every minute:

if ! `ping -c5 >/dev/null 2>&1` ; then
/etc/rc.d/init.d/network restart
exit 0

This would perform 5 ping test and if it fails, it will restart the network.

You can save it in /usr/bin/pingtest then chmod 775 /usr/bin/pingtest to make it executable

Using crontab -e, input:

* * * * *  /usr/bin/pingtest

Verify that the script is working, once verified, stay logged in first then unplug your network cable then plug it again...
esbfernAuthor Commented:
The solution to this issue was to enable the NetworkManager service and to modify the startup so this service would run by default.  The service checks the connection to the network and attempts to activate the network interface if it is inactive.  It is only needed when you're running DHCP.  

To start the service: sudo service NetworkManager start
To make it persistent (survive reboots): sudo chkconfig NetworkManager on

This doesn't mean that the suggestions offered earlier aren't valid, but this is the method suggested by Red Hat.  My thanks to all of you.

Bob Reed

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.