Results 1 to 8 of 8

Thread: 2 NICS different MTUs

  1. #1

    2 NICS different MTUs

    Is it possible to have 2 NICs, one for internet use with 1500 MTU and the other one for NAS with 9000 MTU?

    Both will be using same router and PC

    Is there a special guide for this?

  2. #2
    Administrator Philip's Avatar
    Join Date
    May 1999
    Location
    Jacksonville, Florida, United States
    Posts
    10,629
    Blog Entries
    6
    You can set different MTU size for different NICs. There are some requirements for larger MTUs - the adapter properties should support jumbo frames, you should be using a gigabit switch that supports jumbo frames as well.

    To make one NIC route to a specific IP, and another to the gateway/internet/other clients is not very difficult if the two NICs are on separate subnets. What makes it a bit harder is you probably want to keep the NAS in the same subnet as all other local network devices, so that it is accessible to everyone on the LAN. This then requires setting a static route.

    Let's say, your router/gateway/DHCP server is at 192.168.0.1, net mask 255.255.255.0 (you can check this in command prompt with: ipconfig /all). Your first adapter, NIC1 is for all traffic, set with DHCP and normal 1500 MTU, second adapter NIC2 is set with 9000 MTU and a static IP. You are using gigabit switch, etc.
    Let's assume your DHCP range is 192.168.0.10-100
    Let's assume your NAS is set to a static IP: 192.168.0.2

    Setup your two NICs.

    First NIC: Let's say it gets some 192.168.0.x IP address via DHCP, netmask 255.255.255.0, default gateway 192.168.0.1
    Your first NIC for all/default traffic should also be set to higher priority, so that default traffic uses it. You can check each NIC priority / metric in the adapter settings, or using this in command prompt: route print (lower metric means higher priority). See: https://www.speedguide.net/faq/how-t...nt-default-350

    Second NIC: You will want to use a static IP outside of DHCP range (so that you can set a static route). Let's say it is set to 192.168.0.205, netmask 255.255.255.0


    Now, you have to specify a static route, so that your NIC2 is used (192.168.0.205 ) to connect to the NAS (192.168.0.2) directly. This can be accomplished with the "route" command in command prompt.

    Before we set the route, you need to note each "interface" and their "metric" again, using command prompt "route print". Let's assume NIC1 is interface "if" 11, and NIC2 is interface 12.
    Then, still in command prompt with the route command, add a new static route to your NIC2 (intrrface 12), something like that:

    route -p ADD destination MASK subnet_mask gateway_ip metric_cost interface

    route -p ADD 192.168.0.2 mask 255.255.255.255 192.168.0.205 IF 11

    In this example, " -p " specifies the route should be persistent (survive reboots), the number " 11 " at the end specifies the interface number of your NIC2. The subnet_mask is 255.255.255.255 because we only want to set a very specific route that affects only this one interface.

    Alternate static route (not using the NIC2 specific interface): route -p add 192.168.0.2 mask 255.255.255.0 192.168.0.205

    You may have to redo this after Windows updates, etc. even though it has the persistent flag set. Alternatively, you can set a batch file to be executed at Windows start to add the route. I hope this helps.
    Linux is user friendly, it's just picky about its friends...
    Disclaimer: Please use caution when opening messages, my grasp on reality may have shaken loose during transmission (going on rusty memory circuits).
    ๑۩۞۩๑

  3. #3
    OMG! Its so confusing.

    Is there a software that could do this? Maybe an app in Synology NAS?

    Can you recommend a good switch?

    I still do need to connect the switch to my router right?

  4. #4
    Can you guide on how I connect my devices?

    ONU(bridge) - Router(1500) - Switch(9000) - NIC1(1500) - NIC2(9000) - NAS(9000)

  5. #5
    Administrator Philip's Avatar
    Join Date
    May 1999
    Location
    Jacksonville, Florida, United States
    Posts
    10,629
    Blog Entries
    6
    ONU(bridge) - Router(1500) - Switch(9000) - NICS/NAS

    The gigabit switch is just like an extension to the router's LAN ports, so you can connect NIC1 to either the switch or the router's ports, doesn't matter. NIC2 and NAS need to be connected to a gigabit switch that supports jumbo frames, like Netgear GS108 or GS105, for example. Some routers may have gigabit LAN ports too.

    It sounds more confusing than it is. You just have to add a static route, so your machine knows which NIC to use for the NAS. Alternatively, you can just enable jumbo frames on your NIC1, and don't worry about NIC2 at all. In this case, your router will automatically scale down to 1500 MTU for internet traffic, and you will still have the benefit of higher throughput to your NAS without adding a second NIC and defining static routes. That's what I do, actually, for simplicity and because I only have one NIC on my main PC.

  6. #6
    Oh I see. My concern right now is packet fragmentation as you have discussed in optimizing internet connection

  7. #7
    Administrator Philip's Avatar
    Join Date
    May 1999
    Location
    Jacksonville, Florida, United States
    Posts
    10,629
    Blog Entries
    6
    NAT routers have to change packet headers (source/destination IP, etc.) anyway. Adding the extra task of fragmenting outgoing packets from jumbo frames to fit 1500-byte MTU may add another millisecond of processing I suppose, but it is almost negligible, it only affects outgoing packets. Of course it is a trade-off, for simplicity's sake.

  8. #8
    Thanks Philip

Similar Threads

  1. Two NICs
    By Dennis01 in forum Networking Forum
    Replies: 6
    Last Post: 04-30-06, 09:55 PM
  2. Two NICS in a PC
    By Gort9k in forum Networking Forum
    Replies: 6
    Last Post: 07-30-04, 01:29 PM
  3. 2 Nics vs 1
    By nskkam in forum Broadband Tweaks Help
    Replies: 3
    Last Post: 04-14-03, 12:18 PM
  4. NICs
    By bthetoy in forum Networking Forum
    Replies: 3
    Last Post: 07-09-02, 06:51 PM
  5. NICs
    By baudbwoy in forum Marketplace - Buy/Sell/Trade/Hot Deals
    Replies: 0
    Last Post: 11-11-01, 03:39 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •