none
two nics, seperate traffic on same network

    Question

  • hi,

    i have two nics in a server.  it responds to customer requests from the internet and i want all this to be still done on nic 1

    the issue is that i have an sql backend that the server connects to.  when i launch a console of the application i would like it to send traffic using the second nic

    for example the first 2 nics would be 192.168.1.10 & 192.168.1.11

    the sql server would be 192.168.1.20 and i would like all traffic from the server to come from 192.168.1.11 and NOT 192.168.1.10

    the reason is because we need to rate limit one of the nics but it breaks the application.

    any help appreciated.

    thanks


    phill

    Sunday, September 08, 2013 7:02 AM

Answers

  • So in your example the nic with 192.168.1.10 is presumably configured with the gateway address of your network, and therefore traffic goes out from it by default, while the nic with 192.168.1.11 presumably doesn't have the gateway since that would obviously be an invalid config.

    I'd suggest first of all that both nics configured on the same subnet is likely to cause issues, and you should therefore avoid that setup. In theory I think you might be able to do what you're looking for using a static route, which then forces traffic to that IP over the specific NIC. Something like :

    route add 192.168.1.20 MASK 255.255.255.255 192.168.1.11

    but I'm not certain that would work, and can't easily test it from here.

    Perhaps a better solution, especially if the SQL server also has a second NIC is to set them up on a second subnet. So change nic2 from 192.168.1.11/255.255.255.0 to 192.168.2.11/255.255.255.0 and set the SQL server (or its second nic) to be on 192.168.2.20.

    Normal traffic for the 192.168.1.x range will continue to go via nic1, non-local traffic will continue to go via nic1 since that has the gateway configured on it, but traffic for anything on 192.168.2.x will go via nic2 since it's seen as local to that nic and doesn't require the gateway.

    Sunday, September 08, 2013 8:53 AM

All replies

  • So in your example the nic with 192.168.1.10 is presumably configured with the gateway address of your network, and therefore traffic goes out from it by default, while the nic with 192.168.1.11 presumably doesn't have the gateway since that would obviously be an invalid config.

    I'd suggest first of all that both nics configured on the same subnet is likely to cause issues, and you should therefore avoid that setup. In theory I think you might be able to do what you're looking for using a static route, which then forces traffic to that IP over the specific NIC. Something like :

    route add 192.168.1.20 MASK 255.255.255.255 192.168.1.11

    but I'm not certain that would work, and can't easily test it from here.

    Perhaps a better solution, especially if the SQL server also has a second NIC is to set them up on a second subnet. So change nic2 from 192.168.1.11/255.255.255.0 to 192.168.2.11/255.255.255.0 and set the SQL server (or its second nic) to be on 192.168.2.20.

    Normal traffic for the 192.168.1.x range will continue to go via nic1, non-local traffic will continue to go via nic1 since that has the gateway configured on it, but traffic for anything on 192.168.2.x will go via nic2 since it's seen as local to that nic and doesn't require the gateway.

    Sunday, September 08, 2013 8:53 AM
  • Hello,

    for Networking questions please ask in http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverNIS&filter=alltypes&sort=lastpostdesc as this forum is related to Windows server General questions.


    Best regards

    Meinolf Weber
    MVP, MCP, MCTS
    Microsoft MVP - Directory Services
    My Blog: http://msmvps.com/blogs/mweber/

    Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.

    • Proposed as answer by Mr XMVP Sunday, September 08, 2013 5:20 PM
    Sunday, September 08, 2013 5:14 PM