Question Locked

Traversing subnets without a default gateway

0 helpful
8 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hello,

I don't know that there is any way to get around my problem, but I figured this is the place to ask.

I have a computer with two NICs on the same subnet: NIC1 is 192.168.1.x and NIC2 is 192.168.1.y. NIC2 does not have a default gateway defined, so all of my day-to-day traffic goes out over NIC1.

I have a small HTTP file server running which people connect to via NIC2 (192.168.1.y). This way my main NIC is never clogged with traffic from those file transfers.

So far so good.

The problem, and an obvious one, is that if someone connects to NIC2 from another subnet, NIC2 can't respond back to them because it has no default gateway.

Any ideas on how to get around this? In the end, I want all file transfer traffic from that HTTP file server to go out over NIC2, but I would like people from other subnets to be able to reach it.

8 replies

by shasca

It doesn't seem possible, but I won't say that for sure until I see others remarks.
Because.....
"I don't know what I don't know".

by tmalo627

you can enable routing and remote access and configure NIC 2 to route its outgoing traffic through NIC 1.

by barth.travis

I can see how that would work, but I want none of NIC2's traffic to go over NIC1. I wan't the file transfers on NIC2 to have no impact on NIC1, which is how it works now, but only for the local subnet.

by barth.travis

That setup is working just fine now. People connect to NIC2 on port 80 and are able to download files. All of that traffic goes over NIC2.

IF they are on the same subnet.

*This* question is about getting it to work if they are connection from a different subnet. I don't expect to find an answer, but I don't give up without at least asking. As someone else already said, "I don't know what I don't know." Never hurts to ask!

Thanks for the reply.

EDIT: There is already a router in the mix. That's how people from the other subnet are getting to this machine in the first place. However, NIC2 can't connect back to them because of it' s lack of a default gateway. I can see the packets being forwarded through the router to this machine, they just never come back.

by scott_heath

Add a gateway. It's just that easy. If you want your personal traffic to go out NIC1 make the default route on your system go to NIC1.

Traffic that comes in NIC2 shouldn't jump to NIC1 any more than it would if you had an IP address from another subnet.

Regards,
Scott

http://scottisageek.spaces.live.com

by barth.travis

Hi Scott,

I like this answer, but I've always thought that having two NICs with default gateways on the same subnet caused problems...? I understand that traffic that contacts NIC2 will be returned over NIC2, but how is traffic generated on the local machine handled in regards to which NIC it uses on the way out? If that's the default route you are referring to defining, I just don't know how to do it. It sounds ideal though!

This discussion is closed to new replies.