Please, explain the reason why you need more MAC addresses in one device. If you need multiple dynamically assigned IP addresses to multiple interfaces of one device, use solution #2 below. But the IP address of each interface must be in separated IP network, not in the same network, as you suggested (192.168.64.0/24). Only one DHCP server with more DHCP scopes assigned to more IP networks is enough in solution #2, one scope to one IP network.
Special IP setting for each node in the same IP network can be solved by IP reservations in the DHCP server.
Situation
Maybe I am wrong, please, correct me. But I think it is your misunderstanding concerning VLAN's and IP interfaces.
VLAN is setting concerned to layer 2 (L2) of OSI model. It operates with data frames, 802.1Q tagging and MAC addresses. A VLAN tagging split one flat L2 network into multiple L2 networks which can operate independently on the same physical infrastructure. It is like to divide one network switch to multiple separate switches. The switches can be connected via L3 router. In this case the L2 separation (broadcast domains etc.) remains, but networks can communicate over the router. Router can filter the IP communication, blocks broadcast frames and do other useful things.
You wrote:
For example if the subnet is 192.168.64.0/24, I've parent interface ip(VM IP) as 192.168.64.100 and multiple subports such as 192.168.64.101, 192.168.64.102 with different VLAN IDs.
VLAN's are usually used to separate complete IP networks each from other, but not to separate individual IP addresses in one (the same) IP network!!! It means one VLAN should be connected to one IP network by this way (example):
- VLAN 10 <--> 192.198.110.0/24
- VLAN 20 <--> 192.198.120.0/24
- VLAN 300 <--> 192.198.5.0/24
- etc.
IP networks and addresses lie in L3 of OSI model. It is higher level and in most concepts the IP network is "inside" L2 network, i.e. inside VLAN.
In that concept usually router for inter-VLAN routing should be created with multiple interfaces, each in one VLAN. Example:
- eth0.10, VLAN 10, IP 192.168.110.1
- eth0.20, VLAN 20, IP 192.168.120.1
- eth0.300, VLAN 300, IP 192.168.5.1
Subports you mentioned (192.168.64.101, 192.168.64.102 ...) cannot be in the separated VLAN's if they are in the same IP network. It is VLAN concept upside down. I have mentioned example about separated switches. If you separate one switch into multiple virtual switches and then you connect all these switches to one IP network, you lose the separation. There is no sense for separation of switches if they are interconnected via the same IP network and same broadcast domain.
Any network node incl. PC, VM or inter-VLAN router cannot have more IP interfaces in the same IP network or subnet, because in this case does not exist rule to tell to the node which of the same-level same-network interfaces must be used to communicate to peer node in the same network.
Possible solution
Possibility #1
Do not use VLAN's at all. Use one IP network with multiple IP nodes. One node is your host, second node is your first virtual machine, third node is your second VM etc. Only one IP interface on your host is needed to be able communicate with all virtual machines.
Possibility #2
- Create multiple (L2) VLAN's. Create multiple (L3) IP networks and assign one to one: VLAN to IP network.
- Create inter-VLAN router in your host. Create more IP interfaces and set each one to one VLAN. See above to my list with eth0.10, eth.20... interfaces.
- Enable IP routing in your host.
- Assign one IP interface to each of your VM's. Each VM will be in separate IP network and separate VLAN. The VM's can communicate each to other only if router in your host allows it.