Command For Mac Address Table



  1. Command For Mac Address Table
  2. Command For Mac Address Table On A Switch
  3. Sh Mac Address Table Command
  4. Cisco Show Mac Address Table
  5. Command For Mac Address Table Of Contents
  6. Mac Changer Download

Home > Articles > Cisco > CCNA Routing and Switching

Switch
  1. MAC Address Tables

We can find mac address (physical address) of a computer using the command ‘getmac‘. This can be used to get mac address for remote computers also. Below are few examples on how to use this command. It works on XP, Vista, Windows 7, Server 2003 and Server 2008 operating systems. Get mac addresses from CMD. The mac address-table aging-time command configures the aging time for MAC address table dynamic entries. Aging time defines the period an entry is in the table, as measured from the most recent reception of a frame on the entry’s VLAN from the specified MAC address. Command: show mac-address-table static blackhole multicast aging-time count address vlan count interface Function: Show the current MAC address table.

< BackPage 3 of 5Next >
Like this article? We recommend
CCNA Routing and Switching 200-120 Network Simulator

Like this article? We recommend

Like this article? We recommend

CCNA Routing and Switching 200-120 Network Simulator
Command

MAC Address Tables

A MAC address table, sometimes called a Content Addressable Memory (CAM) table, is used on Ethernet switches to determine where to forward traffic on a LAN. Now let's break this down a little bit to understand how the MAC address table is built and used by an Ethernet switch to help traffic move along the path to its destination. We will use the graphic in Figure 1.

In Figure 1, a switch is surrounded by a number of common devices. Let's assume that all of the devices are powered on but have not sent any traffic. In this case, the MAC address table of the switch would be empty (ignoring any system MAC addresses shown in the table by default).

Juniper command for show mac address-table

Now suppose PC1 wants to send traffic to the server that has a MAC address of 00:00:00:00:00:01. It would encapsulate an Ethernet frame and send it off toward the switch. The first thing the switch would do when receiving the traffic is create a new entry in its MAC address table for PC1's MAC address (PC1 -> Fa0/3). The switch would then perform a lookup on its MAC address table to determine whether it knows which port to send the traffic to; since no matching entries exist in the switch's tables, it would flood the frame out all of its interfaces (except the receiving port).

Command For Mac Address Table

Because the frame was sent out to all of the switch's other ports, it would be received by the target server. Assuming that the server wants to respond to PC1, it would sent a new frame back toward the switch. The switch would receive the frame and create a new entry in its MAC address table for the server's MAC address (Server -> Fa0/2). It would then perform a lookup of its MAC address table to determine whether it knows which port to send the server's traffic to; in this case it does, so it sends the return traffic out only its Fa0/3 port (PC1), without flooding. Listing 1 shows what the MAC address table would look like at this point.

Listing 1—MAC address table example.

This process repeats as devices continue to send traffic to each other. An important detail to remember is that the MAC address table timeout is typically short (Cisco's default is five minutes), so an entry is left in the table itself only for that specified amount of time before the timeout expires and the entry is removed from the table.

Now we will move on to the question of how the devices get the destination MAC addresses to begin this process; in a word, ARP.

Related Resources

Command For Mac Address Table On A Switch

  • Book $55.99

Sh Mac Address Table Command

  • Book $55.99
  • Premium Edition eBook $55.99

We can find mac address (physical address) of a computer using the command ‘getmac‘. This can be used to get mac address for remote computers also. Below are few examples on how to use this command. It works on XP, Vista, Windows 7, Server 2003 and Server 2008 operating systems.

Get mac addresses from CMD

Just run the command getmac to get the mac addresses. Find an example below.

This command does not show mac addresses for the network connections which are disabled. You can run ncpa.cpl and check which NICs are disabled. Further, I have received comments that this command does not help identify the mac address for a specific device. For example, if I need to get the mac address for my WiFi card, output of getmac command is not helpful. We can use ipconfig command to deal with this.

Get mac address of a remote computer

We can retrieve the mac addressses for a remote computer using nbtstat command.
Example:

Alternatively, We can run the below command to retrieve the mac addresses of a remote computer.

remote_computer : Full name of the remote computer or IP address
username and password are of the account on the remote computer.

Cisco Show Mac Address Table

Example:

If you do not want to specify the password, you can skip /p parameter. You will be prompted to enter the password and the command execution will take place after that.

Errors:

Using getmac command we can retrieve the mac addresses of the machines running windows OS only. If you try this for a Linux machine you would get the error “The RPC server is unavailable.”

Command For Mac Address Table Of Contents

If you provide incorrect password, the command would fail with the error message “Logon failure: unknown user name or bad password.

Mac Changer Download

Also Read:
Windows CMD commands reference