Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Bind a network interface to a network number

  • 13-09-2006 11:11am
    #1
    Registered Users, Registered Users 2 Posts: 1,165 ✭✭✭


    I'm just wondering if its possible to bind a network interface to a network number.

    For instance, using the netstat -r command I get

    Route Table
    ===========================================================================
    Interface List
    0x1 ........................... MS TCP Loopback interface
    0x2 ...00 11 43 b0 3d af ...... Broadcom NetXtreme 57xx Gigabit Controller - Packet Scheduler Miniport
    ===========================================================================

    Thats fine, but if I've got multiple network cards, and I disable/re-enable them the number (the 0x2 bit) changes to a higher value. I want to always bind that network card to 0x2 (or whatever value).

    Its looks wierd, but its related to a network issue we're experiencing with network applications binding to the lowest interface number in the list, and sometimes that being the wrong interface.


Comments

  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 93,581 Mod ✭✭✭✭Capt'n Midnight


    not sure but the command prompt utility NETSH.EXE may be useful t

    are you sure it's not a metric / route cost thing ? ROUTE PRINT

    netsh int ip reset > filename.txt
    is handy way to reset tcp/ip - a bit like ipconfig /release , ipconfig /renew


  • Registered Users, Registered Users 2 Posts: 1,165 ✭✭✭Stky10


    Tried it but no it doesn't work. It doesn't reset the interface number.

    But no, its not a metric thing. On the machines this is occuring on, they have both a wired and wireless NIC. No matter how many times they're reset/disabled/enabled the metric of the wired always stays at 20 and the wireless 25. But depending on which has been enabled first gets listed in the interface list first, and so our application binds to it and attempts to use it.

    It looks like we're going to have to recode the application so that it attempts to ping the server on all known interfaces, and depending on the ping response time, pick and interface and bind to it.


  • Registered Users, Registered Users 2 Posts: 6,762 ✭✭✭WizZard


    Why can't you let the user decide what interface to bind to? Or can you only identify the interfaces by interface number?

    If ping works for identifying the interface can the app not just use the usual network stack and let it worry about interfaces, as it was designed to do...

    What are you trying to do? Maybe someone can offer a solution if we know the problem


  • Registered Users, Registered Users 2 Posts: 1,165 ✭✭✭Stky10


    Well the process I'm talking about is a non-interactive process which is why the user can't decide which interface to use. It basically trys to connect to a server IP address thats contained within a config file. The problem was that sometimes it would try to do so via a wireless card that could be connected to a completely different or incorrect network and thus fail. At first we didn't know why it would do this (seemingly randomly) until we discovered the interface number and the way it changes on being disabled/re-enabled.

    Anyway, I originally added the thread in the hope that there was a way to always prioritize a certain network interface over another via a startup script or registry key. After talking to the lead developer earlier today though we came up with the idea of pinging the server on all interfaces and picking the best interface (as detailed in my last post).

    So I suppose we can close the thread. We've come up with a better solution than I'd originally being hoping for.

    Thanks for your help though.


Advertisement