
#TRACK CISCO MAC ADDRESS PORT MAC#
Now you have a choice, you can set the port to be ‘sticky’ which means the next MAC seen on that port will be the one allowed or you can specify a MAC address. Switch(config-if)# switchport port-security violation restrict Switch(config-if)# switchport port-security Select the port you want to configure: switch(config)# int gi0/1Įnter the following commands: switch(config-if)# switchport mode access You’ll need to be logged into your switch and at the configure terminal prompt, if you don’t know this you probably need to brush up on your Cisco basics Some organisations have a need to secure ports to particular MAC addresses, I won’t discuss why you should or shouldn’t do it just give you the tools to do it! It works perfectly! The source device is Core switch (Interface Vlan 200, IP: 192.168.200.1 and MAC: 0035.1aff.80f6) and the destination device (IP: 192.168.200.10, MAC: 40f2.e985.5308) is on port G0/3 of Access2 switch.Port based MAC address control for Cisco devices I can easily find them in ARP table, but it would be more convenient when I take the IP addresses of Interface Vlan 100 and 200 because they are already in my memory. To overcome this issue, I would like to pick two additional IP or MAC addresses, one in 192.168.200.0/24 (Vlan 200) and the other in 192.168.100.0/24 (Vlan 100), which are in the same subnets/vlans with IP or MAC addresses above. Instead, I will get the message “Source and Destination are not on same subnet”, with MAC addresses, it is “Error: Source and destination macs are on different vlans.”

Source and Destination are not on same subnet Core#traceroute mac 40f2.e985.5308 61Įrror: Source and destination macs are on different vlans.Īs mentioned earlier, this is a L2 trace, if I use the source and destination IPs in different subnets, it will not work at all. The outputs tell me that source device (IP: 192.168.100.20 and MAC: 61) is on port G0/2 of Access2 switch and the destination device (IP: 192.168.100.10 and MAC: 00a0.a423.90bc) is on port G0/6 of Access1 switch.

Layer 2 trace completed Core#traceroute mac 61 00a0.a423.90bc Then on layer 3 device to resolve it to ip address take the mac from above and run. I use the following commands and place the IP or MAC addresses in either source or destination addresses: Core#traceroute mac ip 192.168.100.20 192.168.100.10ĭestination 00a0.a423.90bc found on Access1 sh mac address-table interface gigabitEthernet x/x. Protocol Address Age (min) Hardware Addr Type Interface I have to make sure that their IP and MAC addresses shown up when issuing the show arp command Core#show arp Note: all hosts in the network must be reachable from a 元/Core device. Let me show you how it works with the network diagram above. Bear in mind that you need to run this command on 元 device. The output of this command contains the information of the switch ports where the source and destination hosts are connecting to, and all switch-to-switch connections in between. The command will run a L2 trace to identify a path from source address to destination address.


