Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]2 nics, 1 wan, 1 lan, starting lan kills internet!
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
w0lf23
n00b
n00b


Joined: 27 Jul 2005
Posts: 3

PostPosted: Wed Jul 27, 2005 9:58 pm    Post subject: [SOLVED]2 nics, 1 wan, 1 lan, starting lan kills internet! Reply with quote

Hello!

I'm kind of new to gentoo and i got a very weird problem here!

I have 2 nics! one that connects to the internet over wireless lan (acx100 chipset, wlan0) and the other one to connect to the other computers(eth1).

OK .... so, let's begin, ... i use the start_net script from the acx100 package and it works just fine .... connecting to AP and get ip adress and voila ... i got internet ...

ok ... now here comes the deal:

Code:
ifconfig eth1 up


and no internet anymore :(

here is "route" before starting eth1:

Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 wlan0
loopback        localhost       255.0.0.0       UG    0      0        0 lo
default         192.168.0.1     0.0.0.0         UG    0      0        0 wlan0


"ifconfig" before starting eth1:
Code:
lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          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)

wlan0     Link encap:Ethernet  HWaddr 00:0F:3D:56:BF:5E 
          inet addr:192.168.0.3  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:624 errors:0 dropped:0 overruns:0 frame:0
          TX packets:518 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:600638 (586.5 Kb)  TX bytes:93081 (90.8 Kb)
          Interrupt:11 Base address:0xa000



now "etc/init.d/net.eth1 start" ... for starting the lan ... static ip 192.168.0.1 .... and so on ...

Code:
eth1      Link encap:Ethernet  HWaddr 00:4F:4E:03:CD:7D 
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING 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:11 Base address:0xcc00

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1216 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1216 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:74176 (72.4 Kb)  TX bytes:74176 (72.4 Kb)

wlan0     Link encap:Ethernet  HWaddr 00:0F:3D:56:BF:5E 
          inet addr:192.168.0.3  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:643 errors:0 dropped:0 overruns:0 frame:0
          TX packets:518 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:602713 (588.5 Kb)  TX bytes:93081 (90.8 Kb)
          Interrupt:11 Base address:0xa000

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 wlan0
192.168.0.0     *               255.255.255.0   U     0      0        0 eth1
loopback        localhost       255.0.0.0       UG    0      0        0 lo
default         192.168.0.1     0.0.0.0         UG    0      0        0 wlan0


as you can see ... the only gateway is 192.168.01 from wlan0 .... so WHERE IS THE PROBLEM THEN?=??? nothings changed ...

some more info's:
"iwconfig" .... stays the same .. before and after starting eth1
Code:
wlan0     IEEE 802.11b+/g+  ESSID:off/any  Nickname:"acx100 v0.2.0pre8"
          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:09:5B:88:DE:F0   
          Bit Rate:11 Mb/s   Tx-Power=15 dBm   Sensitivity=1/3 
          Retry min limit:7   RTS thr:off   
          Encryption key:off
          Power Management:off
          Link Quality=39/100  Signal level=14/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0


Ok .... I tested a lot of things ... and it seems to be either something with the Kernel IP routing tables ... or the script that is provided by the package i downloada from sourceforge (acx100.sourceforge.net) .... but ... if don't have a clue ... because the internet is ONLY working with this script provided by this package (i DIDN'T "emerg acx100" because i wanted the newest drivers ... tried acx100 from portage too ... same problem ...) ... when i modprobe the module manually and dhcpcd wlan0 nothings working ... the scripts do something different then ... i dont want to post the script here, it's too long!

BUT I'M SURE .. the problem is with the 2 nics at the same time that the system doesn't know what nic is to take for the internet?!?...

please help me ... this is freakin me out!!!

god bless!

*EDIT*

BTW: i followed one of the docs about the HOME ROUTER GUIDE ... but this should not matter ... because i had the same problems before that!!!


Last edited by w0lf23 on Thu Jul 28, 2005 9:12 am; edited 1 time in total
Back to top
View user's profile Send private message
dgaffuri
Advocate
Advocate


Joined: 05 Jun 2005
Posts: 2078
Location: Italy

PostPosted: Wed Jul 27, 2005 10:13 pm    Post subject: Re: 2 nics, 1 wan, 1 lan, starting lan kills internet!!! Reply with quote

w0lf23 wrote:
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 wlan0
loopback        localhost       255.0.0.0       UG    0      0        0 lo
default         192.168.0.1     0.0.0.0         UG    0      0        0 wlan0

wlan0     Link encap:Ethernet  HWaddr 00:0F:3D:56:BF:5E 
          inet addr:192.168.0.3  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:624 errors:0 dropped:0 overruns:0 frame:0
          TX packets:518 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:600638 (586.5 Kb)  TX bytes:93081 (90.8 Kb)
          Interrupt:11 Base address:0xa000


If I'm understanding well 192.168.0.3 is your wlan, and 192.168.0.1 is the default gateway (a router?)

w0lf23 wrote:
now "etc/init.d/net.eth1 start" ... for starting the lan ... static ip 192.168.0.1 .... and so on ...

Code:
eth1      Link encap:Ethernet  HWaddr 00:4F:4E:03:CD:7D 
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING 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:11 Base address:0xcc00

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 wlan0
192.168.0.0     *               255.255.255.0   U     0      0        0 eth1
loopback        localhost       255.0.0.0       UG    0      0        0 lo
default         192.168.0.1     0.0.0.0         UG    0      0        0 wlan0


You start eth1 with the same address as your default gateway.

Finally, it's not clear if wlan0 and eth1 are on the same physical Eternet. If not, you have to use differents subnets for them.
Back to top
View user's profile Send private message
GordSki
Guru
Guru


Joined: 18 Oct 2004
Posts: 329

PostPosted: Wed Jul 27, 2005 10:13 pm    Post subject: Reply with quote

because you've got both your IPs on the same subnet 192.168.0.X your box doesn't know which interface to put packets addressed to a 192.168.0.X address on. The simple way to fix this is to change one of your set of IP to be 192.168.1.X and the other to be 192.168.0.X

Hope this helps!

EDIT: Too slow with my post :(

EDIT Again: It does look like your WLAN and LAN nics are on different physical (ehternet) connections, so you do need to have a different IP subnet for each of them. Otherwise packets would leave your WLAN interface and end up back at your LAN (192.168.0.1) one :D

G.
Back to top
View user's profile Send private message
w0lf23
n00b
n00b


Joined: 27 Jul 2005
Posts: 3

PostPosted: Thu Jul 28, 2005 9:10 am    Post subject: Reply with quote

Hello!

THanks for your fast reply ... but i fell asleep ...

You were both right ... though it makes ABSOLUTELY no sens!!!! i have 2 physical networks ok!!! both have 192.168.0.0/0 subnet .... this should work with no problem?!? ....

what i was trying to build was a router, behind a router! .... now i solved the problem ... the first network to the netgear router is 192.168.0.0/255.255.255.0 and the network behind is 10.10.20.0/255.255.255.192 /i thought about making the subnet even smaller ... but that's ok ;))

and another weird thing is that i just changed the subnet and EVERYTHINGS working now ... i got internet and dhcp(changed settings here of course!) and dns behind my new router!!! WITHOUT changing iptables settings?!?! ... *mhm* ... well ... it's working ...

thanks a lot!

SOLVED
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