basic: IP and MAC addresses on routers/switches
A "hardware router" (like a Linksys WRT54g) has a number of ports (besides the "WAN" port) for me to plug computers into -- is it correct that each one of those ports has its own MAC address?
I realize that a switch is just a piece of ethernet hardware, and it doesn't know anything about IP. Is that Linksys router logically like a desktop computer with 2 ethernet ports: one port being for the WAN uplink, and the other with an ethernet switch directly attached to it? What's the GNU/Linux tool for looking at the MAC address of various devices on the LAN? |
FYI, a Linksys WRT54g runs Linux as the operating system. Only difference between it and a PC is hardware - the router uses a low power consuming CPU, a small amount of flash memory instead of a hard drive, etc. Linux has the bridge module you can use to bridge ethernet ports together so they act as a switch - you can buy PCI network cards that have more than one ethernet port, or you can add multiple NICs to a Linux PC and do the same thing.
The arp command shows the ip address to mac address table of devices you've recently talked to. And if you are looking to learn things, look at a packet sniffer such as tcpdump or Ethereal. |
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
|
Wait a sec. Egads! I just logged into my router to have a look at any MAC addresses it might show. Under the heading "Active DHCP Leases", I see a very long list of different MAC addresses -- much more numerous than the number of computers on this LAN.
(BTW, these are all Windows XP systems, and they are shut down and restarted multiple times per day). I had thought all MAC's were "set at the factory" and were different for each card. Is the operating system somehow resetting it? Does GNU/Linux do this? Ok ok. I know. I'll read the man page for arp tonight. :) |
All times are GMT -5. The time now is 02:36 AM. |