Change DNS host name automatically when one device is down
Hi all
I am first copying below the question which I have posted in a thread related to DNS few days back .
You cannot vote on your own post
Hi
our network team has setup Bluecoat proxy server in our main office and DR site . We have configured GPO to populate the details of proxy server hostname in the proxy setting eg : Proxy server . IP1 is the IP address for the device in Head office
and IP2 is the IP address assigned for device in DR site. currently we have given a DNS entry as
Proxyserver - IP1.
So DNS resolves the IP address of device in Head office and authentication and internet access works.
But we want to use the DR device to be used automatically (only )when head office device is not reachable. But how to configure the settings for DNS I am not sure.
I don't want to use round robin as it will send the traffic to both head office and DR in a load balancing fashion .
for this request I had received an advice to use a script to monitor the first device continuously and if not reachable then change the Hostname in DNS to that of second device .
Let me know if anyone can help me on this.
Thanks in advance
Midhin
Hi Midhin,
Agree with Jrv, I also recommend you can consult proxy vendor for a better solution.
In addition, if you still want to update host name in DNS via Powershell, please refer to the script to update A record in DNS:
$Zone = "dns zone"
$oldobj = Get-DnsServerResourceRecord -ZoneName $Zone -RRType "A" -Name "hostname"
$newobj = Get-DnsServerResourceRecord -ZoneName $Zone -RRType "A" -Name "hostname"
$NewObj.RecordData.IPv4Address = "newipaddress"
Set-DnsServerResourceRecord -NewInputObject $NewObj -OldInputObject $OldObj -ZoneName $Zone
If there is anything else regarding the powershell script issue, please feel free to post back.
Best Regards,
Anna Wang
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]
Similar Messages
-
BW settings required when we change the host name in R/3
Hi All,
we had a test system in R/3 and we are planning to change the Host name in R/3 and this is connected to bw test.after basis change the host name in r/3 test what are settings required to be done in BI .
Regards,
jasmine.after name change check the RFC connection in SM59 and then see if you data sources are anabled from new source system.
-
Hi, I am a newbie to AS. Nice to join the family and meet u all.
I got some problem during installation of AS 2005Q2, when I install and select 'Config Now' option, I cannot pass since the DNS hostname always fail.
If I select 'Config Later', I will find something is missing, like asadmin tool is not avaiable.
Since I will use the Ip only, can I disable or bypass the DNS host name? since no matter how I enter it always fail.
Please advise, thank you very much in advance. :)Hi, I am a newbie to AS. Nice to join the family and meet u all.
I got some problem during installation of AS 2005Q2, when I install and select 'Config Now' option, I cannot pass since the DNS hostname always fail.
If I select 'Config Later', I will find something is missing, like asadmin tool is not avaiable.
Since I will use the Ip only, can I disable or bypass the DNS host name? since no matter how I enter it always fail.
Please advise, thank you very much in advance. :) -
Hi all,
I have to change the host name of an AIX server which I have an Oracle 10g already Installed on it.
First, Is it possible to change the host name without break off oracle server?
What is the drawback on the oracle server?
Apart the Listener, what should I change in the configuration of the oracle server, and where?
drawback on OEM?
Inventory?
etc...
any oracle note??
Thanks in advance
S. Hageuser12004538 wrote:
Hi all,
I have to change the host name of an AIX server which I have an Oracle 10g already Installed on it.
First, Is it possible to change the host name without break off oracle server?
What is the drawback on the oracle server?
Apart the Listener, what should I change in the configuration of the oracle server, and where?
drawback on OEM?
Inventory?
etc...
any oracle note??With V10+ no listener.ora file is required.
Nothing involving Oracle RDBMS needs to be changed when hostname changes.
OEM will break when hostname changes.
tnsnames.ora on remote clients need to be modified to reflect new hostname. -
OracleVM Manager template 2.2.0 trying change the host name
Hi,
I have installed the OracleVM Manager 2.2.0 template
into an OraclVM Server 2.2.1.
Reading the OracleVM Manager 2.2.0 install
instructions "Readme_for_Media_Pack_B59146-01.txt" and doing
the installation in the interview area, I am asked
to provide the fully qualified domain name as the
name of the OracleVM Manager.
Therefore, I provided something like this.
ovmmanager.mydomain.mytopdomain
Later, when I was in the OracleMV Manager,
I noticed the following.
Correct information was written in my /etc/hosts file.
192.168.1.160 ovmmanager.mydomain.mytopdomain ovmmanager
The case seems however, that unusual information
was written to the /etc/sysconfig/network file.
HOSTNAME=ovmmanager.mydomain.mytopdomain
When I type "uname -a", the results are shown.
ovmmanager.mydomain.mytopdomain
I say, "unusual", because most people prefer a single
name "ovmmanger" to be the host name.
I have tried to permanently change the host name of the computer by
changing the contents of the /etc/sysconfig/network file to the following.
HOSTNAME=ovmmanager
Next, at the command line I would type the following.
hostname ovmmanger
When I type "uname -a", the results are shown.
ovmmanager
However, every time I do an 'xm shutdown' to the
OracleVM Manger (the ovmmanger), and then later do an
'xm create vm.cfg' to start the ovmmanger,
when I type a "uname -a", the results are shown.
ovmmanager.mydomain.mytopdomain
When I look at the contents of the /etc/sysconfig/network file
the contents are back to the original contents.
HOSTNAME=ovmmanager.mydomain.mytopdomain
instead of my preferred contents
HOSTNAME=ovmmanager
My first question is the following.
By design, does the OracleVM Manager 2.2.0 template
supposed to have a host name to be a
fully qualified domain name?
ovmmanger.mydomain.mytopdomain.
My second question is the following.
If the situation is satisfactory to have just
ovmmanger
as my host name, then how do I prevent the host name renaming
process to reoccur every time I do an 'xm create vm.cfg' to start
the OracleMV Manager?
Thank you
AIMFirst Question: No, it does not have to be a full qualified hostname. As long as the hostname is resolved in your network short qualified is fine.
Second Question: You don't have to do anything. In OVM Template design the configuration tool is just called the first time your template is started. All succeeding startups will not go through the configuration again. (There is however an option to reenable/reset the VM that the configuration is called again).
Regards
Sebastian -
Change the host name of communication channel at runtime
Hi,
I am connecting to an SQL server using a JDBC receiver communication channel.
The vendor who is managing this SQL server says that he has a primary server with the ip <IP1> and a secondary server with ip <IP2>.
He wants me to switch to IP2 when IP1 is down.
Is there any possibility of to achieve this ?
regards,
PiyushI dont think there is any options available in JDBC adapter to change the host name dynamically...
what u can do is - u create a dummy scenario which will just check whether the database is up or not and store the flag values in PI ABAP stack..
Now before u send data to JDBC u do look up and check which server is up...and based on that u divert ur message to required system.
thats what I can think of now...
chirag -
I have been asked to change my Host Name . Is this genuine??
I have been asked to change my Host Name . Is this genuine??
For the DNS Changer malware see the following:
Will your internet service cut off on July 9?
DCWG | DNS Changer Working Group
How to remove the DNS Changer malware -
How do I change my Apple ID on only one device?
How do I change my Apple ID on only one device? I inherited my husband's iPhone 5. He cleared it but I set it up with same Apple ID so we could share same iTunes account. However, I realised that there are inconveniences such as not being able to Facetime each other. In addition, his iTunes account is UK-based and we'd like to also have a New Zealand iTunes account for various reasons.
Go to settings/icloud and sign out. Then sign in by creating a new Apple ID. Do the same in Settings for Messages, FaceTime and iTunes & App Store. Next, link your Apple IDs using Family Sharing so you can still share music and apps. Family Sharing - Apple Support
-
Changing the Host Name in Lite Database
Hi,
I am using oracle 10g Database release 2 and oracle 10g Lite Database Release 3
OS is Windows 2003 Server
I changed the host name
“Old Name Oracle10g New Name OracleTENR1”
Also change the host name in Listener.ora and tnsname.ora after that i restart the machine
I checked the Database status (it is in OPEN STATE only )
And then I start the mobile server it's not working ….
How to change the host name in the oracle 10g Lite Database ?
Please Advice
Thank U
SHANhi,
Thanks Fot the Reply ......
I have changed the hostname in webtogo.ora
Mobile Server is Working...
But the Problem is "with the Browser http://localhost/webtogo it shows this error message in the Screen"
500 Internal Server Error
java.lang.NullPointerException at oracle.lite.web.util.TaggedHtml.parse(Unknown Source) at oracle.lite.web.util.TaggedHtml.init(Unknown Source) at oracle.lite.web.WebtogoLogonPage.init(Unknown Source) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpApplication.loadServlet(HttpApplication.java:2231) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpApplication.findServlet(HttpApplication.java:4617) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpApplication.findServlet(HttpApplication.java:4541) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpApplication.getRequestDispatcher(HttpApplication.java:2821) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:740) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:119) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595)
Please Advice.....
thank U
SHAN -
Hello:
Is it possible to change the host name in the portal server?
hostA.domain.com -> hostBCDE.domain.com
What do I need to change in configuration after the name change?
Thank youHello,
IT is not possible to change the Host name of the Portal server and it is not at all recommended by SAP.
Suneel -
ORA-12545 error after changing the host name as IP address in Tnsnames.ora
HI,
I tried to connect PHP and oracle in Red Hat linux. I got error ORA-12545 after changing the host name as IPAddress in Tnsnames.ora file. In sqlnet.ora file also i have entry for tnsnames in Directory_Path. I struggled so much but i couldnt solve that. Please give me ur valuable suggestions....12545, 00000, "Connect failed because target host or object does not exist"
// *Cause: The address specified is not valid, or the program being
// connected to does not exist.
// *Action: Ensure the ADDRESS parameters have been entered correctly; the
// most likely incorrect parameter is the node name. Ensure that the
// executable for the server exists (perhaps "oracle" is missing.)
// If the protocol is TCP/IP, edit the TNSNAMES.ORA file to change the
// host name to a numeric IP address and try again.
Seems you specified wrong IP address. -
I follow all the instructions to change my "short" name, but when I log back in to my account, it's like starting over from scratch, help?
https://discussions.apple.com/message/6164451#6164451
-
I want to change my Host name. I just need a little instruction. Can you please help.
Thanks Brett.You want to change your Host name in a meeting or in the Connect system?
In a Meeting, go to the pod options menu for the Attendee List, and select Edit My Info. You can then change your name in the room.
In Connect, you need to be an Admin, and be able to edit User Profiles. -
Failover did not happen when one node went down!!! PLEASE HELP
Hi gurus,
Yesterday one disaster struck my RAC database. We have two node cluster and it is 10.2.0.2, both of them located in different sites, yesterday suddenly power went down and the one of the network switch went down and got destructed, node one of RAC database was connected to that switch, but the failover did not happen to the node two as this should be the case when one node goes down the other should be available for all the node one sessions/connections.
when I tried to ping/telnet the node 1, it was not happening because the switch was down, the network guyz connected the cables to other switch available. When I connected to the node 1, it was showing "Oracle is not available" message.
And when I tried the other node, it was the same case but I did not see any error in alert log file. Then my TL restarted both the nodes and then the database was available.
I am very confused that how the failover did not happen and how the database went down, PLEASE suggest something to how to identifiy what was happened. Thanks & RegardsThanks for your reply,
after the network switch was replaced we connected to both the nodes and found that the instances are down with no reason given in the Alertlog file. We just restarted both the instances and then the database was up and the clients connected to both the instances with equal sessions on both the instances. I want to know that whether the failover can be done at the application side or it should be done on the database side i,e; in tnsnames.ora file with the required parameters? as in our scenario there is no failover configuration in the tnsnames.ora file.
Thanks & Regards -
Change my Host Name in Solais 10
Please, when I run smc(Solaris Management Console) I can see in System Information, that my Host Name is unknown. How can I change that?
It's strange that you don't have etc/nodename, it must be in etc/. May be you'll try to create it? Besides, I think this article can help you:
Setting Up a Solaris DHCP Client
One of the problems that can arise when trying to use a Solaris box as a DHCP
client is that by default, the server is expected to supply a hostname, in
addition to all the other stuff (like IP address, DNS servers, etc.). Most cable
modems and home routers don't supply a (usable) hostname, so it gets set to "unknown".
This page describes how to get around that. (Where this page says "cable modem",
"DSL modem" can be substituted.)
This page assumes that le0 is the interface you using for your DHCP connection.
Substitute hme0 or whatever interface you're actually using in the examples
below.
Setting up DHCP
There are two ways of using DHCP:
DHCP has limited control
DHCP has full control
The first case may be where you want to use your own /etc/resolv.conf and so on,
with a minimum of hassle.
The second case would be the normal situation, especially if your cable modem
provider has a habit of changing DNS name server IP addresses on you (like mine
does!), so I'll concentrate on that here. I have a script to automate the first
method, should you want to use it. You'll need to change the DEFAULT_ADDR and
INTERFACE variables as required.
The first thing to do is to create an empty /etc/hostname.le0, like this:
/etc/hostname.le0Creating this file ensures that the interface gets plumbed, ready for the DHCP
software to do its stuff.
Next, you create /etc/dhcp.le0. This file can be empty if you want to accept the
defaults, but may also contain one or both of these directives:
wait time, and
primary
By default, ifconfig will wait 30 seconds for the DHCP server to respond (after
which time, the boot will continue, while the interface gets configured in the
background). Specifying the wait directive tells ifconfig not to return until
the DHCP has responded. time can be set to the special value of forever, with
obvious meaning. I use a time value of 300, which seems to be long enough for my
cable provider.
The primary directive indicates to ifconfig that the current interface is the
primary one, if you have more than one interface under DHCP control. If you only
have one interface under DHCP control, then it is automatically the primary one,
so primary is redundant (although it's permissible).
With these files in place, subsequent reboots will place le0 under DHCP control:
you're ready to go!
Unknown hostname
Actually, there's one snag: most (if not all) cable modem DHCP servers don't
provide you with a hostname (even if they did, odds are it won't be one you want
anyway!). This wouldn't be a problem, except that the boot scripts (/etc/init.d/rootusr
in particular) try to be clever, and set your hostname to "unknown" in this case,
which is not at all useful!
The trick is to change your hostname back to the right one, preferably without
changing any of the supplied start-up scripts, which are liable to be being
stomped on when you upgrade or install a patch. You've also got to do it early
enough in the boot process, so that rpcbind, sendmail and friends don't get
confused by using the wrong hostname. To solve this problem, put this little
script in to /etc/init.d/set_hostname, with a symbolic link to it from /etc/rc2.d/S70set_hostname.
Starting with Solaris 10, the preceding paragraph can be ignored. Instead, just
make sure that the hostname you want to use is in /etc/nodename; the contents of
that file will then be used to set the hostname. (Note that it is essential that
the hostname you put into /etc/nodename is terminated with a carriage return.
Breakage will happen if this is not the case.) Also, from Solaris 8 it is
possible to tell the DHCP software not to request a hostname from the DHCP
server. To do this, remove the token 12 from the PARAM_REQUEST_LIST line in /etc/default/dhcpagent.
(/etc/default/dhcpagent describes what the default tokens are; 12 is the
hostname, 3 is the default router, 6 is the DNS server, and so on.)
With these modifications in place, reboot, and you'll be using your cable modem
in no time!
If you've got more than one machine, and you want to access the Internet from
all of them, you might also find my Solaris NAT page useful.
If this page has been useful to you, please consider buying a copy of my book,
Solaris Systems Programming.
Send any questions or comments to: [email protected]
And this is the script:
#!/sbin/sh
# Name: set_hostname
# SCCS Id: @(#)set_hostname 1.2 07/26/04
# Description: This file is a script for re-setting your hostname to the
# right value if you use DHCP (which has a habit of setting
# your hostname to "unknown" if you use a cable modem).
# Copyright Љ 2000-2004 by Rich Teer. All rights reserved.
HOSTNAME=`cat /etc/nodename`
echo "Setting hostname to $HOSTNAME... \c"
uname -S $HOSTNAME
echo "Done."
It's another variant, more complex:
#!/usr/bin/sh
# set_hostname
# Setting DHCP hostname when not provided from DHCP-server.
# Make sure you have a "clean" copy of /etc/hosts (fx. /etc/hosts.orig)
# As this script will clean up and set the hostname in /etc/hosts.
# The script can be run in hand, or as a startup script in:
# Solaris 8/9: /etc/init.d; /etc/rcX.d
# Programmed by: Yngve Berthelsen
# Date: 20050216
# E-Mail: [email protected]
# Last updated: 20050216
# History:
### Variables used in script
NODENAME="/etc/nodename"
HOSTALIAS=`cat /etc/nodename|nawk ' BEGIN { FS="." }; { print $1 }'`
HOSTFILE="/etc/hosts"
ORGHOST="/etc/hosts.orig"
HOSTNAME=`/usr/bin/hostname`
NIC="hme0" # Change hme0 to the DHCP interface NIC
DHCPNIC="/etc/dhcp.$NIC"
IPADDRESS=`ifconfig $NIC|grep inet|nawk '{ print $2 }'`
### Functions to call
SetHostname()
echo "Setting DHCP Hostname: $NODENAME"
/usr/bin/uname -S $NODENAME
print "$IPADDRESS\t$NODENAME\t$HOSTALIAS" >> $HOSTFILE
/usr/bin/hostname $NODENAME
return
# main
case "$1" in
'start')
if [ -f $DHCPNIC ]
then
if [[ $HOSTNAME == "Unknown" ]]
then
SetHostname
elif [[ $HOSTNAME == "unknown" ]]
then
SetHostname
fi
fi
'stop')
if [ -f $DHCPNIC ]
then
cp -frp $ORGHOST $HOSTFILE
fi
echo "Usage: $0 { start |stop }"
exit 1
esac
exit 0
### This script is submitted to BigAdmin by a user of the BigAdmin community.
### Sun Microsystems, Inc. is not responsible for the
### contents or the code enclosed.
### Copyright 2007 Sun Microsystems, Inc. ALL RIGHTS RESERVED
### Use of this software is authorized pursuant to the
### terms of the license found at
### http://www.sun.com/bigadmin/common/berkeley_license.html
I use the first, "short" script, it works.
Maybe you are looking for
-
Contacts Created on iPhone not syncing over to Address Book on laptop.
Contacts created in Address Book on laptop do sync over to iPhone - no problem - but not the other way around. I must retype contacts daily created in the field to laptop. Apple specialist unable to find the problem. Passed on to engineering, end of
-
How to identify the trailing spaces in a column
Hi, How to identify the trailing spaces in a column. for ex: empno char(5) and i enter 333 then there will be 2 spaces remaining. How to identify that two spaces
-
Can't create a skype folder don't have enough privileges
Since I install OS X 10.6.8 I can't download big programs like Skype or Google Chrome. I downloaded skype, it will start the installation but at the end pop out a window saying that: "can't create a skype folder at/user/v..../Library/Application Supp
-
Maintaining session in distributed servers
Hi, I wanted to know how to maintain the session in the case when the servers are in a distributed environment, i mean the http request is sent to one server which inturn checks if any of the servers is free and redirects the request to it. When ther
-
Someone decided the T button on the tools bar should be on the left instead of the right when the tools bar is set up doubled. Is there any way to change it back to being on the right side but keep it doubled up? While it might seem like a small th