Community discussions

MikroTik App
 
zonosfera
just joined
Topic Author
Posts: 2
Joined: Sat Sep 05, 2020 6:30 am

Access to physical network of virtual machine (linux host, virtualbox windows)

Sat Sep 05, 2020 6:37 am

hello, good evening, my name is victor Ramos from Peru ...

this is my first post I just registered. I have been working with routerOS for a long time (at a very basic level, since I had my wireless internet business, now I only use it to control access in my house)

As everyone knows, Linux has many problems with proprietary or proprietary software. and although they have improved a lot, at least in printers they lack many models available to be fully compatible ...

this problem of drivers for printers is the one that has made me come here ... well the solution that I find is that I have no choice but to virtualize windows to be able to install and make use of my epson L3150 printer ... and the shared resources from my home network (95% windows) ... which I cannot access because windows 10 no longer has samba installed by default in these last editions and no longer allows it to be installed due to security issues, which makes my latop with linux to all the resources in my house

in my lab I tried a tplink router flashed to gargoyle to simulate a different network, configuring my laptop's wireles card in virtualbox as a bridge adapter ... I was able to connect to my home network ... the router gave my laptop already The virtual machine IP's in the same network segment and I was able to install the printer, connect to all the PCs in my house and work normally, of course all this supported by the virtualization of windows ...

but when trying to do the same in my hAP-Lite router, in IP / Leases, I reserve an IP with the virtual mac and the same in ARP so that only the machines that are registered have internet ... the hAP gives it the IP reserved, it appears as connected ... but I do not have an internet connection through the virtual one, only through the physical machine .... when I change the virtual card from bridge to nat the internet works correctly, but I can no longer access the home network because I have the adapter with a different ip ...

Could someone give me a hand ... because it works in the Tplink / Gargoyle and not in the hAP ...

Excuse the English, it is translated by google, since in the forums in Spanish, nobody helps me ...

Thanks and regards...
 
jarda
Forum Guru
Forum Guru
Posts: 7756
Joined: Mon Oct 22, 2012 4:46 pm

Re: Access to physical network of virtual machine (linux host, virtualbox windows)

Sun Sep 06, 2020 7:37 am

Is seems like you have two interfaces that should be in common bridge and are not. Maybe disabling of hardware offload on the bridge members could help too.
 
zonosfera
just joined
Topic Author
Posts: 2
Joined: Sat Sep 05, 2020 6:30 am

Re: Access to physical network of virtual machine (linux host, virtualbox windows)

Sun Sep 13, 2020 1:08 am

thanks... I tryed

regards
 
sindy
Forum Guru
Forum Guru
Posts: 10206
Joined: Mon Dec 04, 2017 9:19 pm

Re: Access to physical network of virtual machine (linux host, virtualbox windows)

Sun Sep 13, 2020 1:58 pm

The standard wireless protocol has a limitation - while there are two fields for the AP-side MAC address, the one of the wireless AP and the one of the actual sender or recipient, there is only a single field for the MAC address of the STAtion. Hence when you attach a bridge on the physical machine to the wireless interface, frames from all devices connected to that bridge have the MAC address of the wireless interface as source; the DHCP payload, however, bears the actual MAC address.

If I read you properly, I have a reverse setup than you - a Windows 10 laptop with Hyper-V running some CHRs and a Linux virtual machine, whilst you are running a virtual Windows machine on a Linux laptop. In the Hyper-V case, the software bridge seems to manipulate the ARP responses from the virtual ports when sending them to the AP via the wireless interface, so the records for all the IP addresses behind that bridge in Mikrotik's ARP table show the same MAC address, and the bridge host table at Mikrotik side doesn't contain any of the virtual machines' MAC addresses. But the bridge has to also maintain its own IP address to MAC address translation table so that it could forward the packets received from the AP to the correct destination MAC address.

Apparently, the virtual bridge on Linux behaves different, but Gargoyle addresses it somehow at its end - tcpdump, arp -n, and the leases file should shed some light on how exactly. Wireless sniffing on the Mikrotik AP would also be helpful to find out what is actually running in the air.

However, it may be simpler than that - first of all, try to remove the static lease and see what happens when the VM asks for a lease. The thing is that there is the client-id field and the mac address field, and these are different although the client-id is often based on the MAC address of the client. So if you've created the static lease manually rather than making a dynamic one static, the link between the two may be different than needed.

Who is online

Users browsing this forum: Amazon [Bot], go4030, Google [Bot], GoogleOther [Bot], junbr0, Kevo, UncleGringo and 35 guests