AD-DNS-DHCP

Discussion in 'Active Directory' started by Ferg, Jul 24, 2009.

  1. Ferg

    Ferg Guest

    G'Day All,

    Here is a followup question, even though I could run a test to see the
    outcome,:
    If I do NOT remove the gateway configuration(192.168.131.21) from my DHCP
    scope but add the following to my logon script, which one
    will ultimately prevail, the DHCP gateway configuration or the route add
    command in the logon script.

    route command added to my logon script: route -f add 0.0.0.0 mask 0.0.0.0
    192.168.131.22.

    Thanks
     
    Ferg, Jul 27, 2009
    #21
    1. Advertisements

  2. Ferg

    Jorge Silva Guest

    The flush cmd will clear all route config, in some scenarios you'll need to
    reboot the system or the gateway won't work. What is the question?

    The -f switch doesn't remove the TCPIP config, it only cleans the route
    table.

    --
    I hope that the information above helps you.
    Have a Nice day.

    Jorge Silva
    MVP Directory Services
     
    Jorge Silva, Jul 27, 2009
    #22
    1. Advertisements

  3. Ferg

    Ferg Guest

    Thanks. This is the question:

    If I do NOT remove the gateway configuration(192.168.131.21) from my DHCP
    scope but add the following to my logon script, which one
    will ultimately prevail, the DHCP gateway configuration or the route add
    command in the logon script?
     
    Ferg, Jul 27, 2009
    #23
  4. Ferg

    Ferg Guest

    This is the question:

    If I do NOT remove the gateway configuration(192.168.131.21) from my DHCP
    scope but add route command to my logon script, which one will ultimately
    prevail, the DHCP gateway configuration or the route add command in the
    logon script?
     
    Ferg, Jul 27, 2009
    #24
  5. Ferg,
    If you use the Route command from cmd you will see the effects of adding the
    route.
    You will have an initial default route that is the same as the gateway
    assigned in DHCP. If you add another default route you will have two, and
    the first will be used unless you set metrics. If you look in TCP/IP
    properties at this stage you will see two "gateways", which are the default
    routes.
    To get what you want you would need first to run a Route Delete 0.0.0.0,
    which will remove the existing gateway, then route add to create the new
    default route.
    Hope that helps,
    Anthony
    http://www.airdesk.com
     
    Anthony [MVP], Jul 27, 2009
    #25
  6. Ferg

    Jorge Silva Guest

    The route add cmd DOESN'T add any gateway to your NIC config, the path to be
    chosen by windows will be based on the Metric that is defined on the route
    table. If the default gateway provided by your DHCP server is 100 and the
    route used in the script is 1, then the route set by the script wins.

    If you define more specific routes, eg: 10.10.0.0 mask 255.255.255.0
    192.168.0.1 Metric 10, then all requests to 10.10.0.0/24 address will take
    192.168.0.1 gateway because this route is more specific than 0.0.0.0 even
    with a Metric of 10.

    --
    I hope that the information above helps you.
    Have a Nice day.

    Jorge Silva
    MVP Directory Services
     
    Jorge Silva, Jul 27, 2009
    #26
  7. Ipconfig will show a second default gateway.
    You could set a metric for the additional gateway, or you could run Route
    Delete 0.0.0.0 first,
    Anthony,
    http://www.airdesk.com
     
    Anthony [MVP], Jul 28, 2009
    #27

  8. You're welcome!

    Ace
     
    Ace Fekay [MCT], Jul 28, 2009
    #28
  9. Ferg

    Jorge Silva Guest

    ahhh...
    Ok, right, using IPConfig...
    I thought that Antony was talking about GUI...
    --
    I hope that the information above helps you.
    Have a Nice day.

    Jorge Silva
    MVP Directory Services
     
    Jorge Silva, Jul 28, 2009
    #29
  10. Ferg

    Ferg Guest

    Great answers.
    Thanks again everyone for your kind attention.
    'preciate it.

    G'Day
     
    Ferg, Jul 28, 2009
    #30
  11. Ferg

    Jorge Silva Guest

    You're welcome.

    --
    I hope that the information above helps you.
    Have a Nice day.

    Jorge Silva
    MVP Directory Services
     
    Jorge Silva, Jul 29, 2009
    #31
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.