VMware Cloud Community
jonbrave
Contributor
Contributor

Unable to change IP network address

Dear Community,

I am desperate so I am really hoping you will be kind enough to help.

I am a VMware/ESXi beginner.  I am a techie but I am not a network administrator, and am totally confused.  I will try to keep this brief as I don't know what information is/is not relevant.  Am more than happy to provide any further information, but would appreciate it if answers are kept simple-ish as I don't know the terms/technology.

I have an ESXi 7.0.2 which was commissioned at my office.  There it worked fine.  I seem to have assigned it a static IP address of 192.168.10.10.  Everything in the office is on 192.168.10.x.  I use the vSphere web browser GUI client.

I have had to move it to home.  Here my network is on 192.168.100.x.  I cannot access/view/change any settings on the fibre router I have from my supplier.

Obviously at this point I can no longer connect to the ESXi on the 192.169.10.x network.  I have had to temporarily change a PC's static address onto that 10.x network so that I can log onto it.

I go to change the TCP/IP v4 settings on vmk0.  I click Edit Settings.  Subnet mask is indeed 255.255.255.0.  I change to 192.168.100.100.  When I press Save I get red error "Operation failed, Network Unreachable" and it won't alter the IP address.

I try instead moving it from Static Address to DHCP.  When I press Save I get red error "A specified parameter was not correct".

As an exercise I try changing from 192.168.10.10 to 192.168.10.9.  That change is allowed.  I reboot etc. and am able to reconnect on the new 192.168.10.x address.

I really have Googled and am unable to find anything to help me/mentioning these errors.  All the posts I find say I am doing the right thing and it should change and reboot and I will be able to connect on the new network.  Nothing explains why I am unable to change from 192.168.10.x to 192.168.100.x.

I see it is using the "Default TCP/IP stack".  I note that has Default gateway of 192.168.10.1.  I have not tried changing this, I don't know if that is relevant.

I also just tried connecting with PuTTY.  While the web browser can connect on 192.168.10.10 (as described above), trying PuTTY with SSH & port #22, as advised on the web, I get "Network error: connection refused"....  EDIT : Had to enable SSH in ESXi, this is working now.

At this point I am tearing my hair out.  I have no idea how to proceed.  I am on the verge of throwing the whole box in the trash as locked out and unusable 😞

My last hope is to drive it to a friend this morning who has a VGA lead to try booting the box (press F2?) with local monitor+keyboard.  Then I won't be using the web browser UI interface to connect on 192.168.10.x to it, in the desperate hope that will allow to change the IP address to either static 192.168.100.x or enable DHCP instead.  Is this my problem, and this will solve, or is it something quite different?

As I have said, really desperate, can some kind soul give me some guidance?  I should be so grateful....

 

Reply
0 Kudos
15 Replies
dimyke
Enthusiast
Enthusiast

Hi

I'm not sure but I think this is due to the default gateway that is set on your tcp/ip stack.

When you're at your office and configure the host with 192.168.100.x and gateway 192.168.100.1, then go home and change the IP but leave the gateway as-is, your ESXi host won't be able to reach the gateway anymore.

Can you try to change the gateway from in the TCP/IP stack first and then change your vmkernel adapter?

I just tried the following in my lab:
1 - Add a new vmkernel for management with an IP in a subnet I do not use = fail
2 - Add a new vmkernel for management with an IP in a subnet I use and is routed in my network = works

So please change your gateway in your TCP/IP stack first and let me know if that did the trick or not.

Kind regards
Dimitri

Reply
0 Kudos
jonbrave
Contributor
Contributor

Dear Dimitri,

Thank you for your reply.  basically if I try to change the Default Gateway I get red error from Default TCP/IP stack and "A parameter is incorrect" 😞

I am going to drive to friend now so I can plug in a monitor+keyboard directly.I have enabled SSH connection now, so I can get in that way.  I have enabled ESXi Shell also.   Trouble is I don't actually know what commands to type to (try to) change gateway/IP address?

 

Reply
0 Kudos
dimyke
Enthusiast
Enthusiast

I have the same results indeed, my bad 🙂

My first thoughts were 'easiest would be to hookup a screen and keyboard and change it from the GUI' so that's always an option.

In the meantine I found you a working work-a-round.
Go to you VMkernel and change the subnet mask to 255.255.0.0.
Then go to your TCP/IP stack and change the gateway to the correct IP in your home subnet.
Then go back to your vmkernel and change the IP to an IP in the same subnet range as you home subnet and put the subnet mask back to 255.255.255.0

Kr
Dimitri

Reply
0 Kudos
jonbrave
Contributor
Contributor

Dear Dimyke,

First my apologies for addressing you as "Dimitri" previously --- my bad!

You said:

> My first thoughts were 'easiest would be to hookup a screen and keyboard and change it from the GUI' so that's always an option.

Indeed!  I went to friend, acquired monitor+keyboard I can directly plug into.  Lo and behold, that was so easy, I just changed to the desired IP address+gateway and brought it back home!  So at least that's done.

I do see what you meant about the subnet mask, perhaps that would have worked.

May I ask one further question which leaves me baffled.

My physical box has 3 unlabelled ethernet ports.  Since I don't know which is which I randomly plug into any of them.  When I brought it home I plugged into its "LAN1".  Green lights were good.  But I was very disappointed to find that I could not contact it on the 192.168.100.100 which I set it to via console at the other place.  No response, no ping.

On a hunch/desperation I moved the ethernet over to "LAN2".  Lo and behold, all was well, I could connect.  And I have left it like that.

What I don't get is: when I configured the IP address/gateway via the console, it didn't say I was configuring for just one LAN network or whatever it is.  Yet it seems I can only connect to it through "LAN2" not "LAN1".  What is going here?!  Did anything I did at the console only apply to one LAN adaptor and not another??

Yours confused but grateful!,

Jonathan

Reply
0 Kudos
dimyke
Enthusiast
Enthusiast

Hi Jonathan

No worries, my real name is Dimitri so you were right.

Well I did not want to propose to get a keyboard mouse because it was obvious to me that you did not have one spare. But as you mentioned, it is indeed the easiest and quickest way to change the management config.

So you do have the option to choose on which physical NIC(s) your managenent IP is active and so you might have accidentally changed this.
You can change this on the web GUI but unfortunately I just killed my lab so I can't give you the exact instructions on to do so.

I think this is what you are looking for: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.networking.doc/GUID-DAF824CD-104D-4...
Just don't create a new one but edit your current vswitch.
At step 4 it says: Physical Network Adapter Add physical network adapters to an existing or a new standard switch.
That's what you are looking for. You can then add all your physical adapters to the switch and let's go 😉

If you bump into an issue with that, let me know!

Kind regards
Dimitri

Reply
0 Kudos
PackElend
Enthusiast
Enthusiast

I have a similar or even the same issue.
GUI complains with

Update Network Config
Key
haTask-ha-host-vim.host.NetworkSystem.updateNetworkConfig-335

Description
Network configuration information

State
Failed - A specified parameter was not correct:

Errors

PackElend_2-1670592712377.png

even if I try to set provisioning 

PackElend_1-1670592683608.png

When I try to set static settings via console I get:

/vmfs$ esxcli network ip interface ipv4 set -i vmk0 -I ip 10.210.35.2 -N 255.255.255.0 -t static
Error: Invalid option 10.210.35.2

 

 

here is the management network

NIC

PackElend_5-1670592951976.png

SWITCH

PackElend_7-1670593033529.png

 

Reply
0 Kudos
Kinnison
Commander
Commander

Hi,


It will be a simplistic approach, but IMHO changing the IP address via DCUI takes no more than a couple of minutes and at worst you can always retrace your steps.


Regards,
Ferdinando

Reply
0 Kudos
PackElend
Enthusiast
Enthusiast

I changed boot devices (planned to do it quite a while ago) and set IP in DCUI.

IP is set now but now I cannot set IP STeck to Auto config.

It seems quite a weird sequence of steps to get it done, may I need to switch to auto on the inference first, then on Stack...? 

It is working but does not make sense to me at all, where to set things.

 

Reply
0 Kudos
Kinnison
Commander
Commander

Hi,


Sorry, but I don't understand, via DCUI you can set your host to use static or dynamic network parameters, as you prefer.
Obviously, if you want to use dynamic network parameters (DHCP) you must have a DCHP server available and properly set up.


Regards,
Ferdinando

Reply
0 Kudos
PackElend
Enthusiast
Enthusiast

I set IP etc during the initial install. That happened in DCUI.

As soon as I'm on the WebGUI I get errors like shown in the images shown in the initial post

Reply
0 Kudos
StephenMoll
Expert
Expert

This looks wrong...

/vmfs$ esxcli network ip interface ipv4 set -i vmk0 -I ip 10.210.35.2 -N 255.255.255.0 -t static
Error: Invalid option 10.210.35.2

 

Shouldn't it be more like:

esxcli network ip interface ipv4 set -i=vmk0 -I=10.210.35.2 -N=255.255.255.0 -t=static

 

Kinnison
Commander
Commander

Hi,


Sorry, in one of your screenshots (which doesn't display correctly at first) the IP address seems to have been obtained via DCHP, now you want to set it statically, well nothing to say, I prefer for what are the basic settings (the "VMK0") to act via DCUI so I don't lose GUI / SSH sessions when the IP address changes, I can "test" the changes and, if necessary, restart the management agents, all within minutes.


I just gave you some advice, I didn't tell you that you have to do what I say.


Regards,
Ferdinando

PackElend
Enthusiast
Enthusiast


@Kinnison wrote:

Sorry, in one of your screenshots (which doesn't display correctly at first) the IP address seems to have been obtained via DCHP, now you want to set it statically, well nothing to say, I ...


the issue was, that WebGUI does not allow me to change settings, it simply fails with an error which does not give any help.
Setting up things as required from day 0 solved it for me although it not a very practica solution

 

Reply
0 Kudos
Kinnison
Commander
Commander

Hi @PackElend


In my humble opinion, for certain things, the traditional DCUI remains more effective than the CLI or the graphical interface and I tend to stay away from DHCP services for anything that by its very intrinsic nature could be then translated in a potential problem (sooner or later).

The important thing is to solve, and if you have solved I'm happy about it, everything else doesn't matter.


Regards,
Ferdinando

ademirk
Contributor
Contributor

The trick to change management ip address is FIRST change default gateway (Network, defaultTcpipStack) to 0.0.0.0. 

After changing the default gateway you can change the management interface IP to whatever you want.

 

Reply
0 Kudos