1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Rep Power

    how to Retreive Bounded Ip of system having 2 Lancards


    My system has 2 lan cards(IP1,IP2)
    when i ping with system name then say lP1 is pinging.
    but when i ping another system having 2 lan cards (ip3,ip4)
    ping is coming only from ip2 to ip4.
    the above statement is checked with traceroute command at dosprompt . this indicates routing started from Ip2.

    so is there any component to know from which Ip routing will be started (ip bounded to system)

    Thank U
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Woodland Hills, Los Angeles County, California, USA
    Rep Power
    You can use the Windows API functions for this. Try using GetBestInterface() or GetBestInterfaceEx() to show you the best route.

    Next, you can call GetAdaptersInfo(), if you want more information about the adapters:
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo

IMN logo majestic logo threadwatch logo seochat tools logo