missing ifconfig on VMWare 3.5

I'd like to use ifconfig to discover/set the IP addresses of the physical NICs in my VMware host server from the console.  But when I try to locate the ifconfig utility, it doesn't seem to be installed.  Neither 'find' nor 'slocate' can locate the utility.  It doesn't seem to be in /sbin or any other place.

I'm open to alternatives.  All I need to do is set the IPs for the physical NICs on the host server.  These NICs are connecting my VMs to our production LAN via a vSwitch.
Much thanks!
DetersLawAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ArtFunGuyCommented:
ifconfig is situated in /sbin on an ESX 3.5 Vmware server
you must be root to use this command
0
haeussleCommented:
If you do not have the ifconfig in sbin I can only assume you have ESXi

If your using ESXi I would recommend downloading the RCLI (Remote Command Line Interface) which is a Virtual Appliance to help with the command line of ESXi.

Or you can look at
esxcfg-vmknic

esxcfg-vmknic <options> [[<portgroup>]]
-a|--add                   Add a VMkernel NIC to the system,
                           requires IP parameters and portgroup name.
-d|--del                   Delete VMkernel NIC on given portgroup.
-e|--enable                Enable the given NIC if disabled.
-D|--disable               Disable the given NIC if enabled.
-l|--list                  List VMkernel NICs.
-i|--ip <X.X.X.X> or DHCP  The IP address for this VMkernel NIC.
                           Setting an IP address requires that the
                           --netmask option be given in same command.
                           Setting this to DHCP requires DHCP support
                           in the VMkernel
-n|--netmask <X.X.X.X>     The IP netmask for this VMkernel NIC.
                           Setting the IP netmask requires that the --ip
                           option be given in the same command.
-P|--peerdns               Set peer dns. If set the system
                           will use the HostName, HostIPAddress
                           Domain returned by DHCP. Valid only for DHCP
-t|--tso                   Disable TSO for the vmknic being created.
-m|--mtu MTU               MTU for the interface being created.
-r|--restore               Restore VMkernel TCP/IP interfaces from
                           Configuration file (FOR INTERNAL USE ONLY).
-h|--help                  Show this message.

0
random_ruCommented:
DetersLaw,

What distribution and kernel version of Linux are you using? Ifconfig is a standard command included in linux. What is the syntax of the 'find' command you are using? In order to create an updated database of the search indexes for locating files you need to run 'updatedb' command. After it is finished, try locating the ifconfig again.
 - try locating ifconfig as root
 - try finding ifconfig as root

If ifconfig is indeed missing, the source package of net-tools (could be called diffferently depending on the distribution) could be installed or compiled.

If all above fails, you can manually edit configuration files:

cd /etc/sysconfig/network-scripts
cat ifcfg-eth0

Static configuration example:
#
# File: ifcfg-eth0
#
DEVICE=eth0
IPADDR=192.168.1.100
NETMASK=255.255.255.0
BOOTPROTO=static
ONBOOT=yes
#
# The following settings are optional
#
BROADCAST=192.168.1.255
NETWORK=192.168.1.0

**************************************************************************************

DHCP Configuration Example:

#
# File: ifcfg-eth0
#
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes

If you have any further questions on editing configuration files, refer to: http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch03_:_Linux_Networking

Let me know if you are still having problems. Good luck!

0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

random_ruCommented:
ArtFunGuy,

You do not have to be root to run the command, it should be located in /sbin thus a user can simply run /sbin/ifconfig. The reason why you are switching to the root used is because /sbin is now in your default $PATH and now you can omit /sbin and simply use the command name to run it. You can configure your PATH by editing a configuration fie in your home directory or running a command to add /sbin to the default PATH, but that's info for a different post.
0
colinvannCommented:
Hi there,

By default the service console is on the vswif0 interface.

Run the following command to change its IP:
  esxcfg-vswif -i <new IP> -n <new netmask> vswif0
new IP = your new IP address (eg: 192.168.0.100)
new netmask = your new netmask (eg: 255.255.255.0)

If you need to change the default gateway, edit the /etc/sysconfig/network file directly:
  vim /etc/sysconfig/network
You'll see the value that you need to update once you open the file, it is called GATEWAY.

I hope that helped,
Colin


0
za_mkhIT ManagerCommented:
In ESX, you don't use ifconfig to configure networking.
You would use these commands
esxcfg-nics
esxcfg-vswitch
esxcfg-vswif and
esxcfg-vmknic
 
 
0
DetersLawAuthor Commented:
I have learned that physical adapters servicing a virtual machine port group don't need IP addresses assigned (Service Console and VMKernel port groups have IP addresses assigned).

Thanks all!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.