View Full Version : Route Specific Ports over different Adapter
superdrumr
01-15-2006, 09:00 PM
So here's an interesting problem i am trying to figure out:
Is it possible send the traffic from certain ports out over different network interfaces.
Background: I am at school living with several of my friends. We have multiple uplinks to the school's network available. One of these runs into a router. Our network is set up between this router (used mainly for transferring files and media between systems and the htpc). We want one of the computers to be able to have a direct connection to the internet for file-sharing purposes (legal only of course) so that the traffic does not degrade the performance of the network or router.
This computer is based on a DFI mainboard with dual ethernet integrated
So the question boils down to this: is it possible to route all of the traffic generated on ports (say 5000-5100) out the secondary interface (and directly to the internet) while routing all other traffic through the primary interface (and through the network/router)
Any help would be greatly appreciated.
superdrumr
01-20-2006, 01:20 AM
anybody got any ideas?
pangea33
01-20-2006, 01:58 AM
If you go into the "Network Connections" section of the control panel, you should see both connections listed. The Options tab of the Advanced TCP/IP settings allows for filtering. This will permit you to configure one connection so that it only allows traffic on certain ports.
Considering that most LAN configurations are running at least 100mbps, and that very few Internet access points can be expected to max out a 10mbps connection, local network performance shouldn't be degraded to any level that would impact you. Additionally, considering the manifold baddies prowling file sharing networks, it would be adviseable to remain behind the limited protection of a NAT router.
You can use the IP forwarding functionality of your router to direct traffic on the port range you mentioned, to the network card designated for this purpose. Since all the traffic still ends up on one machine, I don't see a real advantage to doing this, but I think it's entirely possible.
juniper
01-20-2006, 11:21 AM
I do not think there is an equivilent of a cisco route-map in windows (this allows you to configure certain criteria to change the routing of a packet for instance you could say any TCP packet of this size gets sent out this port instead of using the route table) maybe look in the RRAS documentation. If I understand you correctly however you want cetain packets sent out the second NIC and all else out the primary the easy way to do this is on the primary nic set it to use the internet router as the default gateway and then do a "route add -p x.x.x.x mask x.x.x.x gateway" in the route add statement create a route to the internal network to go out the second NIC this will make all traffic to this network use the second NIC not just ports 5000 ect but it shouldnt matter anyway as it is a local network.
pangea33
01-21-2006, 07:08 AM
As we've seen in an earlier thread, I don't have anything close to your level of networking experience, juniper. I am unfamiliar with the Cisco route-map, but I wasn't trying to describe something that routes traffic based on the size of TCP packets. I was trying to describe the component of XP's network connections that allows you to route traffic based on the specific port number. After researching a little further, it looks like my suggestion isn't robust enough. Evidently, the settings I was talking about, apply to all network interfaces at the same time.
http://teamshocker.com/images/tcpip.gif
juniper
01-21-2006, 02:09 PM
Hmm, dont take this the wrong way pangea33 I did not even comment on your post, Not even sure why you are being defensive towards me? I just replied to the initial question trying to avoid conflict and actualy Im trying to find a polite way to describe this but what you posted has nothing to do with routing. what you posted was the firewall which either allows the packet in or denies it (you can enable and disable this on a per interface basis also, just dont click the enable on all adapters check box). superdrumr is looking for a way to allow the machine to make a routing decision based on the port # basicly if he needs to talk a machine on 192.168.0.0/24 network on port 5000 he wants it to go out the second NIC everything else he wants to go out the first NIC (ie the default gateway). Now with the route add command you can tell the machine to route all 192.168.0.0/24 traffic out NIC 2 and everything else will go out the first NIC the problem is it cant make its routing decision based on port number but he can say all 192.168.0.0/24 traffic go out the other NIC which should be sufficient as why would you want other traffic to the 192.168.0.0/24 network to take a different route? you can see the machines routes by typing "route print" at the command line remove the quotes though. The route-map was just an example meening it is possible to do on a router but not likely on the windows machine unless it is a feature of RRAS (routing and remote access), the route-map is what is used to change the routers routing decision based on more specific information example by packet size, AS #, or by port number.
here is how you read the route print
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.26.1 192.168.26.100 30
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
Default Gateway: 192.168.26.1
0.0.0.0 0.0.0.0 says any traffic not on my lan segment go to the gateway of 192.168.26.1 which is my router, under interface is my NICs IP address so that is the NIC it will take to get there. Now if I had two NICs in my PC I could have a route that says
192.168.0.0 255.255.255.0 go out interface 192.168.26.101 which would be my second NICs IP address since it is a more specific route it will route all 192.168.0.0 network traffic out my second NIC and all other traffic it has no route for it will pass to its default gateway (my router) via the first NIC 192.168.26.100.
pangea33
01-21-2006, 03:15 PM
We're all good, juniper. I was just trying to follow up with a little clarification of my original post. What I initially suggested was off base, and I realized it later. When mentioning my limited networking knowledge, I came across as defensive.
vBulletin v3.6.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.