What's new

Help with routing 2 VLAN's to the same Ethernet Port

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Well, if you need to pass VLAN 100 and 105, you probably need to tag VLAN 105 on the WAN port as well (eth0). try creating another tagged interface, this time on eth0 (the wan) and add it to the bridge.
 
Well, if you need to pass VLAN 100 and 105, you probably need to tag VLAN 105 on the WAN port as well (eth0). try creating another tagged interface, this time on eth0 (the wan) and add it to the bridge.

Hum, not sure these are the correct commands?

Code:
ip link add link eth0 name eth0.105 type vlan id 105
ip link set dev eth0.105 up

brctl addif br101 eth0.105

Thanks
 
Hum, not sure these are the correct commands?

Code:
ip link add link eth0 name eth0.105 type vlan id 105
ip link set dev eth0.105 up

brctl addif br101 eth0.105

Thanks
Looks right.
 
Looks right.

Unfortunately, it doesn't seem to have any effect. It does seem to be creating and adding the interfaces to the bridge port:

Code:
user@ASUSWRT:/tmp/home/root# brctl show


bridge name    bridge id        STP enabled    interfaces


br0          8000.fc34978b2170      yes        eth3


                                                           eth4


                                                           eth5


                                                           eth6


                                                           eth7


                                                           wl0.2


br101     8000.107b44e290c2      yes        eth0.105


                                                         eth0.v0


                                                         eth1.v0


                                                         eth2.100


                                                         eth2.v0

but they have no effect. The TV box (or any other device i connect to ethernet port 3) does not appear/register in the home network. I've tried connecting a laptop to ethrnet port 3 and again it isn't able to connect to the internet.
 
Sorry. It was a shot to begin with. I don't have anything similar to setup to test.

Perhaps the ISP Router is also doing some authentication as well that you are unaware of.
 
Sorry. It was a shot to begin with. I don't have anything similar to setup to test.

Perhaps the ISP Router is also doing some authentication as well that you are unaware of.

I really appreciate all your help, thank you so much.

I don’t think that is the issue - I did manage to get it on the AC68U with some commands similar to the ones I posted earlier. As soon as I issued the commands, the TV Box appeared on the DHCP client list of the home network.

Is there a way to see the code that is behind the ASUS configuration for the "vodafone Portugal" profile? their configuration seems to route all VLAN's simultaneously on ethernet port 4 to be used to connect the old vodafone router in bridge mode. Maybe we can infer from their configuration (or other profiles - I'm sure other ISP's require both internet and TV services for their smart tv boxes) how to pass the two VLAN's to one port?
 
You're referring to the roboconfig commands you used in post 7?

If so, I noted in that post, eth0 is being tagged with VLAN 101 and 105 as opposed to 100 and 105. Same with eth2 (physical lan port 3). Maybe you need to adjust the VLAN from 100 to 101.
 
Err, I should say, eth0 and eth2 is being tagged with all three vlans.

Unfortunately, I can't see what VLAN tag is being assigned to .v0 of each port. I was assuming the VLAN tag is what is defined in the IPTV section in the LAN Gui.

The -d option of IP a does not work with Merlin. Maybe entware has a more complete version of the ip command.
 
Is there a way to see the code that is behind the ASUS configuration for the "vodafone Portugal" profile?
If it is not closed source, it should be in the source code. But I don't know where to start looking.
 
You're referring to the roboconfig commands you used in post 7?

If so, I noted in that post, eth0 is being tagged with VLAN 101 and 105 as opposed to 100 and 105. Same with eth2 (physical lan port 3). Maybe you need to adjust the VLAN from 100 to 101.

Yes, I think those commands were to achieve what ASUS ended up implementing, i.e., to have Ethernet port 4 connected to the Vodafone router in bridge mode (and the vodafone router would take care of the IPTV and VoIP service as their router is already configured to have both internet and TV services on the specific Ethernet port for the TV box). I think I toyed with those robocfg commands to tag VLAN's 100 and 105 to ethernet port 3 and it just started working (suddenly the TV box appeared on the home network.

would i be able to install robocfg through entware? going to try that but don't really have an idea of what i'm doing (just hope i dont brick the router! lo)

Maybe someone else comes up with the answer?

Thanks so much for all your help
 
would i be able to install robocfg through entware? going to try that but don't really have an idea of what i'm doing (just hope i dont brick the router! lo)
No, it was a tool specific to the older router's chip sets. Setting vlans up in the newer routers via the ip tool is pretty much the same thing.
 
No, it was a tool specific to the older router's chip sets. Setting vlans up in the newer routers via the ip tool is pretty much the same thing.

So, I think those commands presumed that i configured the IPTV menu only with "internet" as VID 100 / PRIO: 1

And the other VLAN's would be created at boot using that command.

So, in my case it would be:

Code:
vconfig add eth0 101
vconfig add eth0 105

ifconfig vlan101 up
ifconfig vlan105 up

would create both 101 (Phone) and 105 (IPTV) - the same as configuring the IPTV menu with "LAN PORT 4" and "LAN PORT 3" with their respectives VLANS (101 and 105).

but instead of using LAN4 as bridge, I want to tag LAN4 with VLAN 101 and LAN3 with VLAN 100 and 105. So it should be like this?

Code:
robocfg vlan 100 ports "0t 3t 8t"
robocfg vlan 101 ports "0t 4t 8t"
robocfg vlan 105 ports "0t 3t 8t"

Of course, I have no idea what I am doing.

On the github page i linked on post 7 he says:

Now that the VLAN's are created, we just need to create the trunk port on the router:

filipe@RT-AC66U:/tmp/home/root# robocfg vlan 1 ports "1 2 3 8t"
filipe@RT-AC66U:/tmp/home/root# robocfg vlan 100 ports "0t 4t 8t"
filipe@RT-AC66U:/tmp/home/root# robocfg vlan 101 ports "0t 4t 8t"
filipe@RT-AC66U:/tmp/home/root# robocfg vlan 105 ports "0t 4t 8t"

So first we are removing the port 4 from the default VLAN1.

Then we are adding the VLANs 100, 101 and 105 to the ports "0t 4t 8t". Essentially we are telling the router to duplicate the trunked network on the WAN port 0 to the LAN port 4 in addition to itself via port 8.

This port 8 is a special port (called the CPU internal port). If you want the router to interact with any of the network traffic on the ports, it needs to be "plugged into" the CPU internal port. If omitted, the router will pass along the traffic from one external port to another and otherwise not pay attention to it.

Could I achieve the same commands with the ip tool that he does with robocfg?
 
Last edited:
Yep, you can do the same thing with ip

First, not sure about the old routers, but if the mapping between the internal names and the physical ports are the same as with the newer routers, port 4 actually refers to physical LAN port 1. i.e. eth4 is marked LAN port 1 on the router and eth1 is marked as LAN port 4 on the router.

So, if you want to just skip the LAN IPTV setup in the GUI altogether, you can build your own bridge (br101) as such

Bash:
brctl addbr br101
brctl stp br101 on
brctl setfd br101 2

Now assuming you want everything on physical port 1, which is eth4, then remove eth4 from the main bridge (br0)
Diff:
brctl delif br0 eth4

Then, using the examples above, create vlan tagged interfaces for eth0 and eth4 for VLAN 100, 101, and 105. Bring them up and add them to your new bridge.

You may also have to bring the bridge up as well

What I don't know is if the ISP is expecting the router to do any DHCP client work on the new bridge? Does the bridge need a static IP address (assigned by the ISP)? If so, you may have to assign the IP address to the new bridge that the ISP assigned to you. One thing is for sure, setting up the bridge is just one step. If the new bridge is using DHCP, then we are going to have to setup DNSMASQ as well. If static, we need to assign an address to the new bridge.

You can probably make this work, but we will need more information.
 
Yep, you can do the same thing with ip

First, not sure about the old routers, but if the mapping between the internal names and the physical ports are the same as with the newer routers, port 4 actually refers to physical LAN port 1. i.e. eth4 is marked LAN port 1 on the router and eth1 is marked as LAN port 4 on the router.

So, if you want to just skip the LAN IPTV setup in the GUI altogether, you can build your own bridge (br101) as such

Bash:
brctl addbr br101
brctl stp br101 on
brctl setfd br101 2

Now assuming you want everything on physical port 1, which is eth4, then remove eth4 from the main bridge (br0)
Diff:
brctl delif br0 eth4

Then, using the examples above, create vlan tagged interfaces for eth0 and eth4 for VLAN 100, 101, and 105. Bring them up and add them to your new bridge.

You may also have to bring the bridge up as well

What I don't know is if the ISP is expecting the router to do any DHCP client work on the new bridge? Does the bridge need a static IP address (assigned by the ISP)? If so, you may have to assign the IP address to the new bridge that the ISP assigned to you. One thing is for sure, setting up the bridge is just one step. If the new bridge is using DHCP, then we are going to have to setup DNSMASQ as well. If static, we need to assign an address to the new bridge.

You can probably make this work, but we will need more information.

Ooff, this is getting a bit complicated for me lol.

I don't want to have everything on one port as i can´t use the other router in bridge mode. In fact, using the GUI I have almost everything working as that would probably be equivalent to all these commands:

Code:
vconfig add eth0 101
vconfig add eth0 105

ifconfig vlan101 up
ifconfig vlan105 up

robocfg vlan 100 ports "0t 8t"
robocfg vlan 101 ports "0t 4t 8t"
robocfg vlan 105 ports "0t 3t 8t"

So, to add internet to LAN3 i should be able to just issue:

Code:
robocfg vlan 100 ports "0t 3t 8t"

And it would get it working?

The router, TV box and VoIP adapter get their IP's automatically from the ISP, there is no configuration needed and it isn't static ip addresses. Each equipment (TV box, VoIP adapter) connects to different gateways and DNS servers.
 
OK, to just add the internet to physical port three (eth2), you would;

Code:
ip link add link eth2 name eth2.100 type vlan id 100
ip link set dev eth2.100 up

brctl addif br101 eth2.100

Sorry that I can't be of any more help. I understand what is going on now. Bell does something similar here as well. Just that Bell allows for bridging. I think just some experimenting on your part may be all that is required. Maybe also considering using a tool like wireshark to see what exactly is going on. It might reveal something.

Anyway, I am interested to know if you ever get it working. I wish I had the setup required to mimic what you need. If you do get it going, post your setup. Others may be interested.
 
OK, to just add the internet to physical port three (eth2), you would;

Code:
ip link add link eth2 name eth2.100 type vlan id 100
ip link set dev eth2.100 up

brctl addif br101 eth2.100

Sorry that I can't be of any more help. I understand what is going on now. Bell does something similar here as well. Just that Bell allows for bridging. I think just some experimenting on your part may be all that is required. Maybe also considering using a tool like wireshark to see what exactly is going on. It might reveal something.

Anyway, I am interested to know if you ever get it working. I wish I had the setup required to mimic what you need. If you do get it going, post your setup. Others may be interested.

Thank you for all your help with it, and I'll definitely post the solution once I find it.

I found this post here in the forum by @.TT. that details the sintax for the ethctl which seems to be the new Broadcom tool to achieve what was previously done with robocfg.

More specifically, I think the command to tag specific interfaces is probably the vport:

vport : Enable/disable/query Switch for VLAN port mapping

But I'm still clueless about how to do this.

I see that @Gingernut is trying to achieve something similar with a script a couple posts down, not sure if he did manage to find out the correct commands?

Further digging led me to this other post where the author has a mapping of the interface to the physical port:

2023-11-06_17-28-58.jpg


In that posts he also mentions another tool vlanctl:

An alternative to robocfg on HND platform seems to be vlanctl. However, after several hours of searching, trying and error, I believe vlanctl can only create tagged VLAN, which unfortunately can’t satisfy my need.

Not sure if that would be enough for me? I did find this other post with syntax of vlanctl and in this page there are some usage commands examples using the vlanctl tool.

I also found this vlantest tool as part of the Merlin source code.

Finally, I also found this thread here in the forum that deals with VLAN's in the new Broadcom chipsets. I think @LeandroBR did manage to get it working.

I think the solution to my problem is in the posts above. I'm going to go through it and find a solution for this. And of course, I'll post it here once I figure it out.
 
ethtool is a Linux tool for query or control network driver and hardware settings. It is pretty standard. The vlanctl has shown up in a number of post. This one in particular. vlanctl seemed to be the up and coming star until it was figured out tagging interfaces with the ip tool was a lot easier.

I use vlans on a AC86U setup with a custom script as a AP using just the ip tool. Works just fine.

Hopefully you can get it figured out.
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top