URGENT: How to change Default Gateway after installation mistake

driftwood

New Member
May 11, 2020
5
1
1
52
Ive made a little error on choosing the wrong nic during initial Proxmox install and as Ive made VMs now so I dont want to reinstall. Ive two orange flashing nics on my motherboard an Aquantia and Realtek and Proxmox host is using the fastest one (Aquantia) which I now want to use for my VM OS and passthru. There is a secondary Realtek nic on this motherboard that is plugged in but is showing DOWN...

How on the Network tab can I change the current default gateway 10G Aquatia nic (which is linux bridged) to the other nic 2.5G ( realtek ) so I can use Aquantia for VMs? Or do I have to use CLI and how?

Currently
Aquantia enp68s0 is current default gateway nic
Realtek enp70s0 is showing DOWN at the moment.

Is there a simple method ?

Im hoping the Realtek is supported in 6.2? Its a R8169 Realtek

Thank you, hope you can help.
 
Last edited:
Okay I answered my own question:

In Proxmox use the pve> 'Network' tab and the SHELL cli :

Use 'ip a' to get a listing of current Default Gateway and IP being used by Proxmox

Take a look at your current /etc/network/interfaces (use nano but dont change stuff here, CTR X without saving), notice here in this example that interfaces use enp68s0 and is bridge ported to vmbr0.

I want to be able to swap/change enp68s0 (A fast 10G Aquantia nic currently 'taken' by the proxmox host) to a 2.5G Realtek on enp70s0. Note enp70s0 is currently not active.

----------------------BEFORE ---------------------------
auto lo
iface lo inet loopback

iface enp68s0 inet manual

auto vmbr0
iface vmbr0 inet static
address 192.168.1.134
netmask 255.255.255.0
gateway 192.168.1.254
bridge_ports enp68s0
bridge_stp off
bridge_fd 0

iface enp70s0 inet manual
--------------------------------------------

Lets issue a ip link show command and see whats going on BEFORE the change we're about to swapover nics.

root@pve:~# ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp70s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether a8:a1:59:16:33:85 brd ff:ff:ff:ff:ff:ff
3: enp68s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master vmbr0 state UP mode DEFAULT group default qlen 1000
link/ether a8:a1:59:16:33:87 brd ff:ff:ff:ff:ff:ff
4: wlp69s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 50:eb:71:77:e7:fa brd ff:ff:ff:ff:ff:ff
5: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether a8:a1:59:16:33:87 brd ff:ff:ff:ff:ff:ff

Now Ill show you how to to edit in Network tab, or CLI to discover how I got to the results of AFTER the swapover below;-

Edit each network device to make sure they each have their own IP (the enp68s0 will keep its current details so you can leave it alone, but remove its gateway because the other nic is going to be default gateway). The nic you are swapping to will now have a Default Gateway to your home network's gateway once youve entered an address (e.g. 198.162.1.254) so enter that in this net device. The enp70s0 wont need IP info if using a Linux bridge as the bridge will hold the details.

You will have noticed I have a Linux Bridge in use on vmbr0 so we're going to reassign it to enp70s0: So take a note of the vmbr0 Linux Bridge details, remove & re-add/or just edit existing details to read enp70s0 in place of enp68s0 and bridge ports to = new nic to be used - ie the enp70s0.

The enp70s0 will now become vmbr0, input that nic card's address in ipv4 (eg in my case 192.168.1.144/24), set Gateway ipv4 to your home network gateway (e.g. in my case 192.168.1.254) and finally Set to autostart by checking its box)

So you have basically swapped the information around from one nic to another and on reboot you've activated the new nic assignment and this will become the default used by proxmox host.

You can see by me BEFORE (see top) and AFTER (see below) details as to how it all now looks.

(Note: to do above you can alternatively use CLI with nano /etc/network/interfaces if you prefer to edit directly)

-----------AFTER---------------

auto lo
iface lo inet loopback

auto enp70s0
iface enp70s0 inet manual

iface enp68s0 inet static
address 192.168.1.134/24

auto vmbr0
iface vmbr0 inet static
address 192.168.1.144/24
gateway 192.168.1.254
bridge-ports enp70s0
bridge-stp off
bridge-fd 0


----------------- ip a AFTER ---------------------------
root@dwd:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp70s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master vmbr0 state UP group default qlen 1000
link/ether a8:a1:59:16:33:85 brd ff:ff:ff:ff:ff:ff
3: enp68s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether a8:a1:59:16:33:87 brd ff:ff:ff:ff:ff:ff
4: wlp69s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 50:eb:71:77:e7:fa brd ff:ff:ff:ff:ff:ff
5: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether a8:a1:59:16:33:85 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.144/24 brd 192.168.1.255 scope global vmbr0
valid_lft forever preferred_lft forever
inet6 2a00:23c6:ab84:8b01:aaa1:59ff:fe16:3385/64 scope global dynamic mngtmpaddr
valid_lft 314957848sec preferred_lft 314957848sec
inet6 fd65:76f8:30e8:1:aaa1:59ff:fe16:3385/64 scope global dynamic mngtmpaddr
valid_lft forever preferred_lft forever
inet6 fe80::aaa1:59ff:fe16:3385/64 scope link
valid_lft forever preferred_lft forever



Hope this helps anyone who was confused and reluctant to change nics for fear of losing guest web access to the host like I was!
 
  • Like
Reactions: green72

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!