# VLAN questions



## dman776 (May 9, 2019)

Hi, I have the following scenario and am trying to get this to work on OSX 10.14.4:


I have a USB ethernet dongle that is connected to my local LAN.   (192.168.0.x network)
I have another USB ethernet dongle that is a microrouter.  
The microrouter expects untagged packets to be on the LAN of the microrouter.
The microrouter expects VLAN1 packets to be on the WAN of the microrouter (for internet access)
How can I create a VLAN (1) between these 2 interfaces and have the local LAN (untagged) traffic routing to VLAN1 tagged packets for the microrouter (WAN)?

Any thoughts?

Thanks,
Darryl


----------



## dman776 (May 13, 2019)

Did i explain this properly, or, is it just not possible?


----------



## DeltaMac (May 13, 2019)

No, it's not clear at all to me what you want to achieve. You seem to be describing different LAN configurations, without also telling what your goal is:
Security?
Network connection versatility?
Connecting other devices, such as a CNC router?

You DON'T say what kind of devices you are connecting with a VLAN (computer, plotting device, other routers, or smart switches, etc)
So far, just guessing that you want to use a VLAN to connect other devices (a LAN doesn't operate on itself - it DOES something, like connecting to another LAN, or connecting devices together to share or move data, or control signals to make some device do a job that you need.)

(I am no expert on networking, just a guy with a little knowledge, who asks questions  )


----------



## dman776 (May 13, 2019)

good feedback.   Thanks.

I have a GL.iNet USB150 microrouter device (USB)
It is OpenWRT based.
I replaced the original firmware with AREDN firmware  (also based on OpenWRT).   www.arednmesh.org
The AREDN firmware has network definitions for:

WAN Traffic is tagged to VLAN1 (eth0.1)
LAN traffic is untagged (no VLAN)
When I plug the microrouter into my Macbook's USB port, the microrouter appears as a new ethernet port. (as expected)
The new interface on my mac gets an IP from the micro's DHCP server as expected.
I can interact with the microrouter as a LAN device without issue.

My goal, is to provide "internet" access to the microrouter from another interface on my Macbook. (ie. another wired ethernet and/or wifi).
I order for the micro to see this "internet" access, it MUST be tagged as VLAN1 to the microrouter.

NORMALLY, for other NON-USB based AREDN devices, i would setup an external 802.1q capable switch and tag a port with an upstream internet connection as VLAN1 (untag outbound traffic) AND tag the port with the AREDN device as VLAN1 (tagged).

Does that help clarify the setup and goal?

thanks


----------



## DeltaMac (May 13, 2019)

I thought at first that you were going after a high-security VPN of some kind - but now I see that you work with (or have a hobby around) something that, to me, is a very narrow function: emergency, or as-needed communication setup. Am I correct about that?

But, taking a wild stab at this, wouldn't you just go into the router settings (probably a web interface?) to do your network setup?
Do you have previous experience in setting up what you need for the network connection that is required?
(Watch as I randomly poke a thumbs-up, pretending to think that I am giving you an intelligent response  )
Another random question:
That GL.iNet gets POWER from USB, but doesn't have a hardware network port, just WiFi - correct?
The USB bus is not where the router port is. That's just to power the microrouter, which COULD be plugged into ANY USB port for power, even on a power strip.
So, you don't have a USB-based AREDN device. You DO have a microrouter that uses a USB port for power, and (I think) that's all.
Or, am I missing something about how you use that microrouter

Is there any support on the AREDN site for using your GL.iNet device? It appears to be a device that has incomplete support for AREDN. Maybe I am just missing that kind of info, but it looks like support for your AREDN device is not too polished.
Do you get good response with tech questions at that AREDN site?

(Last note: I am WAY out of my league "helping" you with this kind of tech. Hope you aren't offended...! )


----------



## dman776 (May 14, 2019)

no worries @DeltaMac.

You are correct about the use-case of AREDN.   I am a developer (and Board Member) of AREDN, Inc.
the GL.inet USB150 not only gets power from USB, but, also is an ethernet interface.   This is a new device (in our nightly build) to our project so we are working thru the kinks and configs.


----------



## DeltaMac (May 14, 2019)

"Ethernet interface", in my addled brain, is one that has an ethernet connector.
The only pictures that I see of the USB150 (I don't have one of those), is one that resembles a USB flash drive, with no connectors, other than the USB used for power.
So, virtual network connection, that the computer sees as an ethernet port, although actually a wifi connection?
What am I missing here?
(I'm just trying to clarify that in my own brain.  )

With that in mind (not really a hard/ethernet connection), then connecting from a Wifi router, you would need a Wifi device to connect to on your communications gear. 'tis not an ethernet question, but Wifi. Or, do you do any network setup same as ethernet, even though the actual connection is Wifi?
(This displays my ignorance about network configuration, but also hoping that it may trigger your own knowledge, and help in some small way.)


----------



## dman776 (May 14, 2019)

The USB150 presents itself to a host pc as an ethernet interface (via USB).  When connected to a computer, the computer will receive a DHCP address from the microrouter.
The Microrouter has a 2Ghz wifi card inside that meshes to other AREDN nodes via RF (once it is flashed with AREDN firmware)


----------



## DeltaMac (May 14, 2019)

Oh, well... Got it...
Thanks for the (short) education.
Does that little microrouter then give you more signal range than the internet sharing that's internal to the macOS system?

(edit)Nevermind, now I understand, you are using the AREDN firmware to make the connection process part of the solution, and not part of the problem - and gives you some hardware that already speaks in the same language (more or less) to the hardware you need to use....
I think I had a "eureka" moment there -
But, in the end, I really can't speak to your need for a useful network setup (the VLAN packets) as I have no relevant experience to share. Sorry I can't be more helpful


----------



## Satcomer (Feb 13, 2020)

dman776 said:


> The USB150 presents itself to a host pc as an ethernet interface (via USB).  When connected to a computer, the computer will receive a DHCP address from the microrouter.
> The Microrouter has a 2Ghz wifi card inside that meshes to other AREDN nodes via RF (once it is flashed with AREDN firmware)


Then learn to Terminal command 
	
	



```
man networksetup
```
 to code properly the network stack in Mac OS!


----------

