Tag WAN port with VID / VLAN 300

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


Joined: 02 Dec 2009
Posts: 5

PostPosted: Sat Dec 29, 2018 10:59    Post subject: Tag WAN port with VID / VLAN 300 Reply with quote
Hello,

I've got a fiber internet connection (from T-mobile Thuis, Netherlands) and would like to use my own router rather than the modem provided by my ISP.

Looking at the ISP's modem configuration & reading online I'm confident my ISP has 3 VLANS

- Internet: vid 300
- TV: vid 640
- Management: vid 100

I am only interested in the internet part. On my Netgear R7000 (stock firmware), I could add this VLAN using the IPTV option (https://kb.netgear.com/29911/Configuring-VLAN-IPTV-setup-on-your-Nighthawk-router)

However, I am struggling to get this working using dd-wrt.

I read many conflicting posts on this forum. Some say Broadcom chipset only supports 15 VLANs, some say later dd-wrt builds support up to 4096 VLANs and others claim VLANs and tag/vids are different things.

Is it possible to have my router get an internet connection using dd-wrt when my ISP uses VLAN 300?

Info:
NETGEAR R7000 AC1900
Using the latest Kong build (http://www.desipro.de/ddwrt/K3-AC-Arm/) First updated to dd-wrt.K3_R7000.chk then dd-wrt.v24-K3_AC_ARM_STD.bin 2018-09-23)
Sponsor
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 5227
Location: Akershus, Norway

PostPosted: Sat Dec 29, 2018 11:17    Post subject: Reply with quote
https://wiki.dd-wrt.com/wiki/index.php/Switched_Ports#Broadcom_VLAN_limit
Xeli
DD-WRT Novice


Joined: 02 Dec 2009
Posts: 5

PostPosted: Sat Dec 29, 2018 12:23    Post subject: Reply with quote
Thank you, that helps. One question though. At the end of the script he uses:

Code:
# Tell DD-WRT PPPoE startup code to use the new WAN interface
/usr/sbin/nvram set pppoe_wan_ifname=vlan1000


My isp does not use pppoe do I need to set anything specific for it to work?

I've tried setting wan_ifname / wan_ifnames / wan_ifname2 to vlan300 but that does not work.
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 5227
Location: Akershus, Norway

PostPosted: Sat Dec 29, 2018 12:50    Post subject: Reply with quote
You don't need to configure PPPoE if you don't use it.

Have you got the right port numbers? The SOC may be on 5,7 or 8 dependant of Broadcom model.

The WAN port may also vary.

Check the original settings.
Xeli
DD-WRT Novice


Joined: 02 Dec 2009
Posts: 5

PostPosted: Sat Dec 29, 2018 13:29    Post subject: Reply with quote
Oke, so DHCP from my ISP should 'just work' on the wan interface.

I think I've got the correct port numbers.

This is after an nvram erase & factory reset:
Code:
root@DD-WRT:/jffs/etc/config# nvram show | grep vlan.*ports | sort
size: 34752 bytes (30784 left)
vlan1ports=1 2 3 4 5*
vlan2ports=0 5u

Code:
root@DD-WRT:/jffs/etc/config# nvram show | grep port.*vlan | sort
size: 34752 bytes (30784 left)
port0vlans=2 18 19 21
port1vlans=1 18 19 21
port2vlans=1 18 19 21
port3vlans=1 18 19 21
port4vlans=1 18 19 21
port5vlans=1 2 16


So I take it that WAN is 0, 1-4 LAN and SoC is 5. I then use this script:
Code:
!/bin/sh

clear VLAN 0 & 2
echo "" > /proc/switch/eth0/vlan/0/ports
echo "" > /proc/switch/eth0/vlan/2/ports

# Configure VLAN 1 with LAN port 1, 2, 3 and CPU port
echo "1 2 3 4 5t*" > /proc/switch/eth0/vlan/1/ports

# Configure VLAN 1000 with WAN port and CPU port (both tagged)
echo "0t 5t" > /proc/switch/eth0/vlan/300/ports

# Setting up VLAN interfaces ...

# We don't need the vlan2 interface now ...
/sbin/ifconfig vlan2 down
/sbin/vconfig rem vlan2

# Setup vlan300 interface
/sbin/vconfig add eth0 300
/sbin/ifconfig vlan300 up
/sbin/ifconfig vlan300 txqueuelen 0


ifconfig shows me the script has been executed at startup:

Code:
vlan300   Link encap:Ethernet  HWaddr A0:40:A0:9B:48:32
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


But it still does nothing Sad

In the web ui I see wlan interface as being disabled (because it is set to vlan2 not vlan300 I suppose?)

Do you see any obvious mistakes?



Screen Shot 2018-12-29 at 2.25.43 PM.png
 Description:
 Filesize:  23.22 KB
 Viewed:  3174 Time(s)

Screen Shot 2018-12-29 at 2.25.43 PM.png


Xeli
DD-WRT Novice


Joined: 02 Dec 2009
Posts: 5

PostPosted: Sat Dec 29, 2018 13:34    Post subject: Reply with quote
Aaand it just started to work... Shocked
ronsmitsnl
DD-WRT Novice


Joined: 19 Jul 2019
Posts: 1

PostPosted: Fri Jul 19, 2019 5:30    Post subject: vlan tagging Reply with quote
Morning

I am trying to do the same thing as Xeli. Setting up a tplink archer C7.v2 for t-mobile thuis. I understand most of what he is doing but I am confused about the tagging of the vlans. When I go to the "Setup-networking" page I can apperently only tag interfaces. Looking at ifconfig I see that eth0 is my wan interface. So I think that should be the one to be tagged. But what is my cpu interface? the bridge?
My dd-wrt interface is
Code:
DD-WRT v3.0-r40352 std (07/16/19)

Ron
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 5227
Location: Akershus, Norway

PostPosted: Fri Jul 19, 2019 7:19    Post subject: Reply with quote
You are in the wrong forum. This is Broadcom, the C7 is an Atheros. Please post in thr Atheros Forum.
JSB42
DD-WRT Novice


Joined: 26 Aug 2019
Posts: 1

PostPosted: Thu Aug 29, 2019 13:33    Post subject: Re: Tag WAN port with VID / VLAN 300 Reply with quote
Hi,

I'm trying to do somewhat the same as Xeli here but I don't seem to get everything up and running.

I'm running a R6400 as gateway with firmware: Build 40559. I started out with the same values as Xeli:
Code:
nvram show | grep vlan.*ports | sort

vlan1ports= 1 2 3 5*
vlan2ports= 0 5u

nvram show | grep port.*vlans | sort
port0vlans=2
port1vlans=1
port2vlans=1
port3vlans=1
port4vlans=1
port5vlans=1 2 16

nvram show | grep vlan.*hwname | sort

vlan1hwname=et0
vlan2hwname=et0


I'm trying to create the following network (see attatchement) but I don't see where I go wrong.

I've used these codes:
Code:
#!/bin/sh
echo "" > /proc/switch/eth0/vlan/0/ports
echo "" > /proc/switch/eth0/vlan/2/ports
echo "1 2 3 4 5t*" > /proc/switch/eth0/vlan/1/ports
echo "0 4t 5t" > /proc/switch/eth0/vlan/300/ports
echo "3 4t 5t" > /proc/switch/eth0/vlan/640/ports
/sbin/ifconfig vlan2 down
/sbin/vconfig rem vlan2
/sbin/vconfig add eth0 300
/sbin/ifconfig vlan300 up
/sbin/ifconfig vlan300 txqueuelen 0

But this doesn't get my internet up and running nor does it passthrough IPTV.
I've also tried setting everything up via nvram commands like this:
Code:
nvram set vlan1ports="1 2 3 4 5*"
nvram set vlan300ports="0 4t 5"
nvram set vlan640ports="0 3 4t 5"
nvram set port0vlans="2 300 640"
nvram set port3vlans="1 640"
nvram set port4vlans="1 300 640 16"
nvram set port5vlans="1 2 300 640 16"
nvram set vlan300hwname=et0
nvram set vlan640hwname=et0
nvram commit
reboot

But nothing works, can someone please help me?

Also I my R6400 doesn't show the JFFS option in the GUI while I do have a JFFS partition, is this normal?

Thanks in advance.



image.png
 Description:
 Filesize:  55.25 KB
 Viewed:  2088 Time(s)

image.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