Dell Networking SONiC MAC-adresse (Media Access Control)
Zusammenfassung: Denne artikel forklarer om MAC-adresse i Dell SONiC-switche
Weisungen
Indeks
Hvad er MAC-adresse
Sådan læres MAC-adressen i switchen
Konfigurer en statisk MAC-adresse
Konfigurer MAC-forældelsestid
Konfigurer dæmpning af
MAC-adresseEksempelkonfiguration
Kontrol
Vis MAC-adressetabel
Vis poster i MAC-adressetabellen efter MAC-adresse
Vis POSTER i MAC-adressetabellen efter VLAN
Vis antal
MAC-adresserVis MAC-adresseposter efter grænseflade
Vis MAC-adresseposter efter PortChannel
Vis statiske MAC-adresseposter
Vis dynamiske MAC-adresseposter
Hvad er MAC-adresse
En MAC-adresse (Media Access Control) er et 48-bit tal i formatet nn.nn.nn.nn.nn.nn.nn.nn. MAC-adressetabellen indeholder statiske og dynamiske MAC-adresseposter.
- Statiske MAC-adresser er brugerkonfigurerede poster, som ikke forældes.
- Dynamisk indlærte MAC-adresser er hardwarebaserede poster, der forældes i henhold til den konfigurerede aldringstid.
Sådan læres MAC-adressen i switchen
Når switchen modtager en pakke, lærer den MAC-adressen i kilde-MAC-adressefeltet på den port, som pakken modtages. Switchen søger derefter efter destinations-MAC-adressen for det angivne VLAN i MAC-adressetabellen. Hvis destinations-MAC-adressen findes, videresender switchen pakken til den relevante port-/portkanal. Hvis destinations-MAC-adressen ikke findes, oversvømmer switchen pakken på alle VLAN-porte.
Når forældelsestiden er nået, slettes manglende modtaget pakke med kilde-MAC, en dynamisk MAC-adressepost i tabellen.
Konfigurer en statisk MAC-adresse
Hvis du vil føje en statisk MAC-adresse til MAC-adressetabellen, skal du manuelt konfigurere adressen. Angiv den Ethernet-port eller portkanal og VLAN, hvorigennem enheden med den statiske MAC-adresse kan nås, og hvortil switchen kan videresende pakker.
Konfigurationssyntaks
admin@sonic:~$ sonic-cli sonic# configure sonic(config)# mac address-table mac-address Vlan vlan-id |
Eksempelkonfiguration
admin@sonic:~$ sonic-cli sonic# configure sonic(config)# no mac address-table 00:00:00:00:00:01 Vlan 10 |
Hvis du vil slette en statisk MAC-adresse, skal du bruge ingen version af den komplette kommando uden Ethernet-porten eller portkanalnummeret.
Eksempelkonfiguration
admin@sonic:~$ sonic-cli sonic# configure sonic(config)# no mac address-table 00:00:00:00:00:01 Vlan 10 |
Konfigurer MAC-forældelsestid
Konfigurer aldringstiden for alle dynamisk indlærte MAC-adresser (0 til 1000000 sekunder; standard 600). Statiske MAC-adresseposter påvirkes ikke af mac-adressetabellens forældelsestidskommando. Når forældelsestiden er nået, slettes en dynamisk MAC-adressepost i tabellen. Indtast 0 for at deaktivere MAC-forringelse. Indtast ingen version af kommandoen for at gendanne standardforældelsestiden.Konfigurationssyntaks
admin@sonic:~$ sonic-cli sonic# configure sonic(config)# mac address-table aging-time |
Eksempelkonfiguration
admin@sonic:~$ sonic-cli sonic# show mac address-table aging-time Global aging time: 600 seconds admin@sonic:~$ sonic-cli sonic# configure sonic(config)# mac address-table aging-time 1000 sonic(config)# exit sonic# show mac address-table aging-time Global aging time: 1000 seconds sonic(config)# mac address-table aging-time 0 sonic(config)# exit sonic# show mac address-table aging-time Global aging time: 0 seconds(disabled) sonic(config)# no mac address-table aging-time sonic(config)# exit sonic# show mac address-table aging-time Global aging time: 600 seconds |
Konfigurer dæmpning af MAC-adresse
For at begrænse det maksimale antal gange, en dynamisk MAC-adresse kan tildeles forskellige grænseflader, skal du konfigurere en dæmpningsgrænse (5 til 100; ingen standard).Konfigurationssyntaks
admin@sonic:~$ sonic-cli sonic# configure sonic(config)# mac address-table dampening-threshold |
For at konfigurere det mindste tidsinterval, som en dynamisk MAC-adresse kan tildeles til forskellige grænseflader, skal du konfigurere et dæmpningsinterval (1 til 1000000 sekunder; ingen standard).
Konfigurationssyntaks
admin@sonic:~$ sonic-cli sonic# configure sonic(config)# mac address-table dampening-interval |
Eksempelkonfiguration
admin@sonic:~$ sonic-cli sonic# configure sonic(config)# mac address-table 00:00:00:00:00:01 Vlan 10 Eth1/1 sonic(config)# mac address-table 00:00:00:00:00:01 Vlan 11 Eth1/1 sonic(config)# mac address-table 00:00:00:00:00:03 Vlan 30 Eth1/2 sonic(config)# mac address-table 00:00:00:00:00:05 Vlan 50 Eth1/3 sonic(config)# mac address-table 00:00:00:00:00:07 Vlan 70 Eth1/4 sonic(config)# mac address-table 00:00:00:00:00:09 Vlan 90 Eth1/5 sonic(config)# mac address-table 00:00:00:00:00:98 Vlan 10 Eth1/6 sonic(config)# mac address-table 00:00:00:00:00:99 Vlan 99 PortChannel 110 sonic(config)# mac address-table aging-time 1000 sonic(config)# mac address-table dampening-threshold 10 sonic(config)# mac address-table dampening-interval 100000 |
Verifikation
Brug show mac-address table-kommandoer til at få vist oplysninger om MAC-adressetabellen.
show mac address-table [address mac-address] [aging-time] [interface Eth slot/port[/breakout-port]] [Vlan vlan-id] [PortChannel number] [count] [static] [dynamic] |
Vis MAC-adressetabel
Eksempel på output
sonic# show mac address-table ----------------------------------------------------------- VLAN MAC-ADDRESS TYPE INTERFACE ----------------------------------------------------------- 10 00:00:00:00:00:01 STATIC Eth1/1 11 00:00:00:00:00:01 STATIC Eth1/1 100 00:00:00:00:00:10 DYNAMIC Eth1/9 20 00:00:00:00:00:02 DYNAMIC Eth1/2 30 00:00:00:00:00:03 STATIC Eth1/2 40 00:00:00:00:00:04 DYNAMIC Eth1/3 50 00:00:00:00:00:05 STATIC Eth1/3 60 00:00:00:00:00:06 DYNAMIC Eth1/4 70 00:00:00:00:00:07 STATIC Eth1/4 80 00:00:00:00:00:08 DYNAMIC Eth1/4 90 00:00:00:00:00:09 STATIC Eth1/5 99 00:00:00:00:00:99 STATIC PortChannel110 |
Vis poster i MAC-adressetabellen efter MAC-adresse
Eksempel på output
sonic# show mac address-table address 00:00:00:00:00:01 ----------------------------------------------------------- VLAN MAC-ADDRESS TYPE INTERFACE ----------------------------------------------------------- 10 00:00:00:00:00:01 STATIC Eth1/1 11 00:00:00:00:00:01 STATIC Eth1/1 |
Vis POSTER i MAC-adressetabellen efter VLAN
Eksempel på output
sonic# show mac address-table Vlan 10 ----------------------------------------------------------- VLAN MAC-ADDRESS TYPE INTERFACE ----------------------------------------------------------- 10 00:00:00:00:00:01 STATIC Eth1/1 10 00:00:00:00:00:98 STATIC Eth1/1 |
sonic# show mac address-table static Vlan 11 ----------------------------------------------------------- VLAN MAC-ADDRESS TYPE INTERFACE ----------------------------------------------------------- 11 00:00:00:00:00:01 STATIC Eth1/1 |
sonic# show mac address-table dynamic Vlan 60 ----------------------------------------------------------- VLAN MAC-ADDRESS TYPE INTERFACE ----------------------------------------------------------- 60 00:00:00:00:00:06 DYNAMIC Eth1/12 |
Vis antal
MAC-adresserEksempel på output
sonic# show mac address-table count MAC Entries for all vlans : 13 Dynamic Address Count : 5 Static Address (User-defined) Count : 8 Total MAC Addresses in Use: 13 |
Vis MAC-adresseposter efter grænseflade
Eksempel på output
sonic# show mac address-table interface Eth1/1 ----------------------------------------------------------- VLAN MAC-ADDRESS TYPE INTERFACE ----------------------------------------------------------- 10 00:00:00:00:00:01 STATIC Eth1/1 10 00:00:00:00:00:98 STATIC Eth1/1 11 00:00:00:00:00:01 STATIC Eth1/1 |
sonic# show mac address-table static interface Eth1/3 ----------------------------------------------------------- VLAN MAC-ADDRESS TYPE INTERFACE ----------------------------------------------------------- 30 00:00:00:00:00:03 STATIC Eth1/3 |
sonic# show mac address-table dynamic interface Eth1/5 ----------------------------------------------------------- VLAN MAC-ADDRESS TYPE INTERFACE ----------------------------------------------------------- 60 00:00:00:00:00:06 DYNAMIC Eth1/5 |
Vis MAC-adresseposter efter PortChannel
Eksempel på output
sonic# show mac address-table interface PortChannel 10 ----------------------------------------------------------- VLAN MAC-ADDRESS TYPE INTERFACE ----------------------------------------------------------- 99 00:00:00:00:00:99 STATIC PortChannel10 |
Vis statiske MAC-adresseposter
Eksempel på output
sonic# show mac address-table static ----------------------------------------------------------- VLAN MAC-ADDRESS TYPE INTERFACE ----------------------------------------------------------- 10 00:00:00:00:00:01 STATIC Eth1/1 11 00:00:00:00:00:01 STATIC Eth1/1 30 00:00:00:00:00:03 STATIC Eth1/3 50 00:00:00:00:00:05 STATIC Eth1/5 70 00:00:00:00:00:07 STATIC Eth1/7 90 00:00:00:00:00:09 STATIC Eth1/9 10 00:00:00:00:00:98 STATIC Eth1/1 99 00:00:00:00:00:99 STATIC PortChannel10 |
sonic# show mac address-table static address 00:00:00:00:00:01 ----------------------------------------------------------- VLAN MAC-ADDRESS TYPE INTERFACE ----------------------------------------------------------- 10 00:00:00:00:00:01 STATIC Eth1/1 11 00:00:00:00:00:01 STATIC Eth1/1 |
Vis dynamiske MAC-adresseposter
Eksempel på output
sonic# show mac address-table dynamic ----------------------------------------------------------- VLAN MAC-ADDRESS TYPE INTERFACE ----------------------------------------------------------- 100 00:00:00:00:00:10 DYNAMIC Eth1/1 20 00:00:00:00:00:02 DYNAMIC Eth1/2 40 00:00:00:00:00:04 DYNAMIC Eth1/3 60 00:00:00:00:00:06 DYNAMIC Eth1/4 80 00:00:00:00:00:08 DYNAMIC Eth1/5 |
sonic# show mac address-table dynamic address 00:00:00:00:00:06 ----------------------------------------------------------- VLAN MAC-ADDRESS TYPE INTERFACE ----------------------------------------------------------- 60 00:00:00:00:00:06 DYNAMIC Eth1/1 |