What's new

How is traffic routet from defaults vlan1 to vlan2 (the WAN)?

  • 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!

Jochem

Occasional Visitor
Ok, after studying a lot of postings (including in dd-wrt forum) the basics are unclear. No high-level explaination seems to be available. RT-N66 @ latest Merlin.

For starters, let's do a factory reset and check robocfg show:
  • vlan1: 1 2 3 4 8t
  • vlan2: 0 8u
Ok, partly clear. The WAN port 0 is bundled with “port” 8u, seems to be the cpu (u for untagged?). The LAN ports are bundled with “port” 8t (t for tagged of trunked?) (See also https://www.dd-wrt.com/wiki/index.php/Default_Configuration_Overview)

Then, brctl show lists the following interfaces, all on br0:
  • vlan1
  • eth1 (2.4GHz WLAN)
  • eth2 (5 Ghz WLAN)
All interfaces are tied together in bridge br0. But where is vlan2?

The basis question is:

Q: How does routing to the WAN works in the first place? The WAN is on port 0 in vlan2, must be NATted somewhere (in "port" 8?) and then connected to br0 (i assume). But vlan2 is nowhere to be found in any bridge or whatever configuration. How does traffic from -say- port 1 (an ethernet port) flows via NAT to port 0 (WAN port)?
 
Last edited:
1. Routing and NAT are two different things, but both are handled by the Linux kernel.
2. NAT is handled by the packet filter in the Linux kernel. Use "iptables" to see the current rules. Look for rules that have things like "MASQUERADE" and "DNAT".
3. Depending on the particular router setup in question, "Routing" will usually be between the LAN (br0) and the WAN (eth0, ppp0)
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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