Home router usually have two interfaces. But they have several ports on the back. Is this different from a canonical router? Do they attach a swrich to consumer routers?
Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.
Typical home routers are often routers, switches, access points, DHCP servers, DNS proxies, firewalls, web servers, file servers, and probably quite a few other things too.
In the most common internal arrangement, all the Ethernet ports are connected to an internal switch. An additional internal port on the switch connects to the CPU's Ethernet interface. The switch is a smart switch with VLAN support, allowing the LAN ports to be separated from the WAN/Internet port (if the router has one).
You can take a logical view of the home router or a physical view. The picture would be different. On the physical side home routers are often implemented using a System-on-chip (SoC) design. For example a Broadcom BCM95352E that is found in Linksys WRT54G v4.0 and v5.0 is a processor that implements MIPS instruction set, FastEthernet switching and routing logic in one chip.
Logically as David Schwartz explains a Linksys home router is organized as a switch and a router. The CPU is the router it has three interfaces: eth0 connects to the internal switch, eth1 looks into the WAN and eth2 points to the wireless LAN interface. Here is a link to a sketch of the internal organization of a WRT54G v2.0 with a discussion.
On other home routers all physical ports are connected to the switch and the router CPU has a logical port on that same switch. The physical ports can be attached to different VLANs to separate the home LAN and the WAN. For example here is an OpenWRT switch configuration for Broadcom SoC from OpenWRT documentation.
Here the switch is connected to CPU port
Also check out the Default configuration diagram for WRT54G v2.0 in DD-WRT documentation.