Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I use red hat Es 5.5 64 bit.. I find the item nameserver in resolv.conf cannnot be saved. Everytime ,reboot or restart the netwrok service . The data in ...
  1. #1
    Just Joined!
    Join Date
    Aug 2009
    Posts
    44

    save resolv.conf in linux

    Hi,
    I use red hat Es 5.5 64 bit..
    I find the item nameserver in resolv.conf cannnot be saved.
    Everytime ,reboot or restart the netwrok service .
    The data in resolv.conf will be removed and clear .
    I need to edit it again .
    I also try to add DNS1=XX.XX.XX.Xx in ifcfg-eth2 but the same problem
    in it , the resolv.conf is still need to edit every network service restart .

    So, how to save the resolve.conf about nameserver forever ??
    Please advice ...



    [root@vls etc]# cat resolv.conf
    # Generated by NetworkManager


    # No nameservers found; try putting DNS servers into your
    # ifcfg files in /etc/sysconfig/network-scripts like so:
    #
    # DNS1=xxx.xxx.xxx.xxx
    # DNS2=xxx.xxx.xxx.xxx
    # DOMAIN=lab.foo.com bar.foo.com

    nameserver 10.1.1.2
    nameserver 218.102.32.208
    `
    [root@vls etc]#
    ==========
    [root@vls network-scripts]# cat ifcfg-eth2
    # Intel Corporation 82572EI Gigabit Ethernet Controller (Copper)
    DEVICE=eth2
    BOOTPROTO=none
    BROADCAST=10.1.255.255
    HWADDR=00:80:82:8F:B4:A2
    IPADDR=10.1.1.82
    NETMASK=255.255.0.0
    NETWORK=10.1.0.0
    ONBOOT=yes
    GATEWAY=10.1.1.249
    TYPE=Ethernet
    USERCTL=yes
    IPV6INIT=no
    PEERDNS=no

    [root@vls network-scripts]#
    Hi,
    I use red hat Es 5.5 64 bit..
    I find the item nameserver in resolv.conf cannnot be saved.
    Everytime ,reboot or restart the netwrok service .
    The data in resolv.conf will be removed and clear .
    I need to edit it again .
    I also try to add DNS1=XX.XX.XX.Xx in ifcfg-eth2 but the same problem
    in it , the resolv.conf is still need to edit every network service restart .

    So, how to save the resolve.conf about nameserver forever ??
    Please advice ...



    [root@vls etc]# cat resolv.conf
    # Generated by NetworkManager


    # No nameservers found; try putting DNS servers into your
    # ifcfg files in /etc/sysconfig/network-scripts like so:
    #
    # DNS1=xxx.xxx.xxx.xxx
    # DNS2=xxx.xxx.xxx.xxx
    # DOMAIN=lab.foo.com bar.foo.com

    nameserver 10.1.1.2
    nameserver 218.102.32.208
    `
    [root@vls etc]#
    ==========
    [root@vls network-scripts]# cat ifcfg-eth2
    # Intel Corporation 82572EI Gigabit Ethernet Controller (Copper)
    DEVICE=eth2
    BOOTPROTO=none
    BROADCAST=10.1.255.255
    HWADDR=00:80:82:8F:B4:A2
    IPADDR=10.1.1.82
    NETMASK=255.255.0.0
    NETWORK=10.1.0.0
    ONBOOT=yes
    GATEWAY=10.1.1.249
    TYPE=Ethernet
    USERCTL=yes
    IPV6INIT=no
    PEERDNS=no

    [root@vls network-scripts]#

  2. #2
    Just Joined!
    Join Date
    Apr 2011
    Posts
    6
    for this you can do follwoing steps:

    1. Stop the NetworkManager service, using /etc/init.d/NetworkManager stop
    2. Add DNS entry in ifcfg* file.
    3 start network, using /etc/init.d/network start

    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
  •  
...