You are not logged in.

#1 2011-05-26 12:51:20

shadenzo
Member
Registered: 2011-05-26
Posts: 6

[SOLVED ] netcfg : can't get two connnections to the same router

Hello  ,
   
      i want  two connections to be active at the same time to my home little router (standars commercial lynksys model)

      i have  the eth1 interface  and  wlan0 interface

      i have put a configuration files under /etc/network.d   for  each of them

      when i  connect   by netcfg command   , one of them alone , they both work  , and i get the access  to the internet

      if  i try to connect both , with the first everithing is fine . with the second i get from netcfg  the following message:
     

  RTNETLINK answers: File exists
                 > Adding gateway 192.168.0.1 failed 
      

     
      PS i am using the same gateway address on both the interfaces , because they aim to the same router
            the configuration are both  static IP

     this is my first post i am a noob to Arch

Last edited by shadenzo (2011-05-27 04:41:29)

Offline

#2 2011-05-26 23:25:04

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED ] netcfg : can't get two connnections to the same router

Yeah, bad idea... You'll end up with all sorts of asymmetric routing problems and confuse the poor little Linksys.

What are you trying to achieve by establishing parallel connections?

EDIT: wrong terminology.

Last edited by fukawi2 (2011-05-27 04:16:11)

Offline

#3 2011-05-27 03:56:53

shadenzo
Member
Registered: 2011-05-26
Posts: 6

Re: [SOLVED ] netcfg : can't get two connnections to the same router

hello
        i want to achieve  the most basic  of  the automation : when boot up connect with both interfaces , then if one is unavailable (e.g. ethernet unplugged ),
        the other will be operational .
        For the routing : i thought problems like that came from the  network managers that try to automaticly establish connection whenever
        sensing  a change (for example the wireless becomes unavailable ecc)
       
        If  u know some specific routing problem  , please  explain me or put some link  so i can learn about it

       in short  i want to do it because is the most basic automatism

Offline

#4 2011-05-27 04:20:28

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED ] netcfg : can't get two connnections to the same router

Assume the following IP Addresses:

Ethernet: 192.168.0.111
Wireless: 192.168.0.222
Gateway: 192.168.0.1

Routing (your default gateway) is done by IP Address, so when you set your default gateway, how does the kernel decide to use the Ethernet or Wireless connection?

Solution is to set a dev argument to the default route:

ip route replace default gw 192.168.0.1 dev eth0

This forces the traffic for 192.168.0.1 via eth0 (ethernet). If the ethernet connection becomes unavailable, this can no longer work because you've told the kernel to use eth0 for 192.168.0.1.

Using route metrics also won't work.

Also, there's no guarantee which address a packet will be sourced with when it is sent from your computer. It could have the source .222 but be sent via the Ethernet connection. When the return packet comes, the gateway will send it to .222 via the wireless. This is confuse the kernel connection tracking.

It might seem like the "most basic automatism" but it's not. If you're on a mobile platform, I would suggest leaving Network Manager to manage the detection of a failed ethernet and switch to wireless, or use something like netcfg to manage the connection, but allow you to explicitly state which connection to use.

Offline

#5 2011-05-27 04:40:31

shadenzo
Member
Registered: 2011-05-26
Posts: 6

Re: [SOLVED ] netcfg : can't get two connnections to the same router

hello 
    Ok seems i have to give up because it's impossible hmm
     well u can't have everything  smile

     thanks  for the detailed reply fukawy2 : i'd  like to learn more about routing kernel mechanisms (the basics)
      if u have some link it would be appreciated


i consider the topic solved 

  (the terminology is not correct sorry but i am not english )

   thanks

Offline

#6 2011-05-27 08:02:25

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED ] netcfg : can't get two connnections to the same router

I don't have any links sorry... I learnt most of this information from a very wise and experienced guy I used to work with. We call him "Yoda". You get that when you're the guy who physically connected the first internet connection in Australia (many years ago) wink

Offline

Board footer

Powered by FluxBB