cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4320
Views
0
Helpful
5
Replies

CDP vs. MAC addr table

dbdiep3402
Level 1
Level 1

Quik question: Does switch update its (src) mac address table when received CDP or ARP packet ?

Thanks in advance.

3 Accepted Solutions

Accepted Solutions

singhaam007
Level 3
Level 3

hello,

Switch saves the mac address to its table but it does not start any queries unless if switch got the mac already in its mac table. If not then host need to need to send ping messages or any connection request.

But arp packets do involves it this process not cdp.

The switch dynamically builds the address table by using the MAC source address of the frames

Received. When the switch receives a frame for a MAC destination address not listed in its address table,

it floods the frame to all LAN ports of the same VLAN except the port that received the frame. When

the destination station replies, the switch adds its relevant MAC source address and port ID to the address

table. The switch then forwards subsequent frames to a single LAN port without flooding all LAN ports.

hope this helps.

please rate if this helps.

thanks

View solution in original post

Hi,

When the frame hits the port, the switch adds the source mac-address of the frame to the mac-address table if it doesnt have this MAC address on its MAC address table.

The switch then checks the destination mac-address in the frame and check if it is known to it by looking into it’s mac-address table. If the mac-address table doesnt have any information, the switch floods the frame to all the ports on the switch.

Flooding is the process by which a copy of the frame is send out to all ports on the switch. A frame is broadcasted based on specific value of the mac-address. The value of a broadcast frame is FF-FF-FF-FF-FF-FF

When the destination receives the copy of the frame, it will reply where the source mac-address as its own MAC address (new port) and destintaion mac-address of port where it receives the request.

When the frame hits on the switch, it would add the source mac-address in the mac-address table and then look into the destination mac-address info in the frame. Since the destination mac-address is already available now (which was earlier added), the frame would be sent to the corresponding port.

Regards,

Aru

Regards, Aru *** Please rate if the post useful ***

View solution in original post

Hi,

I don't see why a CDP packet on ethernet wouldn't update the CAM table, there is a src MAC and the switch will do MAC learning and as destination is multicast it will be flooded.

I think that both types of frames will update CAM table.

Regards.

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

View solution in original post

5 Replies 5

Arumugam Muthaiah
Cisco Employee
Cisco Employee

Hi,

ARP gets the MAC address of a host or node and creates a local db that maps the MAC address to the hosts IP address. When a frame reaches into the port of a switch, the switch reads the MAC address of the source device from frame and compare it to its MAC address table (also known as CAM (Content Addressable Memory) table). If the switch cannot find a corresponding entry in MAC address table, the switch will add the address to the table with the port number via the frame arrived.

CDP doesnt update MAC address table and it is a layer 2 protocol that is used for discovering information about neighboring network devices. Because CDP operates at the Data Link layer, it does not need a network layer protocol, such as IP or IPX, to transfer information. CDP devices send out periodic advertisements to the MAC multicast address 0100.0ccc.cccc, every 60 seconds by default

CDP runs on all Cisco equipment such as routers, switches, bridges and access servers. It discovers information about neighboring devices such as the type of device and its capabilities, software version, the local and remote interface, and even configured network layer addresses

Regards,

Aru

*** Please rate if the post is useful ***

Regards, Aru *** Please rate if the post useful ***

singhaam007
Level 3
Level 3

hello,

Switch saves the mac address to its table but it does not start any queries unless if switch got the mac already in its mac table. If not then host need to need to send ping messages or any connection request.

But arp packets do involves it this process not cdp.

The switch dynamically builds the address table by using the MAC source address of the frames

Received. When the switch receives a frame for a MAC destination address not listed in its address table,

it floods the frame to all LAN ports of the same VLAN except the port that received the frame. When

the destination station replies, the switch adds its relevant MAC source address and port ID to the address

table. The switch then forwards subsequent frames to a single LAN port without flooding all LAN ports.

hope this helps.

please rate if this helps.

thanks

dbdiep3402
Level 1
Level 1

Thanks both for quick response. Please let not concentrate on how CDP or ARP work , but rather how mac-address table is updated.

I understand when a packet arrived in switch it will update its mac-address table if the src mac-address is new to the switch. So back to questions: does switch look for particular packet type before updating mac-address table? If so, does it update its mac-address table if the packet type is CDP or ARP?

I think Aru had answered that switch will *not* even look at mac table if it's a CDP packet. However It will attempt to update (if condition is satisfied, ie. src mac is new to switch)  mac table if it's ARP packet. Did I state correctly? Please confirm.

Hi,

When the frame hits the port, the switch adds the source mac-address of the frame to the mac-address table if it doesnt have this MAC address on its MAC address table.

The switch then checks the destination mac-address in the frame and check if it is known to it by looking into it’s mac-address table. If the mac-address table doesnt have any information, the switch floods the frame to all the ports on the switch.

Flooding is the process by which a copy of the frame is send out to all ports on the switch. A frame is broadcasted based on specific value of the mac-address. The value of a broadcast frame is FF-FF-FF-FF-FF-FF

When the destination receives the copy of the frame, it will reply where the source mac-address as its own MAC address (new port) and destintaion mac-address of port where it receives the request.

When the frame hits on the switch, it would add the source mac-address in the mac-address table and then look into the destination mac-address info in the frame. Since the destination mac-address is already available now (which was earlier added), the frame would be sent to the corresponding port.

Regards,

Aru

Regards, Aru *** Please rate if the post useful ***

Hi,

I don't see why a CDP packet on ethernet wouldn't update the CAM table, there is a src MAC and the switch will do MAC learning and as destination is multicast it will be flooded.

I think that both types of frames will update CAM table.

Regards.

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.