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

    Join Date
    Aug 2004
    Posts
    5
    Rep Power
    0

    how to Retreive Bounded Ip of system having 2 Lancards


    Hi

    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
    Himaja
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,648
    Rep Power
    4248
    You can use the Windows API functions for this. Try using GetBestInterface() or GetBestInterfaceEx() to show you the best route.
    http://msdn.microsoft.com/library/en...asp?frame=true

    Next, you can call GetAdaptersInfo(), if you want more information about the adapters:
    http://msdn.microsoft.com/library/en...asp?frame=true
    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