We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

PuTTY - Multiple Network Cards

Medium Priority
4,286 Views
Last Modified: 2013-11-09
Hi,

We are using PuTTY in a Windows 2000 environment and were wondering if there is a way to bind PuTTY to a specific network card/address if a workstation has more than one installed?

Thanks.
Comment
Watch Question

Joseph HornseyDirector of IT & Infrastructure
CERTIFIED EXPERT

Commented:
Crestlne,

Actually, there's no way to do that within PuTTY (or even within Windows... you can't "bind" a specific app to a specific NIC... the app has to be written with multi-homed support in mind).  However, if Windows is configured correctly, it should still behave the way you want it to.

Here's what I mean:

When you've got a multi-homed Windows 2000 box, it is going to route traffic on the appropriate network interface based on the destination it is trying to reach.  So, if NIC1 is connected to a network segment with a network ID of 192.168.40.0/24 and NIC2 is connected to 192.168.35.0/24 and you are using PuTTY to connect to a destination IP address of 192.168.35.66, then Windows will automatically use NIC2 to connect to the destination box.  The only problem you'll run into is if you have to do routing.  If that's the case, let me know and I can give you a couple of pointers.

<-=+=->

Author

Commented:
Thanks for the quick response!

Ok, that's what we kind of figured.  The nics are on seperate local networks but both have access out to the net.  We were hoping to be able to direct the PuTTY traffic to go out through a set internet connection.  Is this something we could achieve via routing?  Like route a port to a certain network?
Director of IT & Infrastructure
CERTIFIED EXPERT
Commented:

Well, routing is a layer 3 function (IP layer) whereas ports are an Application layer function.  So, you're not going to be able to route by port, per se.

IMHO, the best way to configure a computer that has multiple NICs, is with one default gateway and then static routes.  In either case, all you need to do is define a static route for the destination network and then all of your traffic will go via that route (including, but not limited to PuTTY).

Example:



   ((INTERNET))------------[Router A]----------------[PC]--------------[Router B]--------((INTERNET))

Let's say that Router A's inside address is 192.168.10.1 and the PC's NIC on that network has an IP address of 192.168.10.15 and the subnet mask is 255.255.255.0
Router B's inside address is 192.168.20.1 and the PC's NIC on that network has an IP address of 192.168.20.38 and the subnet mask is 255.255.255.0
The host you want to connect to with PuTTY has a destination IP address of 37.45.85.119 and you want to connect through the internet connection on Router B
You want the rest of the traffic to go through router A.

Here's how you configure the PC:

1. Set the default gateway of the NIC connected to Router A's network to 192.168.10.1 (Router A's inside address)
2. Clear the default gateway of the other NIC (it's never recommended to have two default gateways)
3. Go to a command prompt and add a route for the destination:
        route add 37.45.85.119 mask 255.255.255.255 192.168.20.38 -p
The -p makes it a "persistent route" so that it remains after you reboot.

Now all traffic to that destination address will always go through router B.  You can do this without changing your default gateways, too.

Hope that helps.  Let me know what you think.

<-=+=->

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
Thanks Splinter.  I will be awarding you the points.

I haven't actually got it to work using your method above, but I'm assuming it's something I am missing.  
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.