You are not logged in.

#1 2007-06-09 03:04:37

mcrae
Member
From: Brunswick, GA
Registered: 2006-06-21
Posts: 88

have ip on wlan but can't ping [SOLVED]

I recently installed bcm43xx and can scan networks - pick up mine as well as a couple of the neighbors.
I have an ip address for my static wired route which is eth0. I have an ip for my wlan which is eth1.
My problem is that I cannot connect to the net via wlan(eth1). I've tried pinging by name and by ip. I can't ping my router.

My output for route -n is below. this is with wlan (eth1) being set as static.

[mcrae@SLT ~]$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0

Here is route -n using dhcp for wlan (eth1)

[mcrae@SLT ~]$ ifconfig[root@SLT mcrae]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth1


This is the output of ifconfig (eth1 is my wlan)


eth0      Link encap:Ethernet  HWaddr 00:15:C5:03:FA:32
          inet addr:192.168.0.102  Bcast:192.168.0.255  Mask:255.255.255.0
          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:18

eth1      Link encap:Ethernet  HWaddr 00:16:CE:22:81:09
          inet addr:192.168.0.102  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::216:ceff:fe22:8109/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:163 errors:0 dropped:13 overruns:0 frame:0
          TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:42823 (41.8 Kb)  TX bytes:1684 (1.6 Kb)
          Interrupt:4

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:38 errors:0 dropped:0 overruns:0 frame:0
          TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2584 (2.5 Kb)  TX bytes:2584 (2.5 K



Here is my rc.conf with wlan as static.


HOSTNAME="SLT"

(eth0="dhcp")
lo="lo 127.0.0.1"
eth0="eth0 192.168.0.102 netmask 255.255.255.0 broadcast 192.168.0.255"
eth1="eth1 192.168.0.102 netmask 255.255.255.0 broadcast 192.168.0.255"
#eth1="dhcp"
wlan_eth1="eth1 essid ch5884 key s:mypasswd"
WLAN_INTERFACES=(eth1)
INTERFACES=(lo eth0 eth1)

gateway="default gw 192.168.0.1"
ROUTES=(gateway)

So I have an ip but cannot ping my router or anything else  -  so no connection to the internet.

Where have I gone wrong?

As always thanks,
McRae

Last edited by mcrae (2007-06-11 21:21:18)

Offline

#2 2007-06-09 04:30:57

hacosta
Member
From: Mexico
Registered: 2006-10-22
Posts: 423

Re: have ip on wlan but can't ping [SOLVED]

well for one thing both cards should have different ip addresses.. that siad i usually can't connect to anything if both connections are active, i have to stop one

Offline

#3 2007-06-09 13:45:18

mcrae
Member
From: Brunswick, GA
Registered: 2006-06-21
Posts: 88

Re: have ip on wlan but can't ping [SOLVED]

I've been using dhcp with eth1 (wlan). I just gave it a static ip to see if it was a route issue.
How do you "stop one"? You don't actually comment out one of the connections each time........no it couldn't be that clunky.LOL

mcrae

Last edited by mcrae (2007-06-09 13:46:19)

Offline

#4 2007-06-09 15:32:29

Snarkout
Member
Registered: 2005-11-13
Posts: 542

Re: have ip on wlan but can't ping [SOLVED]

[mcrae@SLT ~]$ ifconfig[root@SLT mcrae]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth1

No matter how you slice it, this willcause problems.  A static routing table runs from top to bottom - imagine it's like one of those games with chutes and ramps you drop marbles into - the marble falls into the first hole it fits into on the left, and pops out the corresponding hole on the right - first match "wins."  In every single case here, eth0 will get the packet since you have duplicate routes setup.  If it's bound for your local network (192.168.0.0/24) it will be routed out eth0.  If it's bound for anything else, it will be routed out eth0.

You might take a look at /etc/network-profiles/template to see if that does what you want.  Otherwise there are several applets that handle network interfaces - I tend to use networkmanager on my lappys.

Last edited by Snarkout (2007-06-09 16:08:31)


Unthinking respect for authority is the greatest enemy of truth.
-Albert Einstein

Offline

#5 2007-06-09 19:19:12

mcrae
Member
From: Brunswick, GA
Registered: 2006-06-21
Posts: 88

Re: have ip on wlan but can't ping [SOLVED]

Snarkout, thanks for the education:) I'll check it out and post back as solved this evening. I just can't seem to get my arms around networking so I really do appreciate you breaking down for me.

I did notice that after reading what hacosta said I commented out all references to eth0 but I didn't run route to see what it said. I still could not ping anything though.

I'll look at what you pointed -

Thanks Again,
McRae

Offline

#6 2007-06-10 05:36:09

hungsonbk
Member
Registered: 2007-05-26
Posts: 105
Website

Re: have ip on wlan but can't ping [SOLVED]

big_smile:D:D:D Two interface cards in the same subnet up at the same time and obviously you will have problem.

Do a test like this:
1. Shutdow two interface card:
#ifconfig eth0 down
#ifconfig eth1 down

2.Set up Ip address for your wireless card:
#ifconfig eth1 192.168.0.102 netmask 255.255.255.0 up

3. Set up the default gw:
#route add default gw 192.168.0.1

make sure you set up your wireless card correctly with iwconfig command.
Edit /etc/resolv.conf to put your DNS server address.

Ping the gateway to check again.

Cheers.

Offline

#7 2007-06-10 16:01:35

Snarkout
Member
Registered: 2005-11-13
Posts: 542

Re: have ip on wlan but can't ping [SOLVED]

I'd imagine that falls under the category of "clunky."


Unthinking respect for authority is the greatest enemy of truth.
-Albert Einstein

Offline

#8 2007-06-11 21:20:23

mcrae
Member
From: Brunswick, GA
Registered: 2006-06-21
Posts: 88

Re: have ip on wlan but can't ping [SOLVED]

Sorry I didn't get back here more quickly....

OK, so when I commented out EVERYTHING regarding eth0 I was able to have wireless (eth1). So it is solved - but is more of a different issue now.
I appreciate all the help - as I now know it does work.

Now, I'd like to set up a smooth way of having wireless when I disconnect, or pull the cable out of eth0. So I'm off to google and search......of course I want a non "clunky" way of doing this:P You guys busting on me for saying clunky hehehe.

I'll mark this as solved.

Thanks Again,
McRae

Offline

#9 2007-06-12 08:14:34

hacosta
Member
From: Mexico
Registered: 2006-10-22
Posts: 423

Re: have ip on wlan but can't ping [SOLVED]

networkmanager+{k,g}networkmanager

Offline

#10 2007-06-12 17:14:44

Snarkout
Member
Registered: 2005-11-13
Posts: 542

Re: have ip on wlan but can't ping [SOLVED]

hacosta wrote:

networkmanager+{k,g}networkmanager

Yeah, these are my faves if I don't feel like hitting the cmd line.  The more recent versions of knetworkmanager are really pretty nice.


Unthinking respect for authority is the greatest enemy of truth.
-Albert Einstein

Offline

Board footer

Powered by FluxBB