resolv.conf after reboot on CentOS 5.5 EC2 instance

24

Solution 1

Try adding:

PEERDNS=no

To your /etc/sysconfig/network-scripts/ifcfg-eth0 (or equivalent)

If that doesn't work, you could use the chattr hack:

chattr +i /etc/resolv.conf

Solution 2

Given the age of this question, I assume you found an answer; but for those who find this question looking for help: If this is inside a VPC, you need to go into the VPC console and access dhcp-options-sets (https://console.aws.amazon.com/vpc/home#s=dhcp-options-sets) and create a new dhcp options set. Make a note of the amazon id of the new options set (dopt-XXXXXXXX)

Next, go to "Your VPCs" (https://console.aws.amazon.com/vpc/home#s=vpcs), click "Change DHCP Options Set" near the top, then choose the amazon ID of your new options set.

This might help: http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html

Share:
24

Related videos on Youtube

whytheq
Author by

whytheq

Updated on September 18, 2022

Comments

  • whytheq
    whytheq over 1 year

    In our cubes it is somewhat hit and miss what the "All" member of each hiearchy is called:

    For different hierarchies:

    • HierX = [All]
    • HierY = [All Y]
    • HierZ = [All]
    • HierJ = [All Js]

    So sometimes the cube developer has left the default and other times he has made the name more verbose.

    In my mdx I would like to be able to always find this member without worrying what it is named.

    Assuming the hierarchy actually has an All member, can I assume that this code will always work? :

    [DimensionX].[HierarchyX].members.item(0).item(0)
    

    Is there a more water-tight approach?

    • dmourati
      dmourati almost 13 years
      Did you try PEERDNS=no?
  • organicveggie
    organicveggie almost 13 years
    Nope. As I mentioned, I tried using dhclient.conf and that didn't have any effect.
  • ParisNakitaKejser
    ParisNakitaKejser over 11 years
    i get i to work, if i set onbootup=yes :)
  • organicveggie
    organicveggie over 10 years
    I never did get it to work and just kept using my custom init script approach. Unfortunately, it wasn't in a VPC. Now that most of our instances are in VPCs, we're using the technique you outlined. Just a strange problem.