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 dhcp 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 | |
dhcp client 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:~# | |