cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
cancel
1213
Views
0
Helpful
12
Replies

Layer 2 only

vidalch63
Level 1
Level 1

If I have an office with a single switch, with workstations wired correctly ...No layer 3 at all only a layer 2 switch ... (ofcourse no remote management either)

What protocol is used by the switch and workstations to exchange mac info. Im thinking the Media access sublayer.

Yes ?

12 Replies 12

For IPv4 this informations is exchanged with the help of ARP. If a system doesn't know the L2-address of a destination or next-hop IP, the an ARP-request is broadcasted. The other system receives the broadcast and answers with an ARP-reply.

-- 
Don't stop after you've improved your network! Improve the world by lending money to the working poor:
http://www.kiva.org/invitedby/karsteni

There is no ip. No layer 3. I am referring to a single switch ... layer 2 only, no ip, no routing, no router. On a switch with end users. ARP resolves and associates IP to Mac ...but in this case no IP. So does the switch still use arp ?

If there is no IP then what are the devices using to communicate?

For most of our devices there must be some layer 3 protocol that they use to communicate - and IP is by far the most common, but not the only one. So what protocol are your devices using to communicate?

HTH

Rick

HTH

Rick

Joseph W. Doherty
Hall of Fame
Hall of Fame

Disclaimer

The  Author of this posting offers the information contained within this  posting without consideration and with the reader's understanding that  there's no implied or expressed suitability or fitness for any purpose.  Information provided is for informational purposes only and should not  be construed as rendering professional advice of any kind. Usage of this  posting's information is solely at reader's own risk.

Liability Disclaimer

In  no event shall Author be liable for any damages whatsoever (including,  without limitation, damages for loss of use, data or profit) arising out  of the use or inability to use the posting's information even if Author  has been advised of the possibility of such damage.

Posting

Assuming you're using IP, your source host will ARP (broadcast) for the destination's IP MAC address.  If the destination host is on-line it will respond with its MAC (it "knows" the requestor's MAC from the ARP request).  The source, when it receives the destination's response, now has the destination's MAC and it can direct frames to the destination's MAC.

As for a L2 switch, it "watches" such traffic exchanges and maintains a table what ports have what source MACs.  For unicast frames for known destination MACs, it forwards that frame out to a specific port.  For unicast frames for unknown destination MACs, it forwards that frame out to all its ports (except the ingress port).

Richard Burts
Hall of Fame
Hall of Fame

If this is a single switch and is layer 2 only am I correct in assuming that all ports are in the same vlan?

One protocol that is involved in exchanging MAC information is ARP which is used to associate an IP address with the MAC of the device.

But you probably are thinking more of the protocol that is used for the switch to learn the MAC of connected devices and to use that information to build its switch forwarding table (sometime called CAM on some switches0. You are correct in believing that the Media access sublayer is involved in this. The switch examines each frame that it receives, and looks for the source MAC address in the frame and uses this MAC to build its switch forwarding table.

HTH

Rick

HTH

Rick

Right Richard

Draw this network  ...

a 2960 ... it has two work stations connected. One to port 1 and the other to port 2.

Port 1 user wants to send to port two user.

Is Arp still used in the absense of layer 3 ?

Disclaimer

The   Author of this posting offers the information contained within this   posting without consideration and with the reader's understanding that   there's no implied or expressed suitability or fitness for any purpose.   Information provided is for informational purposes only and should not   be construed as rendering professional advice of any kind. Usage of  this  posting's information is solely at reader's own risk.

Liability Disclaimer

In   no event shall Author be liable for any damages whatsoever (including,   without limitation, damages for loss of use, data or profit) arising  out  of the use or inability to use the posting's information even if  Author  has been advised of the possibility of such damage.

Posting

a 2960 ... it has two work stations connected. One to port 1 and the other to port 2. 

Port 1 user wants to send to port two user.

Is Arp still used in the absense of layer 3 ?

If IP, yes, as hosts are doing L3, although network device isn't.

Works the same, for the hosts, if you directly connected them back-to-back with a cross-over Ethernet cable.

As both Rick and I described, a L2 switch "watches" the frames and builds its forwarding tables using what it learns.  This allows a switch to forward unicast frames to only ports where it knows the destination is, unlike a hub which will forward the frame to all ports.

Ok .. I want to be sure I understand.

Then in essence  what we are saying is :

1. Switches use ARP to populate their Cam tables (and ofcourse no arguement ... in addition to associate ip to mac via arp broadcasts)

2. ... and do so whether or not layer 3 is present.

Just doesnt seem logical ... know ?

Disclaimer

The    Author of this posting offers the information contained within this    posting without consideration and with the reader's understanding that    there's no implied or expressed suitability or fitness for any  purpose.   Information provided is for informational purposes only and  should not   be construed as rendering professional advice of any kind.  Usage of  this  posting's information is solely at reader's own risk.

Liability Disclaimer

In    no event shall Author be liable for any damages whatsoever  (including,   without limitation, damages for loss of use, data or  profit) arising  out  of the use or inability to use the posting's  information even if  Author  has been advised of the possibility of such  damage.

Posting

vidalch63 wrote:

Ok .. I want to be sure I understand.

Then in essence  what we are saying is :

1. Switches use ARP to populate their Cam tables (and ofcourse no arguement ... in addition to associate ip to mac via arp broadcasts)

2. ... and do so whether or not layer 3 is present.

Just doesnt seem logical ... know ?

No, switches "watch" frames as the enter the switch.  They build their MAC/port table from what they learn.

Switches can build their MAC/port table without not only L3 on the switch, but with hosts that don't use it either (the latter being unusual).  Your original question asked about workstations and switches, they (more or less) operate independently of each other.

A manageable switch, using IP, as a host, would probably use ARP itself.  This is unrelated to the switch acting as a L2 switch.

1) A L2 switch does not use arp to populate it's CAM tables. The CAM table is not the arp table. The CAM table is a mapping of mac-address to port number so -

PC1 connected to port1

PC2 connected to port2

PC1 wants to send traffic to PC2. Assuming the switch has no entries in it's CAM table for these at the moment -

PC1 arps out for PC2's mac-address. The switch doesn't care that the packet is an arp packet. All the switch does at L2 is extract the mac-address from the packet. It then records that mac-address against port1 in it's CAM table.

PC2 responds to the arp. Again the switch doesn't care it is arp, it simply extracts the mac-address and records PC2's mac-address against port2.

So in the CAM table there is simply a mac-address to port mapping, nothing to do with arp and  nothing to do with IP addresses.

2) A switch will do the above whether it is L2 or L3. Again it's important to understand this has nothing to do with arp. 

Jon

Disclaimer

The   Author of this posting offers the information contained within this   posting without consideration and with the reader's understanding that   there's no implied or expressed suitability or fitness for any purpose.   Information provided is for informational purposes only and should not   be construed as rendering professional advice of any kind. Usage of  this  posting's information is solely at reader's own risk.

Liability Disclaimer

In   no event shall Author be liable for any damages whatsoever (including,   without limitation, damages for loss of use, data or profit) arising  out  of the use or inability to use the posting's information even if  Author  has been advised of the possibility of such damage.

Posting

Just to clarify two points explained by Jon.

The MAC being extracted and recorded by the switch is the source MAC.

CAM is kind of memory technology, which depending on the platform might or might not be used for this purpose and/or used for other purposes.

if the question is how do switches populate the CAM (or switch forwarding table) then ARP has nothing to do with it.

The original question was "What protocol is used by the switch and workstations to exchange mac info"

In the context of that question I believe that discussion of ARP is appropriate because it is a protocol that exchanges mac information.

HTH

Rick

HTH

Rick
Review Cisco Networking for a $25 gift card