How To Block Mac Address In Cisco Router?

how to block MAC address in Cisco router

A Media Access Control (MAC) address is a unique code assigned to each network device. In the section below, we’ll show you how to block MAC address in Cisco router.

Cisco 1841 Lan Router

Before you block the MAC address on your Cisco router, check if its class-map is set to something like mentioned below.

  • class-map xxx
  • match http host xxxx

If yes, use the commands mentioned below.

  • class-map match-any xxxx
  • match source-address mac xxxx.xxxx.xxxx
  • match http host xxxx

To allow any two MAC addresses and block others, use the commands given below.

  • class-map match-any MACPERMIT
  • match source-address mac
  • match source-address mac
  • class-map match-any xxxx
  • match not class-map MACPERMIT
  • match http host xxxx

To block a single MAC address, use the below commands.

  • class-map MACDENIED
  • match source-address mac xxxx.xxxx.xxxx
  • policy-map MACDENIED
  • class MACDENIED
  • drop
  • interface x/x
  • service-policy input MACDENIED

Now, the MAC address has been blocked successfully on your Cisco 1841 LAN router.

Cisco 3550 Switch

  • To block a MAC address in this switch, use the following command. Here, enter the MAC address you wish to block instead of xxxx.xxxx.xxxx.

Switch(conf)#mac address-table static xxxx.xxxx.xxxx

  • To block a MAC address from the router’s interface, you have to use IRB and MAC ACL.

If you need remote assistance for how to block MAC address in Cisco router, contact us.

Related Articles

Top z