HELP - Linksys WRT54G Interfaces!

Hi, I am new in here.

I have a Linksys WRT54G wireless home router and would like to understand if the local IP address (default gateway) on the web-based setup page is assigned to interface VLAN 0, interface br0, or sub-interface eth0.0.

The reason why I am asking this is because I want to build the internal architecture of this Linksys WRT54G with a Cisco switch 2960 and a Cisco router 1841.

Any help is greatly appreciated.

Please refer to the attached picture of a generic WRT54G wireless home router.

I'm not sure why one would want to emulate obsolete hardware, but here's how they were typically set up "back in their day."

CPU has a single Ethernet interface, so to be able to split "WAN" from "LAN" traffic, one VLAN is used for each. VLAN 0 is reserved, so that is not likely correct on the diagram.

Let's pick something that doesn't conflict with reserved VLANs, or the common usage of VLAN 1 as the default management VLAN for many switches:

  • VLAN 10 -- LAN traffic
  • VLAN 20 -- WAN traffic

Port 5 -- connects to CPU

  • VLAN membership 10, 20, both tagged on egress
  • PVID 4095 -- nothing untagged should ever be forwarded (reserved; "blackhole" VLAN for many Cisco pieces)

Port 4 -- "WAN"

  • VLAN membership 20, untagged on egress
  • PVID 20 -- untagged traffic tagged with VLAN 20

Ports 0-3 -- "LAN"

  • VLAN membership 10, untagged on egress
  • PVID 10 -- untagged traffic tagged with VLAN 10

All ports should be configured to reject tagged traffic for VLANs outside their membership.

eth1 does not go through the switch, but was the wireless device's IP connection. It was typically bridged in the kernel to eth0.10 (LAN).

1 Like

Ok so:

1- the local IP address of the default gateway must be assigned to sub-interface eth0.10 as it is on the LAN network and the WAN IP address is assigned to sub-interface eth0.20, right?
2- if the wireless home router is set to Bridge Mode Only, the WAN and LAN ports are bridged, which means sub-interfaces eth0.10 and eth0.20 are bridged.

Pretty much, with the subtle detail that the LAN IP gets assigned to the Linux bridge over eth0.10 and wlan0, rather to the “enslaved” interfaces themselves.

Ok and if RFC-1483 Bridged is applied (rather than Bridge Mode Only), sub-interfaces eth0.10 and eth0.20 are bridged (let's say represented by interface BVI 1) and IP routed since IRB is enabled on that bridge-group (let's say bridge 1 for example).

But then, which interface on the wireless home router becomes the routing interface? Is it the same interface BVI 1?

If you've got an encapsulated payload, you most likely have a virtual interface for interacting with the payload channel. That interface would be routed or bridged, as appropriate for the application.

(https://tools.ietf.org/html/rfc2684 obsoletes 1483, though I'm not sure how Multiprotocol Encapsulation over ATM Adaptation Layer 5 applies here)

2- if the wireless home router is set to Bridge Mode Only , the WAN and LAN ports are bridged, which means sub-interfaces eth0.10 and eth0.20 are bridged.

I'm still not sure what you're getting at here. If you're bridging together all five physical ports, you do it in the switch and "ignore" the VLAN that is typically used for WAN. One could, in that case, run all ports as untagged on egress, since there is no "sharing" of eth0 for LAN and WAN functions.

I will try to be more specific.

If you look at the attached picture below, the internet connection type is RFC-1483 Bridged which has been lately replaced by RFC-2684 Bridged on some wireless home routers. Anyways, you see Internet IP address and Local IP address.

Let's suppose we have the Linksys WRT54G as a generic model of a wireless home router, I would like to know which interface (interface VLAN 1, eth0.1, etc...?) is associated with the Internet IP address and which interface (interface VLAN 0, eth0.0, interface br0, etc...?) is associated with the Local IP address on a wireless home router?

RFC-1483 Bridged applies to modem-routers and bridges atm with ethernet, so that you can connect a router and initiate PPPoE on the later rather than on the modem.
WRT54G is just router.

First off, you're looking at an ADSL-enabled device. It will have a modem portion that exposes an interface of some sort in addition to the Ethernet interfaces. This is uncommon in all-in-one routers as most do not incorporate transport modems (xDSL, DOCSIS, ...)

Perhaps better to consider them as separate functions.

Also, a WRT54G-series unit is ancient history and hardly representative of all-in-one routers today. It only has a single Ethernet interface. Except in the low-end units, SoCs typically have at least two Ethernet interfaces. Higher line speeds are a big driver of this. If you think about it, you can't route more than 500 mbps symmetric through a single GigE channel used for both upstream and downstream subnets.

Second, naming and numbering of interfaces is immaterial. What matters is not if it is called eth0 or eth0.1 or whatever7, but how it is configured and used.

The modem portion will convert line-native transport to IP transport. This may be in terms of a physical Ethernet connection or a virtual interface. If integral to the unit, this interface is the one to which the "public IP" is applied, either through DHCP, static configuration, or other protocols (LTE modems and raw IP as one example of "other").

In the case of tunneled protocols, either from the transport provider or self-configured, such as VPNs, the protocol typically provides its own virtual interface. This interface would typically be assigned an IP address if routed, but does not require one if the tunnel is a L2 bridge.

The device typically has virtual interfaces for the wireless radios and for each VAP on those radios. They typically have at least one Ethernet interface, or a VLAN on an Ethernet interface in the case of single-Ethernet devices that is connected to an integral switch or switch chip. These are often bridged in practice to provide a "LAN" subnet. When bridged, the IP address is assigned to the bridge under Linux, not directly to an interface.

2 Likes

I get your point. :slight_smile:

I guess I will stick to my routing and switching knowledge with enterprise Cisco devices as they're not quite comparable to commercial devices driven by Linux engine which I'm not familiar with.

Your knowledge all applies, it's just that all-in-one routers have a different architecture and set of functions from enterprise-grade switches.

The switch chip itself (or that function in an integrated SoC) is very similar. VLANs, PVIDs, tagging all work in much the same way. Current drivers don't have some of the functions exposed to user-land applications (such as ingress control), but instead make "reasonable" assumptions about default behavior.

With the typical all-in-one router switches, you should be aware that there may be "leakage" during boot, reset, or reconfiguration. Enterprise-grade units typically disable the phys on the ports until the configuration is loaded, so that no traffic flows until the switch fabric is fully configured. In these chips, the phys are typically not disabled, so, for example, packets may unexpectedly flow from port to port during that brief period of time. This can cause, among other things, unexpected DHCP assignment from the "wrong" subnet.