MAC Learning - Cisco · MAC Learning...

12
MAC Learning This chapter describes MAC learning, MAC address limiting, and static MAC address. This chapter also describes the configuration procedures. Understanding MAC Learning, page 1 Understanding MAC Address Limiting, page 4 Understanding the Static MAC Address, page 6 Removing a MAC Address, page 8 Displaying Information About the MAC Address Table, page 9 Understanding MAC Learning A software MAC address table is maintained on the Cisco ME 2600X. This MAC address table contains the MAC addresses learned on all the interfaces of Cisco ME 2600X. By default, MAC address learning is enabled only for pointtomultipoint bridge domains and can also be disabled. Note MAC Address Aging Dynamically learned MAC addresses are deleted after the MAC address age out value. This frees up unused addresses from the MAC address table for other active subscribers. In Cisco ME 2600X, the default value for MAC address aging is 300 seconds and cannot be changed. The expected MAC address age out timer is between 300 to 600 seconds depending on the number of MAC addresses learned. Dynamic MAC Address Learning Dynamic MAC address learning occurs when the bridging data path encounters an ingress frame whose source address is not present in the MAC address table for the ingress service instance. The learned MAC addresses are distributed to the other cards with Ethernet Flow Points (EFPs) in the same bridge domain. Cisco ME 2600X Series Ethernet Access Switch Software Configuration Guide OL-28850-04 1

Transcript of MAC Learning - Cisco · MAC Learning...

  • MAC Learning

    This chapter describes MAC learning, MAC address limiting, and static MAC address. This chapter alsodescribes the configuration procedures.

    • Understanding MAC Learning, page 1

    • Understanding MAC Address Limiting, page 4

    • Understanding the Static MAC Address, page 6

    • Removing a MAC Address, page 8

    • Displaying Information About the MAC Address Table, page 9

    Understanding MAC LearningA software MAC address table is maintained on the Cisco ME 2600X. This MAC address table contains theMAC addresses learned on all the interfaces of Cisco ME 2600X.

    By default, MAC address learning is enabled only for point–to–multipoint bridge domains and can alsobe disabled.

    Note

    MAC Address Aging

    Dynamically learned MAC addresses are deleted after the MAC address age out value. This frees up unusedaddresses from the MAC address table for other active subscribers. In Cisco ME 2600X, the default value forMAC address aging is 300 seconds and cannot be changed. The expected MAC address age out timer isbetween 300 to 600 seconds depending on the number of MAC addresses learned.

    Dynamic MAC Address Learning

    DynamicMAC address learning occurs when the bridging data path encounters an ingress frame whose sourceaddress is not present in the MAC address table for the ingress service instance. The learned MAC addressesare distributed to the other cards with Ethernet Flow Points (EFPs) in the same bridge domain.

    Cisco ME 2600X Series Ethernet Access Switch Software Configuration Guide OL-28850-04 1

  • MAC Move

    A MAC move occurs when the same MAC address is re-learned on a different port. When a MAC move isdetected, a transient event is generated to inform the user about the MAC move.

    MAC Learning on LAG

    MAC learning is enabled on the LAG interface, if the Link Aggregation Group (LAG) interface is part of thepoint–to–multipoint bridge domain. The MAC addresses are learned on the LAG interface instead of thephysical interface.

    MAC Learning ActionsThe table below describes the various scenarios and the actions taken on MAC addresses for each scenario.

    Table 1: MAC Learning Actions

    ActionScenario

    The MAC learning is enabled by default in point–to–multipointbridge domains. The MAC learning is not supported inpoint–to–point bridge domains.

    A bridge domain is created.

    The MAC addresses learned on the bridge domain are removedfrom the software MAC address table that is maintained on theinterface on Cisco ME 2600X.

    A bridge domain is deleted.

    All the MAC addresses learned on the bridge domain are sent tothis new interface on Cisco ME 2600X.

    An EFP is added and is the first EFPon a bridge domain on an interface ofCisco ME 2600X.

    Nothing needs to be done as the MAC addresses learned on thebridge domain are already present.

    An EFP is added and is not the firstEFP on a bridge domain.

    All the MAC addresses learned on that EFP are deleted.An EFP is deleted.

    When the EFP is the first EFP on the bridge domain on the CiscoME 2600X, all the MAC addresses learned on the bridge domainare sent to this new interface on Cisco ME 2600X. When the EFPis not the first EFP on the bridge domain on the interface, nothingneeds to be done as the MAC addresses learned on the bridgedomain are already present.

    An EFP admin state is UP.

    All the MAC addresses learned on that EFP are deleted.An EFP admin state is DOWN.

    All theMAC addresses learned on the port on all the bridge domainsare deleted.

    The port goes down.

    MAC Learning Configuration ProceduresThe following procedures can be performed using Cisco IOS commands to configureMAC learning andMACaddress limiting:

    Cisco ME 2600X Series Ethernet Access Switch Software Configuration Guide2 OL-28850-04

    MAC LearningMAC Learning Actions

  • • Re–enabling or Disabling MAC Learning on a Bridge Domain, on page 3

    • Configuring MAC Address Limit on a Bridge Domain, on page 5

    • Configuring a Static MAC Address on a Service Instance, on page 6

    • Removing a MAC Address, on page 8

    • Displaying Information About the MAC Address Table, on page 9

    Re–enabling or Disabling MAC Learning on a Bridge Domain

    MAC learning is enabled on the point–to–multipoint bridge domains by default.Note

    SUMMARY STEPS

    1. enable2. configure terminal3. bridge-domain bridge-id4. mac learning5. no mac learning6. end

    DETAILED STEPS

    PurposeCommand or Action

    Enables privileged EXEC mode.enableStep 1

    Example:Switch> enable

    • Enter your password if prompted.

    Enters global configuration mode.configure terminal

    Example:Switch# configure terminal

    Step 2

    Configures components on a bridge domain and entersbridge domain configuration mode.

    bridge-domain bridge-id

    Example:Switch(config)# bridge-domain 100

    Step 3

    Re-enables MAC learning on this bridge domain.mac learning

    Example:Switch(config-bdomain)# mac learning

    Step 4

    Cisco ME 2600X Series Ethernet Access Switch Software Configuration Guide OL-28850-04 3

    MAC LearningRe–enabling or Disabling MAC Learning on a Bridge Domain

  • PurposeCommand or Action

    Disables MAC learning on this bridge domain.no mac learning

    Example:Switch(config-bdomain)# no mac learning

    Step 5

    Exits bridge domain configuration mode and returns toprivileged EXEC mode.

    end

    Example:Switch(config-bdomain)# end

    Step 6

    Example: Re–enable or Disable MAC Learning on a Bridge DomainThe following example shows how to re-enableMAC learning on a bridge domain using Cisco IOS commands:

    Switch> enableSwitch# configure terminalSwitch(config)# bridge-domain 100Switch(config-bdomain)# mac learningSwitch(config-bdomain)# end

    The following example shows how to disable MAC learning on a bridge domain using Cisco IOS commands:

    Switch> enableSwitch# configure terminalSwitch(config)# bridge-domain 100Switch(config-bdomain)# no mac learningSwitch(config-bdomain)# end

    Understanding MAC Address LimitingThe MAC Address Limiting for bridge domains provides the capability to control the MAC addresses learnton the bridge domain. You can configure an upper limit on the number of MAC addresses that can be learntin a bridge domain. If an Ethernet frame with an unknownMAC address is received, it is flooded in the bridgedomain. The MAC address limiting commands are configured under the bridge domain.

    The maximum MAC address limit on a bridge domain is 32000.Note

    Cisco ME 2600X Series Ethernet Access Switch Software Configuration Guide4 OL-28850-04

    MAC LearningUnderstanding MAC Address Limiting

  • Configuring MAC Address Limit on a Bridge Domain

    SUMMARY STEPS

    1. enable2. configure terminal3. bridge-domain bridge-id4. mac limit maximum addresses maximum-addresses5. end

    DETAILED STEPS

    PurposeCommand or Action

    Enables privileged EXEC mode.enableStep 1

    Example:Switch> enable

    • Enter your password if prompted.

    Enters global configuration mode.configure terminal

    Example:Switch# configure terminal

    Step 2

    Configures components on a bridge domain and enters bridgedomain configuration mode.

    bridge-domain bridge-id

    Example:Switch(config)# bridge-domain 100

    Step 3

    Sets an upper limit on the number ofMAC addresses that residein a bridge domain.

    mac limit maximum addressesmaximum-addresses

    Step 4

    Example:Switch(config-bdomain)# mac limit maximumaddresses 200

    Use the no mac limit command to restore the defaultMAC address limit.

    Note

    Exits bridge domain configuration mode and returns toprivileged EXEC mode.

    end

    Example:Switch(config-bdomain)# end

    Step 5

    Example: Configure MAC Address Limit on a Bridge Domain

    The following example shows how to configure MAC address limiting on a bridge domain using Cisco IOScommands:

    Switch> enableSwitch# configure terminalSwitch(config)# bridge-domain 100

    Cisco ME 2600X Series Ethernet Access Switch Software Configuration Guide OL-28850-04 5

    MAC LearningConfiguring MAC Address Limit on a Bridge Domain

  • Switch(config-bdomain)# mac limit maximum addresses 1000Switch(config-bdomain)# end

    Understanding the Static MAC AddressYou can configure static MAC addresses on a service instance. Static MAC address configuration on serviceinstances eliminates the need for MAC address learning, which is required for traffic forwarding. WithoutMAC address learning,MAC address table resources can be conserved and network resources can be optimized.

    Static MAC address configuration does not apply to the MVR bridge domain.Note

    Benefits

    Static MAC address support on service instances provides the following benefits:

    • Facilitates optimization of network resources.

    • Conserves MAC table resources when used for upstream traffic.

    Restrictions for Static MAC Address

    • Multicast static MAC addresses are not allowed in MAC address configurations.

    • Unicast MAC addresses can be statically configured.

    Configuring a Static MAC Address on a Service InstancePrerequisiteConfiguring an Ethernet Service Instance

    Use the no mac static address mac-addr command to remove the statically added unicast MAC address.Note

    SUMMARY STEPS

    1. enable2. configure terminal3. interface type number4. service instance id ethernet [evc-id]5. mac static address mac-address6. exit7. end

    Cisco ME 2600X Series Ethernet Access Switch Software Configuration Guide6 OL-28850-04

    MAC LearningUnderstanding the Static MAC Address

    b_ME2600X-scg_chapter_010.pdf#unique_70

  • DETAILED STEPS

    PurposeCommand or Action

    Enables privileged EXEC mode.enableStep 1

    Example:Switch> enable

    • Enter your password if prompted.

    Enters global configuration mode.configure terminal

    Example:Switch# configure terminal

    Step 2

    Configures a Ten Gigabit Ethernet interface and entersinterface configuration mode.

    interface type number

    Example:Switch(config)# interface TenGigabitEthernet0/45

    Step 3

    Configures an Ethernet service instance on an interfaceand enters service instance configuration mode.

    service instance id ethernet [evc-id]

    Example:Switch(config-if)# service instance 1 ethernet

    Step 4

    Configures a static MAC address on a service instance.mac static address mac-address

    Example:Switch(config-if-srv)# mac static address0000.bbbb.cccc

    Step 5

    Returns to interface configuration mode.exit

    Example:Switch(config-if-srv)# exit

    Step 6

    Returns to privileged EXEC mode.end

    Example:Switch(config-if)# end

    Step 7

    Example: Configure a Static MAC Address on a Service Instance

    The following example shows how to configure a static MAC address on a service instance using Cisco IOScommands:

    Switch> enableSwitch# configure terminalSwitch(config)# interface TenGigabitEthernet 0/45Switch(config-if)# service instance 1 ethernetSwitch(config-if-srv)# encapsulation dot1q 100Switch(config-if-srv)# bridge-domain 100Switch(config-if-srv)# mac static address 0000.bbbb.ccccSwitch(config-if-srv)# exitSwitch(config-if)# end

    Cisco ME 2600X Series Ethernet Access Switch Software Configuration Guide OL-28850-04 7

    MAC LearningConfiguring a Static MAC Address on a Service Instance

  • Removing a MAC Address

    This procedure removes only dynamically added MAC addresses. To remove the statically added MACaddresses, use the no mac static address mac-addr command.

    Note

    SUMMARY STEPS

    1. enable2. configure terminal3. clear mac-address-table [address mac-address] [interface type number] [bridge-domain

    bridgedomain-id]4. exit

    DETAILED STEPS

    PurposeCommand or Action

    Enables privileged EXEC mode.enableStep 1

    Example:Switch> enable

    • Enter your password if prompted.

    Enters global configuration mode.configure terminal

    Example:Switch# configure terminal

    Step 2

    Removes the dynamic MAC address from the MACaddress table on a bridge domain. The bridgedomain-idis the bridge domain number.

    clearmac-address-table [addressmac-address] [interfacetype number] [bridge-domain bridgedomain-id]

    Example:Switch(config)# clear mac-address-table address0000.bbbb.cccc interface TenGigabitEthernet 0/45bridge-domain 100

    Step 3

    Exits global configuration mode.exit

    Example:Switch(config)# exit

    Step 4

    Example: Remove a MAC Address

    The following example shows how to remove aMAC address from theMAC address table on a bridge domainusing Cisco IOS commands:

    Switch> enableSwitch# configure terminal

    Cisco ME 2600X Series Ethernet Access Switch Software Configuration Guide8 OL-28850-04

    MAC LearningRemoving a MAC Address

  • Switch(config)# clear mac-address-table address 0000.bbbb.cccc interface TenGigabitEthernet0/45 bridge-domain 100

    Switch(config)# exit

    The following example shows how to remove a MAC address from the MAC address table on all the bridgedomains using Cisco IOS commands:

    Switch> enableSwitch# configure terminalSwitch(config)# clear mac-address-table address 0000.bbbb.ccccSwitch(config)# exit

    Displaying Information About the MAC Address TableSUMMARY STEPS

    1. enable2. show mac-address-table address mac-addr3. show mac-address-table bridge-domain bridge-domain-id4. show mac-address-table interface type number

    DETAILED STEPS

    PurposeCommand or Action

    Enables privileged EXEC mode.enableStep 1

    Example:Switch> enable

    • Enter your password if prompted.

    Displays information about the MAC address table for aspecific MAC address. The mac-addr is a 48–bit MACaddress and the valid format is H.H.H.

    show mac-address-table address mac-addr

    Example:Switch# show mac-address-table address0050.3e8d.6400

    Step 2

    Displays information about the MAC address table for aspecific bridge domain. The bridge-domain-id is the bridgedomain number.

    show mac-address-table bridge-domainbridge-domain-id

    Example:Switch# show mac-address-table bridge-domain100

    Step 3

    Displays information about the MAC address table for aspecific interface.

    show mac-address-table interface type number

    Example:Switch# show mac-address-table interfaceTenGigabitEthernet 0/45

    Step 4

    Cisco ME 2600X Series Ethernet Access Switch Software Configuration Guide OL-28850-04 9

    MAC LearningDisplaying Information About the MAC Address Table

  • Example: Display Information About the MAC Address Table

    The following example shows how to display the MAC address table information:

    Switch# show mac-address-table

    Bridge Domain Index MAC Address Type Ports--------------------------------------------2 0000.1000.001e dynamic Te4/22 0000.1000.001d dynamic Te4/22 0000.1000.001c dynamic Te4/2200 0050.3e8d.6400 static Te4/1100 0050.3e8d.6400 static Te4/15 0050.3e8d.6400 static Te4/14 0050.3e8d.6400 static Te4/11 0050.3e8d.6400 static Te4/1

    The following example shows how to display theMAC address table information for a specificMAC address:

    Switch# show mac-address-table address 0000.1000.0001

    Bridge Domain Index MAC Address Type Ports--------------------------------------------2 0000.1000.0001 dynamic Te4/2

    The following example shows how to display theMAC address table information for a specific bridge domain:

    Switch# show mac-address-table bridge-domain 2

    Bridge Domain Index MAC Address Type Ports--------------------------------------------2 0000.1000.001e dynamic Te4/22 0000.1000.001d dynamic Te4/22 0000.1000.001c dynamic Te4/22 0000.1000.001b dynamic Te4/22 0000.1000.001a dynamic Te4/22 0000.1000.0019 dynamic Te4/2

    The following example shows how to display the MAC address table information for a specific interface:

    Switch# show mac-address-table interface tenGigabitEthernet 0/45

    Bridge Domain Index MAC Address Type Ports--------------------------------------------2 0000.1000.001e dynamic Te4/22 0000.1000.001d dynamic Te4/22 0000.1000.001c dynamic Te4/22 0000.1000.001b dynamic Te4/22 0000.1000.001a dynamic Te4/22 0000.1000.0019 dynamic Te4/2

    The following example shows how to display the MAC address table information for a LAG interface (Po9):

    Switch# show mac-address-table

    Cisco ME 2600X Series Ethernet Access Switch Software Configuration Guide10 OL-28850-04

    MAC LearningDisplaying Information About the MAC Address Table

  • Bridge Domain Index MAC Address Type Ports--------------------------------------------2 0000.0300.0900 dynamic Te4/12 0000.0300.1000 dynamic Po9

    Cisco ME 2600X Series Ethernet Access Switch Software Configuration Guide OL-28850-04 11

    MAC LearningDisplaying Information About the MAC Address Table

  • Cisco ME 2600X Series Ethernet Access Switch Software Configuration Guide12 OL-28850-04

    MAC LearningDisplaying Information About the MAC Address Table

    MAC LearningUnderstanding MAC LearningMAC Learning ActionsMAC Learning Configuration ProceduresRe–enabling or Disabling MAC Learning on a Bridge Domain

    Understanding MAC Address LimitingConfiguring MAC Address Limit on a Bridge Domain

    Understanding the Static MAC AddressConfiguring a Static MAC Address on a Service Instance

    Removing a MAC AddressDisplaying Information About the MAC Address Table