So I almost have this working, but it’s highly hacky and doesn’t work properly. I’d like to ask, what’s the proper way of doing this, and how to fix one particular problem? My situation is thus:
CentOS 7 host with a pfSense KVM guest, to which the physical WAN ethernet port is MACVTAP passthrough-ed and the physical LAN port is MACVTAP bridged, both successfully. Using virtio drivers and using virt-manager. Other KVM clients succesfully connect on the LAN MACVTAP bridged port, as do other physical machines. But my issues are about trying to connect the host machine as a LAN client.
Actually, it sort-of works. What I’ve done on the host is make a MACVLAN bridge link, and then run dhclient to connect:
ip link add link eno2 name macvlan0 address BLABLA type macvlan mode bridge ip link set dev macvlan0 up dhclient macvlan0
BLABLA is a made-up mac address. This connects as a LAN client and it gets an IP address and it connects to the internet. But, it occasionally disconnects – maybe the lease runs out and it doesn’t ask for another? And also, it doesn’t take a hostname/domainname by which other LAN clients can connect to it. Instead, I have to connect to it by its IP address.
So what’s the right way to set this up, and how can I get it to receive a hostname like all my other clients?