VMware Cloud Community
c0t0d0s0
Contributor
Contributor

Changing default gateway on vCenter Appliance version 6

I just installed the VCSA 6.0 without any problems. Only issue is that the customer told me the wrong default gateway. I'd rather not redeploy the appliance. How do I go about changing the default gateway?

14 Replies
admin
Immortal
Immortal

access your VCSA Console using the below URL --> Login with root and password --> Network Tab --> Address Tab and change the Default Gateway here.

https://VCSA(IP or FQDN):5480

Good Luck Smiley Happy

Reply
0 Kudos
c0t0d0s0
Contributor
Contributor

6.0 doesn't listen on 5480 anymore.

Reply
0 Kudos
admin
Immortal
Immortal

Try this:

A. To apply a static route on an ESXi host, effective immediately, but not persistent across a reboot:

Connect to host with a ssh client (I prefer putty) and execute the following command:

# route add -net <TargetNetwork> netmask <NetmaskAddress> gw <GatewayAddress> dev <interface>

e.g. route add -net 10.1.2.0 netmask 255.255.255.0 gw 10.1.1.1 dev eth0

then run # route

to verify that the route was added successfully. In our example, the entry 10.1.2.0 10.1.1.1 255.255.255.0 UG 0 0 0 eth0 should appear.

B. To apply a persistent static route on the appliance:

Connect to host with a ssh client and open the static-routes file with a text editor:

# vi /etc/sysconfig/network/ifroute-eth0

(supposing the interface is eth0)

For every route add a line with the following format:

<TargetNetwork> <GatewayAddress> <Netmask> <Interface>

Then run the following command:

# service network restart

and finally verify the route with:# route

Reply
0 Kudos
c0t0d0s0
Contributor
Contributor

That is for adding static routes. I need to change the default route.

Reply
0 Kudos
admin
Immortal
Immortal

You'll have to redeploy because altering the Management network is not permitted in the current version of vCenter 6. I can't find proper documentation on the subject, but you get the following warning from the vCenter 6 console: 'Management network configuration is not allowed.'; screenshot attached.

Never mind the following, it is fore ESXi

There is this in the documentation, but I suspect it may be vestigial. (I'll look into it after the holiday.)

vSphere 6.0 Documentation Center

Reply
0 Kudos
alunkal
Contributor
Contributor

I dont know about vcenter appliance 6.But in vcenter appliance 5.5.You can change the default password by running the below command.

/opt/vmware/share/vami/vami_config_net

please update are you able to change the default gateway using this method.

thanks

regards

Ritchie James

SavkoorSuhas
Expert
Expert

This is how I will answer to this question: No.

With VCSA 6.0 GA, to change default gateway, you will have to re-deploy appliance.

Workaround:

Upgrade to U1, Get access to VAMI page now (5480), change the default gateway from VAMI page.

Suhas

If you found this or any other answer useful please consider the use of the Helpful or Correct buttons to award points.

Don't Backup. Go Forward!
Rubrik

frednice
Contributor
Contributor

Yes it does, it works for me with version 6.0.0.20000

lfstudios10
Contributor
Contributor

How about after moving a vCenter installation the IP address shows last https://localhost.  I don't want to change my IP address - I just want my IP address back.  I used the Standalone converter to move it.  Any ideas?

Reply
0 Kudos
slacker9876
Contributor
Contributor

Thank you! I was looking for a way to update my VMware vCenter Server Appliance and this script did the trick. Only caveat if you do not an additional interface it did need to be shutdown to add it. I keep my management and internet segmented and once I had the interface I changed the default gateway and it was off to the update races!

This was on vCSA 6.5 and I confirmed with this post -How to “fix” VCSA IP settings from command line. | Digital Kungfu #Virtualization et al

Reply
0 Kudos
Jitu211003
Hot Shot
Hot Shot

Hi,

You can use yast command.

Just write yast  on command line, it will open the network configuration, use the tab and arrow key to go further.

if you feel hard, you can also edit the route config file.

Try to search route file under etc/

Thanks

Reply
0 Kudos
sarikrizvi
Enthusiast
Enthusiast

1. Open a console session of vCenter Appliance 6 >>> Type "root" >>> Type "Password of root" >>> Run below cmd.

2. # /opt/vmware/share/vami/vami_config_net
3. # Enter No. 2 to change the default gateway >>> enter new gateway >> exit .

Try this and it will help you .

Regards,
SARIK (Infrastructure Architect)
vExpert 2018-2020 | vExpert - Pro | NSX | Security
vCAP-DCD 6.5 | vCP-DCV 5.0 | 5.5 | 6.0 | vCA-DCV 5 | vCA-Cloud 5 | RHCSA & RHCE 6 | A+ (HW & NW)
__________________
Please Mark "Helpful" or "Correct" if It'll help you
_____________________________________
@Follow:
Blog# https://vmwarevtech.com
vExpert# https://vexpert.vmware.com/directory/1997
Badge# https://www.youracclaim.com/users/sarik
Jitu211003
Hot Shot
Hot Shot

use below command by taking Vcsa on putty.

yast

it will show you the option to change the ip configuration alternatively you can use vcsa configure portle.

https://vcenter-server-fqdn:5480

Thanks

Vmwarediary.com

Reply
0 Kudos
NioNoe
Contributor
Contributor

For this way was very usefull and I did

I changed default gateway in VCSA 6.7 whit this methode it worked

Thank you very much  for your info!

Regards

Reply
0 Kudos