You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 10
Next »
https://pve.proxmox.com/wiki/Network_Configuration
1- create a bridge
2- active the second interface
Solution |
|
---|
create Bridge | |
Need to install ifupdown2 |
|
| ifdown enp2s0 ifdown vmbr1 |
| iface vmbr1 inet dhcp ifup enp2s0 ifup vmbr1
root@hp8300:~# more /etc/network/interfaces
auto lo
iface lo inet loopback
iface eno1 inet manual
auto vmbr0
iface vmbr0 inet static
address 192.168.0.9
netmask 255.255.255.0
gateway 192.168.0.1
bridge_ports eno1
bridge_stp off
bridge_fd 0
iface enp2s0 inet manual
auto vmbr1
iface vmbr1 inet dhcp
bridge_ports enp2s0
brdige_stp off
|
|
root@hp8300:~# ifup vmbr1
Waiting for vmbr1 to get ready (MAXWAIT is 32 seconds).
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/vmbr1/68:05:ca:16:08:6f
Sending on LPF/vmbr1/68:05:ca:16:08:6f
Sending on Socket/fallback
Created duid "\000\001\000\001'IG\375h\005\312\026\010o".
DHCPDISCOVER on vmbr1 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on vmbr1 to 255.255.255.255 port 67 interval 8
DHCPOFFER of 192.168.1.12 from 192.168.1.1
DHCPREQUEST for 192.168.1.12 on vmbr1 to 255.255.255.255 port 67
DHCPACK of 192.168.1.12 from 192.168.1.1
bound to 192.168.1.12 -- renewal in 33322 seconds.
root@hp8300:~#
root@hp8300:~# ip addr
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: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master vmbr0 state UP group default qlen 1000
link/ether 6c:3b:e5:38:93:35 brd ff:ff:ff:ff:ff:ff
3: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master vmbr1 state UP group default qlen 1000
link/ether 68:05:ca:16:08:6f brd ff:ff:ff:ff:ff:ff
4: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 6c:3b:e5:38:93:35 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.9/24 brd 192.168.0.255 scope global vmbr0
valid_lft forever preferred_lft forever
inet6 fe80::6e3b:e5ff:fe38:9335/64 scope link
valid_lft forever preferred_lft forever
5: vmbr1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 68:05:ca:16:08:6f brd ff:ff:ff:ff:ff:ff
inet 192.168.1.12/24 brd 192.168.1.255 scope global dynamic vmbr1
valid_lft 86248sec preferred_lft 86248sec
inet6 fe80::6a05:caff:fe16:86f/64 scope link
valid_lft forever preferred_lft forever
root@hp8300:~# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=2.71 ms
|
|
|
---|
| |
VM | adding vmbr1 to the VM |
| |