Find the answer to your Linux question:
Results 1 to 9 of 9
Hi all I am using dhcp client from my ISP. I got gateway from dhcp . I just want client ip.so how to disable to gateway? I not want gateway.I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2008
    Posts
    15

    How to disabled?


    Hi all

    I am using dhcp client from my ISP.
    I got gateway from dhcp .
    I just want client ip.so how to disable to gateway?
    I not want gateway.I want to put manual when I got client ip.

    Best Rgds
    Please

  2. #2
    Just Joined!
    Join Date
    Dec 2008
    Location
    Maryland
    Posts
    18
    You can change the default route (gateway) by giving the following commands (where x.x.x.x is the IP address of the route that you want.

    Code:
    route delete default
    route add default gw x.x.x.x
    You would need to script something like the above in order to not have to do that manually each time.

  3. #3
    Linux Enthusiast
    Join Date
    Apr 2004
    Location
    UK
    Posts
    682
    Depending on your dhcp client, you can edit the settings not to request/use the default gateway.

    In my /etc/dhcp3/dhclient.conf:
    Code:
    request subnet-mask, broadcast-address, time-offset, routers,
            domain-name, domain-name-servers, host-name,
            netbios-name-servers, netbios-scope;
    If I delete "routers," and restart the network then it doesn't populate the default gateway.

    Let us know how you get on,

    Chris...
    To be good, you must first be bad. "Newbie" is a rank, not a slight.

  4. #4
    Just Joined!
    Join Date
    Dec 2008
    Posts
    15
    Hi

    where is dhclient.conf?

    I am using Fedora 7

    Thanks for reply

  5. #5
    Just Joined! SkipDaShu's Avatar
    Join Date
    Dec 2008
    Location
    Republic of Texas, Central
    Posts
    12
    Dunno in Fedora... in Xubuntu it's:

    /etc/dhcp3/dhclient.conf

  6. #6
    Just Joined!
    Join Date
    Dec 2008
    Posts
    15
    I think I will be see this file when dhcp on in my interface.
    right?
    thanks

  7. #7
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    When looking for a file you could always do the following:

    Code:
    locate <file>
    <file> being the file you are looking for.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  8. #8
    Just Joined!
    Join Date
    Dec 2008
    Posts
    15
    Thanks


    Best Regards
    Please

  9. #9
    Just Joined!
    Join Date
    Dec 2008
    Posts
    15
    Hi

    I am not OK.

    I just found dhclient.conf-simple so I copy to /etc/dhclient.conf and deleted routers;
    but I did not get also IP.

    How can I fix?

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •