1

I simply need to dedicate 1 host physical port to 1 virtual port of guest without help of libvirt.

Host has:

  • 2 physical interfaces: eth0 and eth1
  • 1 virtual bridge(vmbr0), that include virtual interfaces of all VMs
  • eth0 is in bridge mode with vmbr0. Thanks to that all guests and host are in the same subnet (192.168.247.0/24).

Here is my config of /etc/network/interfaces

auto lo
iface lo inet loopback

iface eth0 inet manual
iface eth1 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.247.2
        netmask 255.255.255.0
        gateway 192.168.247.1
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0

eth1 must be connected to ISP modem. So eth1 will be exit to internet. I want to dedicate eth1 to virtual firewall that is one of the virtual machines in the host. And virtual firewall will do all routing job, not the host.

As far as I see for that task I must to use MacVTap (macvlan), but all guides that I saw was for KVM+libvirt, and I don't have libvirt! There is Proxmox who is doing all "user friendly tasks"

As you can see bellow right now there is only 1 VM enabled, it's interfaces tap101i0 and tap101i1, where tap101i0 suppose to be in vmbr0 and share the same subnet mask as eth0 of the host. And tap101i1 must be 100% bound with eth1 of the host, so it will be exit to internet.

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master vmbr0 state UP mode DEFAULT group default qlen 1000
    link/ether 00:15:17:50:95:66 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:15:17:50:95:67 brd ff:ff:ff:ff:ff:ff
6: tap101i0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether 06:97:77:30:cc:a7 brd ff:ff:ff:ff:ff:ff
7: tap101i1: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether ce:b4:f3:40:38:0d brd ff:ff:ff:ff:ff:ff
8: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 00:15:17:50:95:66 brd ff:ff:ff:ff:ff:ff

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.