Announcement

Collapse
No announcement yet.

Add Static route on win XP Pro with DHCP gateway

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Add Static route on win XP Pro with DHCP gateway

    Hello!!

    I'm trying to setup a PC running Windows XP as a monitor for a network service.

    This PC has 2 NICs configured as follows

    1- WLAN to access the internet so I can remotelly access this PC and get service status. (Also automatic alerts are sent over the internet).
    DHCP or static IP available
    Default gateway 192.168.1.254
    Network 192.168.1.0/24

    2- GSM modem only to monitor the service. I'm testing a GPRS/EDGE service
    DHCP (mandatory, provided by Service Provider)
    Network range: 10.64.0.0/13 (An IP from this range is assigned)

    I need to configure Windows XP Pro routing to achieve this:

    - Reach network 192.168.40.0/23 using GSM modem (NIC 2)
    - Any other traffic goes through WLAN (NIC 1)

    I already tried adding a couple static routes:

    >route add 192.168.40.0 mask 255.255.254.0 10.64.1.1 {10.64.1.1 is a sample IP assigned by DHCP}
    >route add 0.0.0.0 mask 0.0.0.0 192.168.1.254

    It actually works but the problem here is the GSM Provider changes IP address at least once a day so I need to reconfigure the first route manually.
    I need this Computer to run unnatended

    Is there a way to setup static route leaving gateway open for any address asigned by GSM Provider DHCP and/or use IF number instead?

  • #2
    Re: Add Static route on win XP Pro with DHCP gateway

    yo ushould be bale to bind the route to an interface nsted of an address...
    Please do show your appreciation to those who assist you by leaving Rep Point https://www.petri.com/forums/core/im.../icon_beer.gif

    Comment


    • #3
      Re: Add Static route on win XP Pro with DHCP gateway

      Try:
      Code:
      route add 10.64.0.0 mask 255.248.0.0 [gateway IP for that network]
      Here's the TechNet article about adding routes in Windows. the "route add 0.0.0.0 mask 0.0.0.0 192.168.1.254" line should take care of all other non 10.64.0.0 /13 traffic going out over the 192.168.1.254 gateway.
      Wesley David
      LinkedIn | Careers 2.0
      -------------------------------
      Microsoft Certifications: MCSE 2003 | MCSA:Messaging 2003 | MCITP:EA, SA, EST | MCTS: a'plenty | MCDST
      Vendor Neutral Certifications: CWNA
      Blog: www.TheNubbyAdmin.com || Twitter: @Nonapeptide || GTalk, Reader and Google+: [email protected] || Skype: Wesley.Nonapeptide
      Goofy kitten avatar photo from Troy Snow: flickr.com/photos/troysnow/

      Comment


      • #4
        Re: Add Static route on win XP Pro with DHCP gateway

        Thanks for your reply:

        Originally posted by Nonapeptide View Post
        Try:
        Code:
        route add 10.64.0.0 mask 255.248.0.0 [gateway IP for that network]
        I don't have a single Gateway, actually the same IP address issued for the interface by DHCP is assigned as gateway. So my gateway is simply the interface.
        Last edited by dromorok; 10th September 2009, 15:58.

        Comment


        • #5
          Re: Add Static route on win XP Pro with DHCP gateway

          Thanks for your reply

          Originally posted by tehcamel View Post
          yo ushould be bale to bind the route to an interface nsted of an address...
          Heh, this is actually what I'm lookinf for. The way to bind the route with an Interface and not the IP. I posted the full scenario just in case any other ideas could arise

          Comment


          • #6
            Re: Add Static route on win XP Pro with DHCP gateway

            http://windowsitpro.com/article/arti...interface.html

            Looks like you can use nonapeptide's code, and add
            Code:
            if 0x20003
            to the end (from hte example above)
            Please do show your appreciation to those who assist you by leaving Rep Point https://www.petri.com/forums/core/im.../icon_beer.gif

            Comment

            Working...
            X