# Gentoo router not playing nice with Windows... [SOLVED]

## shepmaster

Hey all:

Just got a good deal of a 3-pk of Compaq 3131 dual-port NICs from eBay ($19 total). I installed all three into my Gentoo box, and modprobed the kernel with e100. All seemed to be fine, and after some setup, I currently have my Mac and Linksys wireless router running under this router. However, my Windows computer and (I think) my roommates Windows computer do not seem to be able to connect. The link lights on the NIC do not even turn on, and Windows reports that no cable is connected. This is a previoulsy working cable, but I switched it anyway, and switched the ports, but no good. Plugging the Mac or Linksys into the same ports works.

Please tell me someone has any ideas!

-shep

PS: I'll post whatever data we need, but I'll just start with ifconfig -a:

```

lan0      Link encap:Ethernet  HWaddr 00:50:8B:CF:39:B7  

          inet addr:192.168.3.1  Bcast:192.168.3.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:720860 errors:0 dropped:0 overruns:31 frame:31

          TX packets:399810 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:1008703934 (961.9 Mb)  TX bytes:168226377 (160.4 Mb)

lan1      Link encap:Ethernet  HWaddr 00:50:8B:E3:8A:A0  

          inet addr:192.168.3.2  Bcast:192.168.3.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)

lan2      Link encap:Ethernet  HWaddr 00:50:8B:E3:8A:A1  

          inet addr:192.168.3.3  Bcast:192.168.3.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:205 errors:0 dropped:0 overruns:0 frame:0

          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:15222 (14.8 Kb)  TX bytes:810 (810.0 b)

lan3      Link encap:Ethernet  HWaddr 00:50:8B:CF:31:6E  

          inet addr:192.168.3.4  Bcast:192.168.3.255  Mask:255.255.255.0

          UP BROADCAST NOTRAILERS 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)

lan4      Link encap:Ethernet  HWaddr 00:50:8B:CF:31:6F  

          BROADCAST NOTRAILERS 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)

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:1725 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1725 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:3360345 (3.2 Mb)  TX bytes:3360345 (3.2 Mb)

wan       Link encap:Ethernet  HWaddr 00:50:8B:CF:39:B6  

          inet addr:xxx.xxx.xxx.xxx  Bcast:255.255.255.255  Mask:255.255.254.0

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:241811 errors:0 dropped:0 overruns:0 frame:0

          TX packets:9610 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:22371663 (21.3 Mb)  TX bytes:1150327 (1.0 Mb)

```

Last edited by shepmaster on Wed Jan 18, 2006 4:15 am; edited 1 time in total

----------

## oizone

You need a crossover cable when connecting two NICs together.

The Mac must have an autosensing MDI/MDIX port if it works there with a straight cable.

----------

## CriminalMastermind

 *shepmaster wrote:*   

> Please tell me someone has any ideas!

 

are you connecting directly from your windows into your linux box?  (ie, not using a hub or switch)

if so, have you tried using a cross over cable?

every mac i've played with will automaticaly detect if a cross over cable is needed and switch it's ethernet port over if needed in the back ground (meaning they don't need a cross over cable).  i think my linksys router does the same (but i'm not too sure on that).

if you don't have a cross over cable, you could put a hub or switch between them and see if that works.

hope that helps.

----------

## Sheepdogj15

yeah, make sure you are using crossover cables. or, if you already sunk the money into CAT-5 cables, you can get an adapter (i use two of these at home)

more importantly, you should understand that a router segments a network into separate subnets. now, we've been spoiled with Linksys routers and the like... they are probably better understood as combination router/switches or firewall/switches. unless specifically configured otherwise, a true router expects each port to go to a different network, complete with it's own net IP and subnet mask. so you have LAN1 on 192.168.3.1, LAN2: 192.168.3.2, etc... what you want is to have something like LAN1: 192.168.1.0, LAN2: 192.168.2.0, etc. 

now, there is supposed to be a way to set up switching so you'd have one port out to the Internet and the rest are on the same subnet. i have a Linux router i recently setup myself. however, i haven't figured out how to actually set something like that up yet.

----------

## shepmaster

Thanks for all the suggestions. I originally thought it might be a crossover versus straight-through cable issue, but since the Linksys worked, I was thinking these NICs had the auto-detect. I wasn't aware that Linksys had the auto-detect. As for the Mac, it has a gigabit port, which I know auto-detects. I'll look into getting a few of the aforementioned adapters to hook up the Windows computers.

----------

## shepmaster

 *Sheepdogj15 wrote:*   

> 
> 
> more importantly, you should understand that a router segments a network into separate subnets. now, we've been spoiled with Linksys routers and the like... they are probably better understood as combination router/switches or firewall/switches. unless specifically configured otherwise, a true router expects each port to go to a different network, complete with it's own net IP and subnet mask. so you have LAN1 on 192.168.3.1, LAN2: 192.168.3.2, etc... what you want is to have something like LAN1: 192.168.1.0, LAN2: 192.168.2.0, etc. 
> 
> now, there is supposed to be a way to set up switching so you'd have one port out to the Internet and the rest are on the same subnet. i have a Linux router i recently setup myself. however, i haven't figured out how to actually set something like that up yet.

 

Currently, my setup seems to work, and I much prefer to have everything on the same subnet (mostly for remembering addresses between different computers). The router simply is set as having 5 seperate interfaces to the LAN, with each device connected to each interface. This is why lan0-4 has addresses 192.168.3.1-5. My DHCP is set to serve addresses 192.168.3.30-50, and I have a few computers that always get the same address in the 192.168.3.10-20 range.

My basic goal is not to segment everything, but mostly so I can have per-interface speeds, so I can see how much bandwidth my roommate is using.

Is there some really good reason to not do what I am doing?

Thanks!

----------

## Sheepdogj15

 *Quote:*   

> Is there some really good reason to not do what I am doing? 

 

well when i attempted a similar setup, i could only get traffic on the internet interface and one other interface at a time.   :Confused:  after monkeying with it for Bob knows how long, i changed how i had it configured so that i had separate subnets. (i only have two other computers-- yeah, a bit extraneous, but if it's fixed don't break it   :Laughing: ) after that i had no problems

it is possible that there was a problem in my configuration that i missed and was the culprit. if you do get the other computers working on it fine, let us know... i'd like to see how you have it configured.

----------

## shepmaster

 *Sheepdogj15 wrote:*   

> it is possible that there was a problem in my configuration that i missed and was the culprit. if you do get the other computers working on it fine, let us know... i'd like to see how you have it configured.

 

Sure thing. I just ordered a set of 1-foot CAT6 cables and accompanying crossover couplers, so once those get here I can test the Windows computers. Right now, the Mac definitely has net access, and I'm 95% certain that the Linksys does too. When I get home, I'll switch my Mac from the wired port to the wireless one (via Linksys) to double check. I'll report back then.

On the side, I've installed SNMP and MRTG, as well as a firewall log analyzer and command-line bandwidth monitoring, and I'm having quite a bit of fun with all of this.

Thanks again!

----------

## splooge

 *shepmaster wrote:*   

> Is there some really good reason to not do what I am doing?
> 
> Thanks!

 

Yeah, there's a really great reason not to.  Because you can't just magically split one logical subnet over 5 different physical interfaces.  You'll break routing on your server.

The above poster is right, you're going to need 5 subnets, as routing is done on a subnet basis.

----------

## daeghrefn

If you simply want to monitor only the one machine, put it on a single interface with a specific subnet.  Put the others onto a switch/hub and then plug it into the other interface.  I'd be willing to bet that even with 4 machines going through a single 10/100 pipe to the switch/hub that you aren't using enough bandwidth to require "per-interface bandwidth".  You simply could track your bandwidth usage, and if necessary split the 4 machines from 1 subnet/interface to two separate subnets/interfaces.

Personally, I would use shorewall to configure the routing/NAT/MASQ on that sort of a setup.  But then again, I really like Shorewall.

You might have to create a bridge including every interface to get them all to talk... but I think you will still need 1 subnet per interface.  Sounds like a lot of complications for something so simple...

----------

## shepmaster

 *splooge wrote:*   

> The above poster is right, you're going to need 5 subnets, as routing is done on a subnet basis.

 

I guess I found that out the hard way. When I tried to bring my other computers online, they didnt seem to quite work. So, I changed each interface to have its own subnet. Not as nice, but it'll do.

 *daeghrefn wrote:*   

> If you simply want to monitor only the one machine, put it on a single interface with a specific subnet

 

I don't really want to monitor just the one, but all of them. Also, I hope to get traffic shaping working, and would want that for each computer. Right now, there is the linux box, a Mac, a Windows box, and my roommate. Being able to configure each seperately and powerfully is what I want. For example, he is using eDonkey, completely saturating my upstream. My next task is to get shaping working.  :Smile: 

Thanks!

----------

## Sheepdogj15

this thread got me interested in the topic again of having >1 interface to a subnet. i just think where  you have a one computer per interface setup, it is simpler to just have them all in the same subnet. plus some applications work better (File/Printer sharing on Window$, for instance)

i was right, you can do this via seting up a bridge. there is a howto in the Wiki here:

http://gentoo-wiki.com/HOWTO_setup_a_gentoo_bridge

i plan on fiddling with it tonight.

then you just have to set up routing between the WAN interface and the bridge. if you use Shorewall, this is as simple as defining br0 and setting up a policy between it and the WAN interface. 

i don't know how well packet shaping/mangling would work with it though.

----------

## shepmaster

Bridging isn't ultra important to me. Mostly the reason I wanted it was so I would have to remember one less number for accessing computers. However, I was thinking I might be able to use DNS for this. I tried putting in entries to the /etc/hosts file to give each computer a name, and it seemed to work on the router computer. However, the attached computers did not seem to like it. Using dig produced results, but ping and Safari didn't want to resolve names like 'mac' or 'linux'.

----------

