Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

Routes disappear if cable unplugged/pluggedin

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
3 posts • Page 1 of 1
Author
Message
siamect
n00b
n00b
Posts: 27
Joined: Fri Jun 08, 2007 7:14 am
Location: Thailand

Routes disappear if cable unplugged/pluggedin

  • Quote

Post by siamect » Sat Feb 09, 2008 2:52 pm

Dear all
I have a problem
I usually have at least 2 or 3 ip on my eth0 interface.
I need this because I use my computer to communicate to different machines, PLCs and other industrial equipment. Some of those are on different subnets...
It works great but if I unplug the LAN cable and plug it it again I loose the routes to the second/third subnet. If I run /etc/init.d/net.eth0 restart then it works again but it is annoying.
How can I do this automatically.

Here is my usual /etc/conf.d/net

modules=( "wpa_supplicant" )
wpa_supplicant_eth1="-Dwext"
wpa_timeout_eth1=60

config_eth1=( "dhcp" )

routes_eth0=(
"default via 192.168.0.1"
)

config_eth0=(
"172.16.17.35/24"
"192.168.0.30/24
"192.168.10.30/24"
)

Thanks and best regards
Martin
Top
Voltago
Advocate
Advocate
User avatar
Posts: 2593
Joined: Tue Sep 02, 2003 1:54 pm
Location: userland

  • Quote

Post by Voltago » Sat Feb 09, 2008 5:21 pm

To put a stop to this behavior, add

Code: Select all

modules_eth0=( "!plug" )
to /etc/conf.d/net so that ifplugd doesn't watch your ethernet device any more for [un]plug-events.
http://www.gentoo.org/doc/en/handbook/h ... xml?part=4
Top
siamect
n00b
n00b
Posts: 27
Joined: Fri Jun 08, 2007 7:14 am
Location: Thailand

  • Quote

Post by siamect » Sun Feb 10, 2008 2:16 am

Thanks Voltago... Next time you are Thailand I'll buy you a beer... :D
Martin
Top
Post Reply

3 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic