LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-23-2011, 08:14 PM   #1
linux/unix87
Member
 
Registered: Oct 2010
Posts: 190

Rep: Reputation: 6
wireless problem on slackware 13.1 keeps switching back in forth from eth0 and eth1


hi

ok i looked at the /etc/rc.d/rc.inet1.conf file it says something completely diff than the iwconfig. iwconfig is saying there is no wireless extensions on lo and eth1 but on eth0 all my info is there now on the conf file it says and ip address on eth2 and nothing on eth 0, or 1. does anybody know why it keeps jumping back and forth? one week its eth0 and maybe 2 months from now its eth1.

thank you
 
Old 06-25-2011, 07:13 AM   #2
liberalchrist
Member
 
Registered: Jun 2011
Location: Chester, SC
Distribution: Slackware Current
Posts: 123

Rep: Reputation: 26
Udev Rules

I don't know all of your specifics and I'm not that great at diagnosing these problems, but I'm pretty sure this link will lead you down the right path: http://www.linuxfromscratch.org/lfs/...7/network.html

Read the bit about creating stable names for network interfaces.

Good luck!
 
Old 06-25-2011, 07:30 AM   #3
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
could you please post the output of
Code:
ifconfig
and
Code:
iwconfig
Markus
 
Old 06-25-2011, 09:05 PM   #4
linux/unix87
Member
 
Registered: Oct 2010
Posts: 190

Original Poster
Rep: Reputation: 6
ok here is ifconfig and iwconfig and if you want i can give you the /etc/rc.d/rc.inet1.conf also just let me know.

root@allsbrook:~# ifconfig
eth0 Link encap:Ethernet HWaddr ac:81:12:26:ad:db
inet addr:192.168.2.3 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::ae81:12ff:fe26:addb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1217 errors:0 dropped:0 overruns:0 frame:174
TX packets:1261 errors:11 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:927037 (905.3 KiB) TX bytes:192617 (188.1 KiB)
Interrupt:17

eth1 Link encap:Ethernet HWaddr 78:ac:c0:4b:06:ec
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:26 Base address:0x4000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:24 errors:0 dropped:0 overruns:0 frame:0
TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1240 (1.2 KiB) TX bytes:1240 (1.2 KiB)

root@allsbrook:~# iwconfig
lo no wireless extensions.

eth1 no wireless extensions.

eth0 IEEE 802.11 ESSID:"Belkin_G+MIMO_Wireless_E51D7B" Nickname:"darksta"
Mode:Managed Frequency:2.437 GHz Access Point: 00:1CF:E5:1D:7B
Bit Rate=54 Mb/s Tx-Power:24 dBm
Retry min limit:7 RTS thrff Fragment thrff
Power Managementmode:All packets received
Link Quality=4/5 Signal level=-61 dBm Noise level=-95 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
 
Old 06-26-2011, 02:36 AM   #5
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
Hello linux/unix87,

I don't think that this is really a problem. You have a connection to the internet via your wireless adapter.
Since you have an USB-wireless-adapter, you can't have a guarantee that the device shows up as wlan0 or wlan1 which would be the case if it were an internal PCI-device.
Something which may help you if you're willing to work this out, read about "udev-rules"
Manual here: http://reactivated.net/writing_udev_rules.html
Using udev-rules you can configure by yourself what the system does with an USB-device. But note that this is not really necessary in your case.

Markus
 
Old 06-27-2011, 09:18 PM   #6
linux/unix87
Member
 
Registered: Oct 2010
Posts: 190

Original Poster
Rep: Reputation: 6
hi

thanks for the link...anyway my problem is not getting an internet connection its having to go to wicd preferences and changing the wireless connection to eth1 and wired to eth0 and later on, not saying tomorrow but i guess i could say a week to a month from now i will have to go back and do the opposite. Its my third time doing this. could it be the program wicd?
 
Old 06-27-2011, 09:27 PM   #7
liberalchrist
Member
 
Registered: Jun 2011
Location: Chester, SC
Distribution: Slackware Current
Posts: 123

Rep: Reputation: 26
Udev assigns these dynamically. Left on its own, this will continue to change back and forth. If you follow the link in my first post, you will read a very clear explanation about how to write the appropriate rule. If you do this, your problem will go away.
 
Old 06-28-2011, 12:17 AM   #8
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
Hi linux/unix87,

do you really need wicd? which encryption does your wireless network use?

What I meant with my post #5 was that you could try to give the wireless-adapter a static interfacename (for example eth1) with udev-rules. I think what you mean is that you need a static interfacename in order to configure wicd properly.

Markus
 
Old 06-28-2011, 01:57 AM   #9
kingbeowulf
Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware64 14.2 Slackware 14.2, Slackware{32,64}-current
Posts: 737
Blog Entries: 2

Rep: Reputation: 236Reputation: 236Reputation: 236
Quote:
Originally Posted by linux/unix87 View Post
hi

ok i looked at the /etc/rc.d/rc.inet1.conf file it says something completely diff than the iwconfig. iwconfig is saying there is no wireless extensions on lo and eth1 but on eth0 all my info is there now on the conf file it says and ip address on eth2 and nothing on eth 0, or 1. does anybody know why it keeps jumping back and forth? one week its eth0 and maybe 2 months from now its eth1.

thank you
Look in /etc/udev/rules.d fro a file called "70-persistent-net.rules" and you will see like lines like
Code:
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:19:db:63:78:2f", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
Find the one with the MAC address of you wifi and make sure NAME="eth1" and that the one for your wired network interface says NAME="eth0"

When you system boots, it just assigns eth* on a FIFO basis. This should keep it from switching.

rc.inet1.conf MUST be empty (ie nothing set) if you use WICD, otherwise configure as needed.
 
Old 06-29-2011, 09:54 PM   #10
linux/unix87
Member
 
Registered: Oct 2010
Posts: 190

Original Poster
Rep: Reputation: 6
Quote:
Originally Posted by markush View Post
Hi linux/unix87,

do you really need wicd? which encryption does your wireless network use?

What I meant with my post #5 was that you could try to give the wireless-adapter a static interfacename (for example eth1) with udev-rules. I think what you mean is that you need a static interfacename in order to configure wicd properly.

Markus
If there is an easier way than wicd? then no i dont need it and i dont have an encryption for some reason i have a problem with that on wicd. I was told it doesnt work on wpa2 personal settings i tried at my parents house they do have an encryption. I was told wicd was a very good program but i dont think so anymore... thanks
 
Old 06-29-2011, 10:11 PM   #11
linux/unix87
Member
 
Registered: Oct 2010
Posts: 190

Original Poster
Rep: Reputation: 6
Quote:
Originally Posted by beowulf999 View Post
Look in /etc/udev/rules.d fro a file called "70-persistent-net.rules" and you will see like lines like
Code:
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:19:db:63:78:2f", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
Find the one with the MAC address of you wifi and make sure NAME="eth1" and that the one for your wired network interface says NAME="eth0"

When you system boots, it just assigns eth* on a FIFO basis. This should keep it from switching.

rc.inet1.conf MUST be empty (ie nothing set) if you use WICD, otherwise configure as needed.
hi

I went to that file and changed the name to eth1 and my only question is where is the mac address on that file? Is it attr? I had only one line on the file so i just changed the name there and rebooted the computer and it said it was disconnected. so then i went to wicd then preferences and changed the wireless to eth1 and it worked so far. I got one question though why was nothing mentioned of this file in the slackbook out of curiosity?
 
Old 06-30-2011, 11:59 PM   #12
kingbeowulf
Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware64 14.2 Slackware 14.2, Slackware{32,64}-current
Posts: 737
Blog Entries: 2

Rep: Reputation: 236Reputation: 236Reputation: 236
Quote:
I got one question though why was nothing mentioned of this file in the slackbook out of curiosity
The slackbook is a work in progress and helps get you up and running with the basics.

Normally you don't need to mess with the default udev rules. Sometimes, esp. if you have laptops with both wired and wireless interfaces as I do (and you do as well from your ifconfig and iwconfig output), the ethx could swap depending driver/module loading order. This can happen if your wifi is active but your wired ethernet interface is disabled or the wired driver module doesn't load. Editing /etc/udev/rules.d/70-persistent-net.rules is just a quick fix. This file is automatically generated based on the active interfaces found, but udev will honor the NAME= setting. ATTR{address}= is the MAC address.

You don't need wicd; it's just handy if you swap ports or swap wifi hotspots. You can specify everything you need via /etc/rc.d/rc.inet1.conf
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
eth0, eth1, dhcp, slackware 11 problem q3noob Slackware 5 07-31-2007 09:26 AM
manually switching from eth0 to eth1 newbiesforever Linux - Networking 6 05-16-2006 12:46 AM
Mandrake is switching the eth1 and eth0 interfaces... how can I switch them back? LaptopLinux Mandriva 3 03-28-2005 09:23 PM
Wireless network on eth1 diabled Ethernet eth0 and eth0 never comes back tadatoshi Linux - Wireless Networking 4 09-23-2004 05:57 PM
eth0 (hard line) and eth1 (wireless) problem zorgnerf Linux - Wireless Networking 2 07-27-2003 11:18 AM


All times are GMT -5. The time now is 02:25 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration