LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 10-18-2005, 01:29 PM   #1
Edwardml
LQ Newbie
 
Registered: Jul 2005
Posts: 4

Rep: Reputation: 0
Disable/Enable network interface


I know this sounds like it should be an easy question, but I can't find the answer anywhere. I can't find out how to turn my wireless card on or off on my laptop...When I have the ethernet cable plugged in, it still tries to use the wireless. Any help?
 
Old 10-18-2005, 01:51 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
I switch between wired (eth0) and wireless (eth1) with:

/etc/sysconfig/network-scripts/ifdown eth1
/etc/sysconfig/network-scripts/ifup eth0

to switch back (obviously):

/etc/sysconfig/network-scripts/ifdown eth0
/etc/sysconfig/network-scripts/ifup eth1
 
Old 10-18-2005, 11:59 PM   #3
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
just typing:
Code:
ifdown eth0
ifup eth1
will work fine, as root of course.
 
Old 10-19-2005, 03:34 AM   #4
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
...only the routing-table is sometimes not correctly updated (a problem with every distro I tried!)
so eventually you will have to manually edit it: Example:
Code:
[root@killbill peterh]# ifdown eth1
[root@killbill peterh]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
172.16.1.0      172.16.1.36     255.255.255.0   UG    0      0        0 eth0
172.16.1.0      *               255.255.255.0   U     10     0        0 eth0
10.0.4.0        *               255.255.254.0   U     10     0        0 eth1
default         10.0.4.1        0.0.0.0         UG    10     0        0 eth1
default         172.16.1.1      0.0.0.0         UG    10     0        0 eth0
As you can see, even though eth1 is down, it is still default gateway. Delete it with:
Code:
[root@killbill peterh]# route del default eth1
 
Old 10-19-2005, 04:24 AM   #5
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
Quote:
...only the routing-table is sometimes not correctly updated (a problem with every distro I tried!)
Are your routes in /etc/sysconfig/network-scripts/route-ethX ? If they're not then they won't be properly deleted/added by the ifup/ifdown scripts.
 
Old 10-19-2005, 10:00 AM   #6
Edwardml
LQ Newbie
 
Registered: Jul 2005
Posts: 4

Original Poster
Rep: Reputation: 0
I knew it had to be something easy. thanks:-)
 
  


Reply



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
Runlevel Editor - Cannot Enable/Disable caesium5 SUSE / openSUSE 1 10-06-2005 05:35 AM
Why do I need to be Superuser to enable or disable printers? LostInFog Linux - General 4 02-18-2005 12:31 PM
enable disable Tuttle General 0 01-08-2005 04:21 PM
disable ethernet, enable wireless Ryan450 Linux - Wireless Networking 1 09-17-2004 04:53 PM
Enable/Disable GTk CheckButton Claus Programming 2 12-01-2003 04:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 09:53 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