Consumer-grade routers: MAC address for every NIC port??

Cerulean

[H]F Junkie
Joined
Jul 27, 2006
Messages
9,476
This is an embarrassing question but on a 5-port consumer-grade router, does each LAN NIC port have its own MAC address (in this scenario five MAC addresses + one for LAN gateway + one for WAN port)?

I know that on business-grade switches, routers, and servers every Ethernet RJ-45 port has its own MAC address.

I'm taking a guess at my own question: yes, every Ethernet RJ-45 port has a unique MAC address. For a good dose of proof, SSH into any Linux/Unix-based router (DD-WRT, Tomato, etc) and run the ifconfig command to get a listing of all ports (including MAC address info).
 
Consumer grade routers, I'd say no.

Usually they're routers with a 4 port switch built in so you'd likely have the WAN MAC on the 'in' WAN side and the LAN MAC on all 4 of the 'out' LAN ports.
 
Consumer grade routers, I'd say no.

Usually they're routers with a 4 port switch built in so you'd likely have the WAN MAC on the 'in' WAN side and the LAN MAC on all 4 of the 'out' LAN ports.

What? What would make you think they don't have MAC addresses?

Home routers with 4 port switches most certainly do have MAC addresses. Those are Layer 2 interfaces.
 
Switch interfaces don't need individual MAC addresses. Why would you even think so?
 
Generally consumer routers only have two wired interfaces. One each for WAN and LAN. Typically the LAN NIC will be connected to a L2 switch IC which will be wired up to the multiple LAN ports you see on the outside of the chassis.

Picture for clarity.
kbbzVBM.png



What? What would make you think they don't have MAC addresses?

Home routers with 4 port switches most certainly do have MAC addresses. Those are Layer 2 interfaces.


L2 switches do not typically have MAC addresses at all unless they have an IP stack for management purposes.
 
I guess I was incorrect on that one. Sorry everyone for the misinformation, guess I haven't really put much thought into home equipment after staying in the business equipment. That diagram by devman makes sense.
 
Switch ports will keep track of the mac address of the device (and any other devices) plugged into that port, but it itself wont have a mac address. I think that's where some people get confused.

The management interface of the switch will have a mac though.
 
To add, a simple switch is a multiplexer.

It knows about the MAC addresses of machines connected to it and it continously keeps switching from port to port to poll them, send and receive traffic and facilitate announcing the existence of MACs behind the switch to the rest of the network.
I.e. every split second it keeps pretending there are multiple MACs on that sole cable.

Of course computers on the network will think RandomComputer1 and randomComputer2 are both accessible via the same outbound port. while knowing nothing about the switch itself.
 
Is there an advantage to having a router that recognizes each Ethernet RJ45 port as a unique interface each with their own MAC address?
 
Is there an advantage to having a router that recognizes each Ethernet RJ45 port as a unique interface each with their own MAC address?

If each port had its own interface then each could be on its own isolated network (without resorting to VLANs), with routing and firewall rules dictating what traffic can go where.

Take for example the UBNT EdgeRouter PoE. It has 5 network ports each of which is its own interface (eth0-4) each port can service a different network and have different firewall/traffic/nat rules. You can achieve with VLANs on a single physical interface as well.
 
It knows about the MAC addresses of machines connected to it and it continously keeps switching from port to port to poll them, send and receive traffic and facilitate announcing the existence of MACs behind the switch to the rest of the network.
I.e. every split second it keeps pretending there are multiple MACs on that sole cable.

Where do you get that information? Seems completely wrong.

If you connect a device that never sends a single frame, the switch will never know its MAC address. Knowledge of MAC addresses is achieved via ARP, sent by the connected machines, not by some periodic process of the switch itself.
 
Where do you get that information? Seems completely wrong.

If you connect a device that never sends a single frame, the switch will never know its MAC address. Knowledge of MAC addresses is achieved via ARP, sent by the connected machines, not by some periodic process of the switch itself.

Correct. The switch dies not poll devices. That would be a ridiculous amount of overhead for little value.
 
Yeah, you're right, I worded it wrong. Until a proper frame is sent, the switch does not know about the MAC address or anything like that.
But it does keep note on which port a given NIC is present (based on MAC). Right?
 
Back
Top