Two physical NIC to server needs to display in proxmox

Sep 2, 2016
40
0
6
47
Hi team,
I am new to proxmox , we have a proxmox having few VM running on it. everything works fine. our proxmox has 3 NIC and currently I am using one for bridge mode.
now I need to enable another NIC (eth1) which I can connect to another network only to access proxmox however we don't immediately running VM should be taking IP from new subnet.
what needs to be done
here is the config file
auto lo
iface lo inet loopback

auto vmbr0
iface vmbr0 inet static
address 172.12.44.100
netmask 255.255.252.0
gateway 172.12.44.1
bridge_ports eth0
bridge_stp off
bridge_fd 0

#up route add -net 10.0.5.0 netmask 255.255.255.0 gw 192.168.33.1 vmbr0
#up route add -net 10.0.4.0 netmask 255.255.255.0 gw 192.168.33.1 vmbr0


and my ifconfig -a show below output

eth0 Link encap:Ethernet HWaddr 00:15:17:fa:c9:0c


any help is appreciated.

Upendra
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2348538 errors:0 dropped:0 overruns:0 frame:0
TX packets:992730 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2538242747 (2.3 GiB) TX bytes:470500494 (448.7 MiB)
Interrupt:20 Memory:b1c00000-b1c20000

eth1 Link encap:Ethernet HWaddr 00:15:17:fa:c9:0d
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:24 Memory:b1b00000-b1b20000

eth2 Link encap:Ethernet HWaddr 00:1b:21:39:4a:07
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:28 Memory:b1980000-b19a0000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:85445 errors:0 dropped:0 overruns:0 frame:0
TX packets:85445 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:56254386 (53.6 MiB) TX bytes:56254386 (53.6 MiB)

tap1003i0 Link encap:Ethernet HWaddr 46:d8:f5:3b:2c:9c
inet6 addr: fe80::44d8:f5ff:fe3b:2c9c/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:838742 errors:0 dropped:0 overruns:0 frame:0
TX packets:2169019 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:357798446 (341.2 MiB) TX bytes:2446982657 (2.2 GiB)

tap1101i0 Link encap:Ethernet HWaddr 2a:e7:00:4c:52:1b
inet6 addr: fe80::28e7:ff:fe4c:521b/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:72876 errors:0 dropped:0 overruns:0 frame:0
TX packets:81056 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:30170868 (28.7 MiB) TX bytes:31076090 (29.6 MiB)

vmbr0 Link encap:Ethernet HWaddr 00:15:17:fa:c9:0c
inet addr:172.16.44.3 Bcast:172.16.47.255 Mask:255.255.252.0
inet6 addr: fe80::215:17ff:fefa:c90c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:124008 errors:0 dropped:0 overruns:0 frame:0
TX packets:66778 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:51261919 (48.8 MiB) TX bytes:75194929 (71.7 MiB)

~
 
Create new section like this:

Code:
auto vmbr1
iface vmbr1 inet static
address 172.13.44.100
netmask 255.255.252.0
gateway 172.13.44.1
bridge_ports eth1
bridge_stp off
bridge_fd 0
 
Thanks for a quick response , after adding these setting do i need to restart the proxmox entire server ? is there any other way around ?
 
Just restart the network with

Code:
service networking restart

or maybe a simple

Code:
ifup vmbr1

will also help if you have not enabled vmbr1 before.
 
yes its works, thanks a lot, now as I added the another Bridge vmbr1 , if the same I tried to do it from Proxmox gui it won't allow me to specify default gateway for newly created vmbr1 as error " default gateway is already assigned for vmbr1" however I am able to specify it from interface file.
does it going to impact ?
 
Normally, there is only one default gateway, therefore you cannot assign more.

Please check the output:

Code:
route -n
 
so what happen in below case
vmbr0 : - 192.168.50.5 default gateway 50.1
vmbr1 : - 192.168.60.5 default gateway should be 60.1 , both are in different vlan and needs to be there.
now as there is only one gateway and which is 192.168.50.1 in our case , what happen if I need to have few VM's should be on 60.x network and need to communicate external world where I need gateway. any suggestion
 
VM network configuration is done inside the VM. Network settings on your proxmox does not propagate to KVM VMs. You do not need to attach an IP to the interface on 60.5, so there is no need for a gateway there.
 

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!