The use of the virtual local area networks (VLAN) technology is a well-known method of restricting access to network elements in heterogeneous network infrastructures, including critical infrastructures. The essence of the VLAN usage is to create a set of virtual subnets and in the distribution of computers on these subnets. This distribution is described by a "computer-subnet" matrix, called the VLAN-based access control scheme. The formation of an access control scheme is an NP-complete problem, and for its solution several methods are known, including genetic algorithms. However, for large critical infrastructures, the solution of this problem by known methods is very laborious due to its large dimension. The paper proposes to introduce the concept of "roles" for VLANs and use the rolebased approach to optimize VLAN-based access control schemes. To solve the optimization problem, an improved genetic algorithm is proposed. Improvements are associated with the multichromosome representation of individuals, a new type of fitness function, a two-dimensional type of crossover operation, and a number of other aspects. The results of the experiments show the high efficiency of the proposed genetic algorithm.