LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   wireless problem on slackware 13.1 keeps switching back in forth from eth0 and eth1 (https://www.linuxquestions.org/questions/linux-newbie-8/wireless-problem-on-slackware-13-1-keeps-switching-back-in-forth-from-eth0-and-eth1-888020/)

linux/unix87 06-23-2011 08:14 PM

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

liberalchrist 06-25-2011 07:13 AM

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!

markush 06-25-2011 07:30 AM

could you please post the output of
Code:

ifconfig
and
Code:

iwconfig
Markus

linux/unix87 06-25-2011 09:05 PM

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:1C:DF:E5:1D:7B
Bit Rate=54 Mb/s Tx-Power:24 dBm
Retry min limit:7 RTS thr:off Fragment thr:off
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

markush 06-26-2011 02:36 AM

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

linux/unix87 06-27-2011 09:18 PM

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?

liberalchrist 06-27-2011 09:27 PM

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.

markush 06-28-2011 12:17 AM

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

kingbeowulf 06-28-2011 01:57 AM

Quote:

Originally Posted by linux/unix87 (Post 4394168)
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.

linux/unix87 06-29-2011 09:54 PM

Quote:

Originally Posted by markush (Post 4397611)
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

linux/unix87 06-29-2011 10:11 PM

Quote:

Originally Posted by beowulf999 (Post 4397656)
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?

kingbeowulf 06-30-2011 11:59 PM

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


All times are GMT -5. The time now is 05:51 PM.