Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Using two nic and switching from one to another
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
josip77
n00b
n00b


Joined: 18 Aug 2007
Posts: 2
Location: Bologna (IT)

PostPosted: Sat Aug 18, 2007 10:21 pm    Post subject: Using two nic and switching from one to another Reply with quote

Hi,
I have two nic installed in my laptop Acer Aspire 3630.
One is an Ethernet nic (eth0) and the other one is the wifi nic (eth1).
I have all drivers installed and working correctly.
I link my ethernet cable to the laptop, and the dhcpcd give me an ip address.
If I run firefox I am connected to internet.
Now, I unplug my ethernet cable and run KWifiManager (I use wpa_supplicant).
I'm able to see my wifi net and obtain an ip address.
But, if I run firefox, I receive a timed out error, because firefox try to connect by
the ethernet nic (eth0).
My question is: how can I switch the system to use the wifi nic (eth1), instead of eth0?
Sorry if my question is banal, but I'm new to the Linux world.
Thank you very much for your help.
Josip
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54785
Location: 56N 3W

PostPosted: Sat Aug 18, 2007 10:59 pm    Post subject: Reply with quote

josip77,

Welcome to gentoo.

Your problem is caused because the wired interface is still up.
I think ifplugd does what you need, it takes the wired interface up and down depending on the connection state.

You can also set up your two interfaces as a bond. They operate as a single logical interface, with the same IP.
Then may be configured to operate in several modes.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
josip77
n00b
n00b


Joined: 18 Aug 2007
Posts: 2
Location: Bologna (IT)

PostPosted: Sun Aug 19, 2007 1:56 pm    Post subject: Reply with quote

hi,

i've installed ifenslave and i've activated the bounding with eth0 (wired) and eth1 (wifi).
With the ethernet cable linked i am on line.
If I unplug the cable and activate wifi, the slave interface come up, but don't become running.
I have disinstalled ifplugd, but no changes append.
Can you help me, please?
Thank you, Josip.


my /etc/conf.d/net is:
slaves_bond0="eth0 eth1"
config_bond0=("dhcp")
iwconfig_eth1="mode managed"
modules=( "wpa_supplicant" )
wpa_supplicant_eth1="-Dwext"

my /etc/modules.autoload.d/kernel-2.6 is:
bonding mode=1 miimon=100


boss ~ # cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.1.2 (January 20, 2007)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth1
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Link Failure Count: 1
Permanent HW addr: 00:16:36:38:0a:96

Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:16:ce:42:80:95


(with the cable unplugged)
boss ~ # ifconfig
bond0 Link encap:Ethernet HWaddr 00:16:36:38:0A:96
inet addr:37.235.41.58 Bcast:37.235.47.255 Mask:255.255.248.0
inet6 addr: fe80::216:36ff:fe38:a96/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:232 errors:0 dropped:62 overruns:0 frame:0
TX packets:3833 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:138678 (135.4 Kb) TX bytes:214588 (209.5 Kb)

eth0 Link encap:Ethernet HWaddr 00:16:36:38:0A:96
inet6 addr: fe80::216:36ff:fe38:a96/64 Scope:Link
UP BROADCAST SLAVE MULTICAST MTU:1500 Metric:1
RX packets:35 errors:0 dropped:0 overruns:0 frame:0
TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6601 (6.4 Kb) TX bytes:4304 (4.2 Kb)
Interrupt:16 Base address:0x2000

eth1 Link encap:Ethernet HWaddr 00:16:36:38:0A:96
inet6 addr: fe80::216:36ff:fe38:a96/64 Scope:Link
UP BROADCAST SLAVE MULTICAST MTU:1500 Metric:1
RX packets:197 errors:0 dropped:62 overruns:0 frame:0
TX packets:3803 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:132077 (128.9 Kb) TX bytes:210284 (205.3 Kb)
Interrupt:3 Base address:0xc000

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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum