MAC Address Flooding

In a MAC address flooding attack, the attacker fills the switch's Content Addressable Memory (CAM) table with invalid MAC addresses. After the table is full, all traffic with an address not in the table is flooded out all interfaces. This has two bad effects—more traffic on the LAN and more work for the switch. Additionally, the intruder's traffic is also flooded, so they have access to more ports than they would normally have. After the attack stops, CAM entries age out and life returns to normal. However, meanwhile the attacker might have captured a significant amount of data.

Port security and port-based authentication can help mitigate MAC address attacks.

Port Security

Port security limits the number of MAC addresses allowed per port and can also limit which MAC addresses are allowed. Allowed MAC addressed can be manually configured or the switch can sticky learn them. Table 8-1 lists port security commands; these are given at the interface.

TABLE 8-1 Port Security Commands

Command

Description

switchport port-security

Enables port security on that interface.

switchport port-security

Specifies the max MAC addresses

maximum value

allowed on this port. Default is 1.

CAMPUS NETWORK SECURITY

CCNP BCMSN Quick Reference Sheets

TABLE 8-1 Port Security Commands

Command

Description switchport port-security violation {shutdown | restrict | protect}

Configures the action to be taken when the maximum number is reached and a MAC address not associated with the port attempts to use the port, or when a station whose MAC address is associated with a different port attempt to access this port. Default is shutdown.

switchport port-security mac-address mac-address

Statically associates a specific MAC address with a port.

switchport port-security mac-address sticky

Enables the switch port to dynamically learn secure MAC addresses. MAC addresses learned through that port, up to the maximum number, if a maximum is configured, are treated as secure MAC addresses.

show port security [interface interface | address]

Verifies port security actions.

Port-Based Authentication

802.1x authentication requires a computer (called a client) to be authenticated before it is allowed access to the LAN. This can be combined with port security to allow only authenticated clients with specified MAC addresses to access a port. When a computer connects to a switch port configured for 802.1x authentication, the following steps occur:

Step 1. The port is in the unauthorized state, allowing only 802.1x EAP over LAN (EAPOL) traffic.

Step 2. The client connects to the port. The switch either requests authentication or the client sends an EAPOL frame to begin authentication.

Step 3. The switch relays authentication information between the client and a RADIUS server that acts in proxy for the client.

Step 4. If authentication succeeds, the port transitions to the authorized state, and normal LAN traffic is allowed through it.

Table 8-2 shows commands to configure 802.1x authentication on a switch.

TABLE 8-2 Configuring 802.1x Port Authentication

Readers' Questions

  • hannu
    What can be used to mitigate mac table flooding attacks?
    1 month ago
  • There are several approaches that can be used to mitigate MAC table flooding attacks:
    1. Port Security: Enable port security on the switch, which allows only a specific number of MAC addresses to be learned on a port. When the threshold is reached, the port is put into a shutdown state or a designated MAC address is dropped.
    2. DHCP Snooping: Enable DHCP snooping on the switch, which verifies the DHCP messages and the MAC address bindings, and drops any unauthorized DHCP packets. This can prevent attackers from spoofing multiple MAC addresses using DHCP requests.
    3. Dynamic ARP Inspection (DAI): Implement Dynamic ARP Inspection on the switch, which validates ARP packets and ensures that the IP addresses match the corresponding MAC addresses. This can prevent ARP poisoning attacks and mitigate MAC flooding to some extent.
    4. Storm Control: Configure storm control on the switch, which monitors the amount of broadcast, multicast, or unknown unicast traffic. If the threshold is exceeded, the switch can drop or limit the traffic to prevent flooding attacks.
    5. Virtual LANs (VLANs): Use VLANs to separate the network into smaller broadcast domains. By isolating different segments, MAC flooding attacks are limited to the VLAN where the attack is initiated rather than affecting the entire network.
    6. MAC Address Rate Limiting: Set rate limiting for MAC address learning, preventing the switch from learning a large number of MAC addresses per second. This helps to detect and mitigate MAC flooding attacks.
    7. Intrusion Prevention Systems (IPS): Deploy an IPS that can inspect network traffic and detect and block MAC table flooding attacks. An IPS can provide real-time protection by monitoring and analyzing network behavior.
    8. Network Access Control (NAC): Implement network access control solutions that authenticate and authorize devices before granting them network access. This helps prevent unauthorized devices from flooding the MAC table.It is important to note that implementing a combination of these measures can enhance network security and better defend against MAC table flooding attacks.
    • ermenegilda
      Which of the following switch attacks associates the attacker's mac?
      8 months ago
    • Mac Spoofing
      • diamanda
        Which method would mitigate a mac address flooding attack?
        8 months ago
      • The most effective way to mitigate a MAC address flooding attack is to deploy an access control list (ACL) on the network. An ACL will allow the administrator to establish criteria for allowed and denied MAC addresses, and block any traffic from unauthorized addresses. Additionally, the ACL can be configured to automatically detect and block MAC addresses that are flooding the network, thus preventing further damage.

        Command

        Description

        (config)#aaa new-model

        Enables AAA on the switch.

        (config)#aaa authentication

        Creates a AAA method list that says to

        dot1x default group radius

        use 802.1x authentication by default,

        using a RADIUS server (configured

        separately).

        (config)#dot1x system-

        Globally enabled 802.1x authentication

        auth-control

        on the switch.

        (config-if)#dot1x port-

        Enables 802.1x authentication on an

        control auto

        interface of the switch.

        show dot1x

        Verifies 802.1x authentication.

        CAMPUS NETWORK SECURITY

        CAMPUS NETWORK SECURITY

        CCNP BCMSN Quick Reference Sheets

        Continue reading here: VLANBased Attacks

        Was this article helpful?

        +1 0