how create virtual interface (as Cisco vlan)

If the switch is configured to only receive untagged packets and add them internally to clean 18, then there is nothing you can do on the FreeBSD side of things.

If you want two separate vlans, then the switch needs to be configured to support multiple tagged vlans on that port (aka a trunk port).

If you can't reconfigure the switch, then vlans won't help you. You'll just need to either use two separate IP subnets and aliases (bge1=192.168.0.1/24 and bge1_alias0=192.168.1.1/24), or use two separate aliases in the same subnet (bge1=192.168.0.1/24 and bge1_alias0=192.168.0.10/32).
 
Back
Top