Find the answer to your Linux question:
Results 1 to 3 of 3
Hi Frnds I have my NAT in Windows 2003 and sharing internet from it, the prob is am able to fetch internet in RHEL-5 through gateway and DNS ip, but ...
  1. #1
    Linux Newbie
    Join Date
    Aug 2008
    Posts
    119

    Assigning DNS IP

    Hi Frnds

    I have my NAT in Windows 2003 and sharing internet from it, the prob is am able to fetch internet in RHEL-5 through gateway and DNS ip, but am using this through

    #neat command is there any way to assign DNS and GATEWAY IP through terminal.

    Help Me Frndz

    Happy New Year in Advance

  2. #2
    Just Joined!
    Join Date
    Oct 2009
    Posts
    3
    you can assign DNS / Gatway through command line without using neat command.

    for DNS first check the current dns settings with 'cat' command
    # cat /etc/resolv.conf
    domain yourdomain.com
    search yourdomain.com
    nameserver x.x.x.x
    nameserver x.x.x.x

    then replace nameserver per your dns ip address.. and you can give 'n' number of ip addresses per your list.

    # vi /etc/resolv.conf
    nameserver x.x.x.x

    #For Gateway

    Either
    [root@localhost ~]# cat /etc/sysconfig/network
    NETWORKING=yes
    HOSTNAME=localhost.localdomain
    GATEWAY=x.x.x.x

  3. #3
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,281
    Quote Originally Posted by mail4vij View Post
    you can assign DNS / Gatway through command line without using neat command.

    for DNS first check the current dns settings with 'cat' command
    # cat /etc/resolv.conf
    domain yourdomain.com
    search yourdomain.com
    nameserver x.x.x.x
    nameserver x.x.x.x

    then replace nameserver per your dns ip address.. and you can give 'n' number of ip addresses per your list.

    # vi /etc/resolv.conf
    nameserver x.x.x.x

    #For Gateway

    Either
    [root@localhost ~]# cat /etc/sysconfig/network
    NETWORKING=yes
    HOSTNAME=localhost.localdomain
    GATEWAY=x.x.x.x
    This is all good, but if the OP is using DHCP the server supplies this information and he should check his DHCP server.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

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