0

I have three bare metal servers; server number one and number two are within the same LAN.

I intend to set up two virtual machines (let's call them A, B) on server number one, two virtual machines (C, D) on server number two, and two virtual machines (E, F) on server number three. My questions are these:

  • Can I create a VLAN between A and B?
  • Can I create a VLAN between A and C?
    • If I use Wireshark, what will I see?
  • Can I create a VLAN between A and E?
  • If I use Wireshark, what will I see?
  • Can what I wrote here be done with Linux Enterprise Server/Red Hat Enterprise Linux?

This is a theoretical question, therefore, if an additional component is required, or if this is not how things are done, I would love to know how they are. Thanks

1 Answer 1

0

Can I create a VLAN between A and B?

Sure! If you have two virtual machines attached to the same virtual bridge, you can just create your desired VLAN interfaces. E.g, if I have two virtual machines, node0.virt and node1.virt, then...

  1. On node0.virt, run:

    ip link add vlan100 link eth0 type vlan id 100
    ip addr add 192.168.100.10/24 dev vlan100
    ip link set vlan100 up
    
  2. On node1.virt, run:

    ip link add vlan100 link eth0 type vlan id 100
    ip addr add 192.168.100.11/24 dev vlan100
    ip link set vlan100 up
    
  3. Now on node0.virt I can successfully ping node1.virt at the VLAN address:

    [root@fedora ~]# ping -c2 192.168.100.11
    PING 192.168.100.11 (192.168.100.11) 56(84) bytes of data.
    64 bytes from 192.168.100.11: icmp_seq=1 ttl=64 time=0.313 ms
    64 bytes from 192.168.100.11: icmp_seq=2 ttl=64 time=0.236 ms
    
    --- 192.168.100.11 ping statistics ---
    2 packets transmitted, 2 received, 0% packet loss, time 1025ms
    rtt min/avg/max/mdev = 0.236/0.274/0.313/0.038 ms
    

Can I create a VLAN between A and C?

Sure, but the process requires a few additional steps. First, this requires* that your physical NIC is attached to the bridge and that the network device to which your physical machines are attached is configured to pass the VLANs you're trying to use. Assuming all that is in place, the process is effectively the same as the previous step.

*: Saying that this is "required" is a simplification. For example, if we use Open vSwitch bridges, we don't need the physical interface attached directly to our bridge because we can create VXLAN tunnels between our physical machines and set up rules on the bridges to translate between VLANs and VXLAN tunnels...but that's getting substantially more advanced.

If I use Wireshark, what will I see?

Where are you running it? With what parameters? You've got a complex configuration here involving multiple physical systems and multiple virtual bridges. I think the best way to answer this question is to set things up and then experiment.

Can I create a VLAN between A and E?

How do you envision this being different than creating a VLAN between A and C, which are also on distinct physical machines?

Can what I wrote here be done with Linux Enterprise Server/Red Hat Enterprise Linux?

What you've described here can be done with any modern Linux distribution. The process of making the VLAN configuration persistent will vary from distribution to distribution. E.g., under RHEL you would probably need to replace the ip commands here with equivalent nmcli commands in order for the configuration to survive a reboot (but the commands here will work fine for testing things out).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .