cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar








Cloud



Etc


Reference














.

hardware:cisco:mac.html



Cisco Mac address Command Example with Arp table and Mac Address Table

Arp Table

Arp Table is the correspondence table of mac address and destination address port.

Show

Operation Command complement
Switch#show arp
Switch#show ip arp
Switch#show ip arp | include x.x.x.x
Switch#show ip arp 192.168.0.10
Examples

switch# show ip arp 

Flags: D - Static Adjacencies attached to down interface

IP ARP Table for context default
Total number of entries: 1
Address         Age       MAC Address     Interface
2.2.2.100          -      000a.000a.000a  Ethernet1/2
switch#

switch# show ip arp detail
IP ARP Table for context default
Total number of entries: 1
Address         Age       MAC Address     Interface        Physical Interface
90.10.10.2      00:02:55  000d.ece7.df7c  Vlan900          Ethernet1/12
switch#


Configuration

Operation Command complement
Clear Arp cache Switch# clear arp-cache
Switch#clear ip arp 192.168.0.10
clear arp-cache = clear ip arp
Switch(config-if)#arp timeout 7200 ← 2 hours Default : 14,400sec = 4 hours
Switch(config)# arp 192.168.11.1 00-60-97-12-34-56
Switch(config)# no arp 192.168.11.1


Mac Address Table

Mac address table is the correspondence table of mac address and IP address.

Show

Operation Command complement
view of ip and port address Switch#show mac-address-table
Switch#show mac address-table dynamic
view mac address table of mac address of your setting Switch#show mac address-table static
Example

switch# show mac address-table 
Legend:
        * - primary entry, G - Gateway MAC, (R) - Routed MAC, O - Overlay MAC
        age - seconds since last seen,+ - primary entry using vPC Peer-Link
   VLAN     MAC Address      Type      age     Secure NTFY    Ports
---------+-----------------+--------+---------+------+----+------------------
+ 100      0000.0001.0003    dynamic   0          F    F  Po1
+ 100      0000.0001.0004    dynamic   0          F    F  Po1
+ 100      0000.0001.0009    dynamic   0          F    F  Po1
+ 100      0000.0001.0010    dynamic   0          F    F  Po1
* 1        001d.7172.6c40    dynamic   300        F    F  Eth100/1/20
switch#

Configuration

Operation Command complement
Clear Mac address table Switch# clear mac-address-table
Switch# clear mac-address-table vlan 90
Switch(config)#mac address-table aging-time 300 Default : 300sec = 5 minites
Setting Mac address
Switch(config)#mac address-table static 0010.aaaa.aaaa vlan 1 interface fastethernet0/4


Investigateion destination port from IP address




hardware/cisco/mac.html.txt · Last modified: 2019/06/08 by admin

Page Tools