LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-09-2012, 01:15 AM   #1
southp
LQ Newbie
 
Registered: Nov 2010
Posts: 3

Rep: Reputation: 0
How to prevent my eth1:0 disappeared after unplug its network cable?


Hi.

We have four machines connecting to each other. Since we want to addressing them through a stable IP, we setup virtual network interfaces (eth1:0) on them, and each has IP 172.16.0.x.

However, we found that after we unplug the cable, eth1:0 will disappear. It's problematic since we need to handle this kind of situation.

Any help is appreciated. Thanks!
 
Old 02-09-2012, 11:55 AM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Perhaps you're using ifplugd, and it is bringing the ethernet down when it loses the link status.

--- rod.
 
Old 02-09-2012, 09:47 PM   #3
southp
LQ Newbie
 
Registered: Nov 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Perhaps you're using ifplugd, and it is bringing the ethernet down when it loses the link status.

--- rod.
Hi rod.
I'm pretty sure we don't have ifplugd installed.
I should be more specific in the previous post: While eth1:0 was gone, our eth1 was still activated.

Thanks.
 
Old 02-10-2012, 08:44 AM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Can you monitor your system logs (/var/log/messages, probably) as you connect and disconnect the cable? That may reveal some clues. I ran into a similar problem and never did get a resolution. Looking forward to someone solving this.

--- rod.
 
Old 02-15-2012, 03:35 PM   #5
ambrop7
Member
 
Registered: May 2011
Distribution: Gentoo
Posts: 98

Rep: Reputation: 16
What are you trying to achieve? Because it appears that the eth0:N "virtual interfaces", as you call them, don't really exist, except for being an alias to eth0. So, they can't have disappeared, because they were never there. It is possible that you have some software running that deconfigures eth0 when the cable is pulled out, and reconfigures it when it's plugged back in. If you have done your custom configuration outside of this software, it may be lost when the software deconfigures eth0.

If you need to assign multiple addresses to eth0, do so. There is no need for eth0:N. (these are low-level commands; you may want to use your network config system instead to make the configuration persistent)

Code:
ip addr add dev eth0 192.168.6.1/24
ip addr add dev eth0 192.168.7.1/24
However be aware that ifconfig will not show all IP addresses; use ip addr to view all assigned addresses.

On the other hand, if you want VLANs, then you should be using the vconfig command and the eth0.N interfaces (dot, not colon). For example, to create eth0.5 for VLAN 5, use:

Code:
vconfig add eth0 5
This will create eth0.5, which is an interface you can configure separately. Also, it does not disappear when you plug the network cable out (at least the kernel doesn't delete it; your network config system may).

If still think you have to handle the network cable being pulled in or out, you can program it in my NCD network configuration software.

Last edited by ambrop7; 02-15-2012 at 03:37 PM.
 
  


Reply

Tags
network interface



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Laptop goes off when plug/unplug AC cable sgb77 Ubuntu 5 01-18-2010 10:56 PM
Power button or unplug cable invader44 Slackware 2 11-20-2009 03:59 PM
Can I unplug LAN cable anytime? Azazwa Linux - Newbie 10 03-31-2009 11:28 PM
safe to unplug IDE/power cable from HD wuya Linux - Hardware 5 04-27-2005 02:06 PM
Lock Computer On Network Cable Unplug damicatz Linux - Networking 3 12-03-2004 07:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration