Sunday, February 14, 2021

Basic network commands in Proxmox PVE

If you use Proxmox PVE, you may have noticed that popular ethernet / IP / networking tools commands are not working in proxmox.  I am talking about basic commands like ifconfig.

So I just want to create this simple post as reminder for myself and for others using proxmox to use the following commands instead:


ip a

The ip command kind of replaces the ifconfig command.  The above command 'ip a' will list all network adapter detected and show their states (up/down).


ifup

The ifup command will bring up (activate) (make online) a particular network adapter.


ifdown

The ifup command will bring down (de-activate) (make offline) a particular network adapter.


The commands above works on virtual / bonded adapters too such as vmbr0.


LOCATION OF LIST OF INTERFACES CONFIGURATION

If you want to edit the list of interfaces, you can find them here:

/etc/network/interfaces

to edit simply use nano command like this:

nano /etc/network/interfaces


INSTALL NET-TOOLS

If you don't want to deal with new commands that you have to remember like 'ip a' etc... maybe you just want to install the same networking commands you are used to like ifconfig, you can just install them by typing the commands below:

apt-get update

apt-get install net-tools