-1

Two machines have bond0 configured to access the Internet.
Technicians in datacenter say the VLAN is created, I just need to configure interfaces on servers to work with it correctly (create a subnet).
What I have right now:

auto bond0
        iface bond0 inet static
        slaves eno1 eno2
        address X.X.X.78/29
        gateway X.X.X.73

auto vlan10
     iface vlan10 inet static
     address 192.168.10.6
     netmask 255.255.255.0
     network 192.168.10.0
     broadcast 192.168.10.255
     vlan-raw-device bond0

Even though networking service starts normally, I can't ping the 192.168.10.6 machine from 192.168.10.3, and vice versa.
What am I missing?

Note: if I use ip address add 192.168.10.X/24 dev bond0 on both machines, the pings work, until I reboot the machines. How to edit interfaces file so that the local subnet would keep on existing after reboot?

mekkanizer
  • 125
  • 4
  • You've just added the `192.168.10.x` address as a secondary address on the main untagged `bond0` interface and not on the VLAN interface surely? – bodgit Dec 13 '18 at 10:41
  • @bodgit I'm yet to figure out how do I use VLAN. I need one of the machines to be cut off of SSH, and other provide access to it. I've set up an OpenVPN server of the outward-accessible machine, but I don't knwo how to "hide" the other machine there. With VLAN, I guess?? Or VPN server is enough. – mekkanizer Dec 13 '18 at 11:22

1 Answers1

0

Try to use the dot notation to specify the tagged VLAN:

iface bond0.10 inet static
    address 192.168.10.6
    netmask 255.255.255.0

If this does not work, check TCPDump to see what actually goes in the wire and if packets are tagged or not.

Also make sure you have vlan support enabled in your kernel.

Tero Kilkanen
  • 36,796
  • 3
  • 41
  • 63