D-Link DIR-890L and 802.1q VLAN configuration

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Author Message
finnn
DD-WRT Novice


Joined: 19 Oct 2020
Posts: 5

PostPosted: Sat Oct 24, 2020 15:34    Post subject: D-Link DIR-890L and 802.1q VLAN configuration Reply with quote
Hi,

I have a D-Link DIR-890L gigabit router running DD-WRT v3.0-r44483.I am trying to setup 802.1q VLANs with a trunk between the DIR-890L port labeled 4 to port 1 on a managed switch in the attic, a D-Link DGS-1100-08. But it isn't working for me.


Here is what I have done.
I figured I'd use the default vlan1 on the router (DD-WRT) for normal LAN traffic and an additional vlan10 for the kids LAN traffic. And naturally vlan2 for the default WAN side of the router.

This is the vlan configuration of the attic switch:


I have a hard time understanding which ports are which on the DIR-890L router. As far as I can tell there are the physical labels on the back of the router, then different numbers are used for the WebUI (Switch Config page) and other numbers for the vlan.*ports nvram fields and finally slightly other numbers for the port.*vlans nvram fields. For some info on that have a look here https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=326905. This topic also has the initial nvram fields before I made any modifications.

Anyway. I decided to disregard the WebUI ports and go with the physical labels on the back of the router and the nvram fields. From the link above I got the tip that port.*vlans nvram fields are used for WebUI config and not used by the switch logic, but I tried to set them anyway. For the vlan.*ports fields I took inspiration from the '802.1q VLAN trunk' section on the Switched Ports page (https://wiki.dd-wrt.com/wiki/index.php/Switched_Ports#802.1q_VLAN_trunk)

Here is what I currently have for the nvram variables:
Code:

root@DD-WRT:~# nvram show | grep vlan.*ports | sort
size: 40892 bytes (24644 left)
vlan10ports=3t 5
vlan1ports=0 1 2 3t 5*
vlan2ports=4 5u
root@DD-WRT:~# nvram show | grep port.*vlans | sort
size: 40892 bytes (24644 left)
port0vlans=2
port1vlans=1
port2vlans=1
port3vlans=1
port4vlans=1 10
port5vlans=1 2 10 16
root@DD-WRT:~# nvram show | grep vlan.*hwname | sort
size: 40892 bytes (24644 left)
vlan10hwname=et0
vlan1hwname=et0
vlan2hwname=et0


In other words. My intention is the trunk should be tagged with either VLAN ID=1 or VLAN ID=10, and the other ports on both DIR-890L and the attic switch are untagged.
As indicated above, when I have the trunk cable connected between DIR-890L (labelled) port 4 and the attic switch port 1 then nothing is working. I suppose something is wrong with the tagging..

However if I connect the trunk cable to DIR-890L port labelled 3 and the attic switch port 2 then all traffic is untagged and using VLAN ID=1 and then "it is working".. except the ports aren't segregated as I wanted.

Do the above configurations look alright to you?
Do you have experience setting up 802.1q vlans on the DIR-890L?

Thanks for reading my post, and thanks for any input you can give. Smile

Sign. FiNN



dgs_1100_08_vlans_184-2.png
 Description:
Attic vlans
 Filesize:  79.94 KB
 Viewed:  242 Time(s)

dgs_1100_08_vlans_184-2.png




Last edited by finnn on Fri Oct 30, 2020 17:55; edited 1 time in total
Sponsor
finnn
DD-WRT Novice


Joined: 19 Oct 2020
Posts: 5

PostPosted: Fri Oct 30, 2020 17:48    Post subject: Reply with quote
An update on this in case it helps somebody in the future. I got it working. Smile

In summary the DIR-890L port labelled 4 is trunked to my attic managed switch port labelled 1. The trunk carries vlan1 and vlan10. The attic switch is configured as in the previous post on this topic.

I made various trials (and errors), and during the process I flashed v3.0-r44340 which RageX mentioned in this post:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=288225&postdays=0&postorder=asc&start=90
.. although I am not sure that was actually necessary.

I ended up with this port mapping of the DIR-890L ports:
Physical Port Label | WebUI Port | port.*vlans | vlan.*ports
1 | 4 | 4 | 0
2 | 3 | 3 | 1
3 | 2 | 2 | 2
4 | 1 | 1 | 3
WAN | W | 0 | 4
----
CPU | - | 5 | 5

For setting up the vlans described above I used the WebUI (after all) to set some Switch Config properties:

.. also not sure if this was actually needed or not (I was trying stuff out)..

I changed some of the nvram settings by hand so they look as follows:
Code:

root@DD-WRT:~# nvram show | grep vlan.*ports | sort
size: 40992 bytes (24544 left)
vlan10ports=3t 5
vlan1ports=0 1 2 3t 5*
vlan2ports=4 5u
root@DD-WRT:~# nvram show | grep port.*vlans | sort
size: 40992 bytes (24544 left)
port0vlans=2
port1vlans=1 10 16
port2vlans=1
port3vlans=1
port4vlans=1
port5vlans=1 2 10 16
root@DD-WRT:~# nvram show | grep vlan.*hwname | sort
size: 40992 bytes (24544 left)
vlan10hwname=et0
vlan1hwname=et0
vlan2hwname=et0

.. basically I changed the vlan1ports field and added the vlan10ports and vlan10hwname fields. I didn’t touch the port.*vlans fields as they were set by the WebUI.

I verified 802.1q vlan tags on the trunk using wireshark (for vlan1 traffic).

Lastly, I setup a different IP range for vlan10 and added DHCP for vlan10. Now, when I plug an ethernet cable into the vlan10 ports of the attic switch I get an IP address for the vlan10 range. Smile

Hope it helps somebody.

Sign. FiNN



SwitchConfig1.png
 Description:
SwitchConfig
 Filesize:  63.82 KB
 Viewed:  244 Time(s)

SwitchConfig1.png


Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum