Author Topic: [SOLVED]Creating VLANs with a D-link managed switch + ebox router  (Read 3909 times)

Hiro

  • Zen Apprentice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
I have trouble setting up various vlans on a net which connects to the internet through an Ebox router. The router is connected to a d-link lvl2 managed switch, and the switch has each port connected to 1 or more hubs/machines.

I did the following:
1 - Define a interface as trunk in the Ebox router. I create the various vlans (vlan1, vlan2, etc..) and assign them a static IP each.
2 - Configure port 1 on the switch (the one where the router is connected) as a trunk and "tag" it, the rest of the ports are configured as "untagged" if they belong to the vlan, or "not member" if they don't.

When all this is done, I lose internet connectivity, but I can still reach the local machines connected to the vlan. Any ideas of what i'm doing wrong?

Thanks in advance,
Dani.

Edit: If I leave the switch port 1 as untagged, I do have internet connectivity, but it will only work for 1 vlan (it won't be a trunk), right?


« Last Edit: August 24, 2009, 10:34:28 am by Hiro »

Hiro

  • Zen Apprentice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: [SOLVED]Creating VLANs with a D-link managed switch + ebox router
« Reply #1 on: August 24, 2009, 10:40:26 am »
I'll post the solution in case someone has the same problem:

For some reason, Ebox showed the correct configuration of the vlan interfaces in the web GUI, but was not saving it in /etc/network/interfaces.
I edited the file and everything worked.
Here's the example interfaces file, eth1 is the WAN interface, and eth0 is the trunk connected to the switch:

auto lo eth1 vlan1 vlan2 vlan3
iface lo inet loopback
iface eth1 inet static
  adress ....
  netmask ....
  broadcast ....

iface vlan1 inet static
vlan-raw-device eth0
  adress ....
  netmask ....
  broadcast ....

iface vlan2 inet static
vlan-raw-device eth0
  adress ....
  netmask ....
  broadcast ....

iface vlan3 inet static
vlan-raw-device eth0
  adress ....
  netmask ....
  broadcast ....


Thanks to Isaac @ IRC #ebox for your help!





isaac

  • Zen Warrior
  • ***
  • Posts: 148
  • Karma: +0/-0
    • View Profile
Re: [SOLVED]Creating VLANs with a D-link managed switch + ebox router
« Reply #2 on: August 24, 2009, 02:53:34 pm »
You are welcome :) Thank you for posting this, we will look into it.