Re: select ethernet card for socket?



smallpond wrote:
Susanne West wrote:



how can i select an specific ethernet card for a
socket, when i have multiple ethernet-cards (lan,
wireless) installed?

i have two cards, configured for two different subnets:
wireless: 192.168.50.x
lan: 2.1.1.x
and want to open a socket and broadcast to 2.1.1.x but
without touching the wireless-settings. currently, i
do:

----------------------------------------------
my $sendsocket = new IO::Socket::INET(
LocalHost => '2.1.1.1',
LocalPort => '6454',
PeerAddr => '2.255.255.255',
PeerPort => '6454',
Proto => 'udp',
Broadcast => 1
) || die "[ERROR CREATING SOCKET] $!\n";
$sendsocket->sockopt(SO_BROADCAST, 1);
----------------------------------------------

which causes the wireless-connection to collapse...
i guess i can do something with 'bind' but can't
figure out how to identify the correct card...


thanks a ton!



Is your LAN really class A or should your broadcast address be 2.1.1.255?

Try first to create a socket without the broadcast to see if that is
somehow causing havoc.

-S
** Posted from http://www.teranews.com **


for those reading along: i solved the problem which was falsly
identified on the perl level. instead there was another script
that added a gateway to the lan card in question. as soon as that
gateway was added, the binding sequence of the cards kicked in,
routing everything through that (wrong) first gateway into 2.1.1.x

in this case, setting up the cards with
- ip
- subnet
and a gateway for the wireless adapter was enough...

thanks anyhow smallpond.

.



Relevant Pages

  • Re: wifi on Toshiba 1800
    ... Some of the early Toshiba lan products didn't even support "long key" WEP encryption in 802.11b, but rather only "short key" encryption. ... the Orinico cards, and if they are based on the the Orinoco "silver" technology, they are going to be problematic; the later and higher cost Orinoco "Gold" cards were much better, as were some still later lucent cards based on later technology. ... However, if this is one of the old Toshiba cards based on the Orinoco Silver technology, those cards hard some built-in hardware limitations that were quite serious. ... The Toshiba Wireless LAN Client Manager sees my wireless network ok, shows a good signal, and even shows the right MAC address of the access point. ...
    (comp.sys.laptops)
  • Re: [SLE] Wireless LAN
    ... I was wondering whether a wireless LAN might be an easy way to ... I've just got a Wireless lan working with 9.0 SuSE. ... Wireless cards, ... card doesn't use the Broadcom chipset and everything should work. ...
    (SuSE)
  • Re: select ethernet card for socket?
    ... socket, when i have multiple ethernet-cards (lan, ... wireless: 192.168.50.x ...
    (comp.lang.perl.misc)
  • select ethernet card for socket?
    ... socket, when i have multiple ethernet-cards (lan, ... wireless: 192.168.50.x ...
    (comp.lang.perl.misc)
  • Re: 3 PC SOHO Network setup problem
    ... >>>so security on the wireless side is not a major concern. ... >>>Our internet connection is via a cable modem connected directly to the ... >> only by the Guest account, which means this computer will be open to anyone. ... >> LAN where you wish to access all files. ...
    (microsoft.public.windowsxp.network_web)