LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 04-01-2005, 09:29 AM   #1
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Rep: Reputation: 31
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?
 
Old 04-01-2005, 11:46 AM   #2
slacky
Member
 
Registered: Feb 2004
Location: USA
Distribution: Debian
Posts: 174

Rep: Reputation: 16
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.
 
Old 04-01-2005, 04:21 PM   #3
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Original Poster
Rep: Reputation: 31
Quote:
FYI, a Linksys WRT54g runs Linux as the operating system.
Right. That's why put "hardware router" in double quotes in my original post. I'm really not sure how we're supposed to refer to those things, since they're so similar to a GNU/Linux box with a couple of network cards. :)

Quote:
Linux has the bridge module you can use to bridge ethernet ports together so they act as a switch
Ahh... interesting. I've never heard of this. Any pointers on where I could find some docs about it would be most appreciated.

Quote:
- you can buy PCI network cards that have more than one ethernet port,
Double ahh! I didn't know such beasts existed. I'll have to poke around the web and look for one. I think you're telling me that you use this Linux "bridge module" either with these sorts of NIC's, or else when you install multiple cards into the same system. Or maybe even if you have both, come to think of it.

Quote:
The arp command shows the ip address to mac address table of devices you've recently talked to.
Gah! That's what I'm looking for. Thanks! :D

Quote:
And if you are looking to learn things,
You know it slacky. ;)

Quote:
look at a packet sniffer such as tcpdump or Ethereal
Just apt-got 'em yesterday. Still haven't read the man pages though, but will ASAP. Thanks for the reply.
 
Old 04-01-2005, 04:34 PM   #4
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Original Poster
Rep: Reputation: 31
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Routers vs Switches twantrd General 4 09-30-2004 12:03 PM
Bandwidth / Bottleneck on basic switches disinformation General 0 02-08-2004 10:07 AM
Using 2 routers as switches only bruce1271 Linux - Networking 3 01-14-2004 12:26 PM
Routers, Hubs, Switches petercool General 1 06-02-2003 05:14 AM
Mac Addresses nixdisciple Linux - Security 6 07-01-2002 10:55 PM


All times are GMT -5. The time now is 05:46 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration