C
C
Cyril2016-11-01 09:01:05
Computer networks
Cyril, 2016-11-01 09:01:05

How to organize VLAN?

I have two VMs running Debian. There is a corporate network 10.75.2.0.
DHCP distributes IP addresses to both machines. Let's say the first has 10.75.2.100, and the second has 10.75.2.200.
I want to make VLAN between these machines. So that in this VLAN both the first machine and the second one have a static IP. For example, the first has 192.168.1.1, and the second has 192.168.1.2.
How to do it right?
I asked myself such a question because from the second machine I want to have constant access to the first one. I do not want to have access to the 10.75.2.0 subnet, because DHCP is there. Non-permanent addresses.
I want to be able to easily connect from virtual machine 192.168.1.2 to virtual machine 192.168.1.1.
In short, I want to create a subnet 192.168.1.0 in 10.75.2.0.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
B
blackbeard, 2016-11-01
@Black_beard_ast

Non-permanent addresses.

So set up static addresses, no?

C
Cool Admin, 2016-11-01
@ifaustrue

If these machines are on the same host, then create an additional map for them in the Host-only network and assign any addresses.
If the hosts are different, then it's not a fact that your VLAN will skip the switch:
1. If it does, then create a virtual one on each current real interface (search for the phrase "debian vlan howto"), assign an IP to the virtual one. Keep in mind that just as IP addresses can be busy on a network, VLAN IDs can also be busy.
2. If the switch does not skip tags, then create a bridge and assign statics to the bridge, and leave dhcp on this interface, I'm not sure if this will work.
Although my IMHO, you just need to work on DNS and not suffer. Machine names don't change, and it's just as unique as an IP.

O
other_letter, 2016-11-01
@other_letter

Emm... And to assign the second addresses to the same interface?
Windows can do it, surely Debian can't handle it?
You will also have a regular, issued address and a permanent one in addition. This time.
It is possible to chop off the DHCP client and register everything with pens. This is two.
Well, what are you virtualizing machines on - all the environments I know can make a virtual switch

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question