Dell Networking SONiC: Snooping af dynamisk værtskonfigurationsprotokol
Zusammenfassung: Denne artikel beskriver snooping af Dynamic Host Configuration Protocol (DHCP) i Dell Networking SONiC. Denne artikel bruger en switch, der kører Dell SONiC 4.1.
Dieser Artikel gilt für
Dieser Artikel gilt nicht für
Dieser Artikel ist nicht an ein bestimmtes Produkt gebunden.
In diesem Artikel werden nicht alle Produktversionen aufgeführt.
Weisungen
|
Forudsætninger
Navngivning af standardgrænseflader bruges til at demonstrere koncepterne. Se Dells artikel 202172 Dell Networking S-serien: Grundlæggende grænsefladekonfiguration – SONiC 4.0 for yderligere oplysninger om grænsefladenavngivning |
Indeks
Indførelsen
DHCP Layer 2 COPP-konfiguration
IPv4 DHCP Snooping-konfiguration
Ryd poster fra IPv4 DHCP Snooping-bindingstabel
Vis IPv4 DHCP Snooping-oplysninger
Konfiguration af IPv6 DHCP Snooping
Ryd poster fra IPv6 DHCP Snooping-bindingstabel
Vis IPv6 DHCP Snooping-oplysninger
Indledning
DHCP-snooping (Dynamic Host Configuration Protocol) er en sikkerhedsfunktion, der gør det muligt for switche i et netværk at overvåge DHCP-kontrolmeddelelser. En switch kan identificere uautoriserede DHCP-servere og klienter i et netværk ved hjælp af kontrolmeddelelserne.Når du aktiverer DHCP snooping, starter switchen med at overvåge DHCP-kontrolpakker både fra DHCP-servere og klienter. Systemet bruger disse oplysninger til at oprette en database.
Der er to typer DHCP Snooping-grænseflader. betroede og upålidelige grænseflader. Du slutter DHCP-klienter til upålidelige grænseflader og DHCP-servere til betroede grænseflader.
Når switchen modtager DHCP-meddelelser fra klienter på upålidelige porte, videresender den pakkerne til de betroede porte i samme VLAN. Når du konfigurerer porte, der tilsluttes DHCP-servere som betroede, afbryder systemet eventuelle DHCP-server-til-klient-meddelelser, som det modtager på upålidelige grænseflader.
Ved at kontrollere kilde-MAC-adressen i Ethernet-headeren med klientens MAC-adresse i DHCP-headeren minimerer DHCP snooping ondsindede DHCP-klienter fra at erhverve en DHCP-rettighed.
Konfigurationsbemærkninger:
- DHCP snooping er understøttet til IPv4 og IPv6.
- DHCPv6 snooping fungerer kun med DHCPv6 stateful-server
- Aktivér DHCP-snooping globalt og på specifikke VLAN'er.
- Konfigurer porte i VLAN til at være betroede eller upålidelige.
- Som standard er alle porte upålidelige.
- Tilslut DHCP-servere via betroede porte.
- Tilslut DHCP-klienter via upålidelige porte.
- På upålidelige grænseflader afbryder switchen DHCP-pakker, hvis kilde-MAC-adressen ikke stemmer overens med klientens hardwareadresse. Du kan deaktivere denne adfærd ved at deaktivere funktionen Bekræft MAC-adresse. Brug denne funktion til DHCP-relæ- og DHCP unicast-anmodningspakker, der sendes.
- Når du aktiverer DHCP snooping, er funktionen Bekræft MAC-adresse aktiveret som standard.
- DHCP Snooping anvendes ikke på VLAN'er, hvor snooping ikke er aktiveret.
- Du kan konfigurere en manuel indtastning i DHCP snooping-bindingstabellen.
- Før dhcp-snooping aktiveres, skal du fjerne DHCP Layer 3 COPP-reglen og installere DHCP Layer 2 COPP-reglen. Du kan finde flere oplysninger i afsnittet OM KONFIGURATION AF DHCP Layer 2 COPP .
DHCP Layer 2 COPP-konfiguration
Hvis DHCP snooping skal fungere, skal du udføre denne konfiguration:- Afinstaller DHCP Layer 3 COPP-regler. Dette er en standardregel.
admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure terminal DELLSONiC(config)# policy-map copp-system-policy type copp DELLSONiC(config-policy-map)# no class copp-system-dhcp
-
Installer DHCP Layer 2 COPP-regel for DHCP snooping.
admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure terminal DELLSONiC(config)# policy-map copp-system-policy type copp DELLSONiC(config-policy-map)# class copp-system-dhcpl2 DELLSONiC(config-policy-map-flow)# set copp-action copp-system-dhcp
IPv4 DHCP Snooping-konfiguration
Hvis du vil konfigurere DHCP snooping, skal du følge nedenstående procedure:- Enable DHCP snooping globally (Aktiver DHCP-snooping globalt).
sonic(config)# ip dhcp snooping admin@DELLSONiC:~$ sonic-cli DELLSONiC#configure terminal DELLSONiC(config)# ip dhcp snooping
- Konfigurer de grænseflader, der er tilsluttet DHCP-serveren, som betroede.
sonic(config-if)# ip dhcp snooping trust admin@DELLSONiC:~$ sonic-cli DELLSONiC#configure terminal DELLSONiC(config)# interface Eth 1/1 DELLSONiC(config-if-Eth1/1)# ip dhcp snooping trust
DELLSONiC(config-if-Eth1/1)# show configuration ! interface Eth1/1 mtu 9100 speed 100000 unreliable-los auto no shutdown ip dhcp snooping trust DELLSONiC(config-if-Eth1/1)# DELLSONiC# show ip dhcp snooping DHCP snooping is Enabled DHCP snooping source MAC verification is Enabled DHCP snooping is enabled on the following VLANs: 100 200 201 DHCP snooping trusted interfaces: Eth1/1
- Aktivér DHCP-snooping på et VLAN eller en VLAN-liste.
sonic(config)# ip dhcp snooping vlan {vlan-id | vlan-list}
admin@DELLSONiC:~$ sonic-cli
DELLSONiC#configure terminal
DELLSONiC(config)# ip dhcp snooping vlan 100,200-201
%Info: Configuring only existing vlans in range
BEMÆRK: Ovenstående er en INFO-meddelelse.
DELLSONiC# show ip dhcp snooping DHCP snooping is Enabled DHCP snooping source MAC verification is Enabled DHCP snooping is enabled on the following VLANs: 100 200 201 DHCP snooping trusted interfaces: Eth1/1
- (Valgfrit) Deaktiver DHCP-kilde-MAC-adressebekræftelse
sonic(config)# no ip dhcp snooping verify mac-address admin@DELLSONiC:~$ sonic-cli DELLSONiC#configure terminal DELLSONiC(config)# no ip dhcp snooping verify mac-address
DELLSONiC# show ip dhcp snooping DHCP snooping is Enabled DHCP snooping source MAC verification is Disabled DHCP snooping is enabled on the following VLANs: 100 200 201 DHCP snooping trusted interfaces: Eth1/1 DELLSONiC#
- (Valgfrit) Opret en statisk post til DHCP snooping-bindingstabellen.
sonic(config)# ip source binding source-ip-address source-mac-address vlan vlan-id interface interface-name
BEMÆRK: Brug ingen form for IP-kildebindingskommandoen til at fjerne en statisk post.
admin@DELLSONiC:~$ sonic-cli DELLSONiC#configure terminal DELLSONiC(config)# ip source binding 10.10.100.150 aa:bb:cc:dd:11:22 Vlan 100 Eth 1/1
DELLSONiC# show ip dhcp snooping binding Total number of Dynamic bindings: 0 Total number of Static bindings: 1 Total number of Tentative bindings: 0 MAC Address IP Address VLAN Interface Type Lease (Secs) ----------------- --------------- ---- ----------- ------- ----------- aa:bb:cc:dd:11:22 10.10.100.150 100 Eth1/1 static NA DELLSONiC#
Ryd poster fra DHCP snooping-bindingstabellen for IPv4
Brug følgende kommandoer til at rydde alle eller en bestemt dynamisk post:- Ryd alle dynamiske IP DHCP snooping-bindingsposter:
sonic(config)# clear ip dhcp snooping binding
- Ryd en bestemt dynamisk IP DHCP snooping-bindingspost:
sonic(config)# clear ip dhcp snooping binding source-ip-address source-mac-address vlan vlan-id interface interface-name
- Ryd DHCP-snooping-statistik:
sonic# clear ip dhcp snooping statistics
Vis DHCP-snooping-oplysninger for IPv4.
- Vis generelle oplysninger om DHCP snooping:
sonic# show ip dhcp snooping admin@DELLSONiC:~$ sonic-cli DELLSONiC# show ip dhcp snooping DHCP snooping is Enabled DHCP snooping source MAC verification is Disabled DHCP snooping is enabled on the following VLANs: 100 200 201 DHCP snooping trusted interfaces: Eth1/1
- Vis DHCP snooping-bindingsdatabasen:
sonic# show ip dhcp snooping binding admin@DELLSONiC:~$ sonic-cli DELLSONiC# show ip dhcp snooping binding Total number of Dynamic bindings: 0 Total number of Static bindings: 1 Total number of Tentative bindings: 0 MAC Address IP Address VLAN Interface Type Lease (Secs) ----------------- --------------- ---- ----------- ------- ----------- aa:bb:cc:dd:11:22 10.10.100.150 100 Eth1/1 static NA
- Vis dhcp-snooping-statistik:
sonic# show ip dhcp snooping statistics admin@DELLSONiC:~$ sonic-cli DELLSONiC# show ip dhcp snooping statistics Interface MAC Verify Client Ifc DHCP Server Failures Mismatch Msgs Recvd --------------- ---------- ---------- ----------- Eth1/1 0 0 0 Eth1/2 0 0 0 Eth1/3 0 0 0 Eth1/4 0 0 0 Eth1/5 0 0 0 Eth1/6 0 0 0 Eth1/7 0 0 0
Konfigurer DHCP snooping til IPv6.
Hvis du vil konfigurere DHCP snooping, skal du følge nedenstående procedure:
- Enable DHCP snooping globally (Aktiver DHCP-snooping globalt).
sonic(config)# ipv6 dhcp snooping admin@DELLSONiC:~$ sonic-cli DELLSONiC#configure terminal DELLSONiC(config)# ipv6 dhcp snooping
DELLSONiC# show ipv6 dhcp snooping DHCPv6 snooping is Enabled DHCPv6 snooping source MAC verification is Enabled DHCPv6 snooping is enabled on the following VLANs: DHCPv6 snooping trusted interfaces: DELLSONiC#
- Konfigurer de grænseflader, der er tilsluttet DHCP-serveren, som betroede.
sonic(config-if)# ipv6 dhcp snooping trust admin@DELLSONiC:~$ sonic-cli DELLSONiC#configure terminal DELLSONiC(config)# interface Eth 1/1 DELLSONiC(config-if-Eth1/1)# ipv6 dhcp snooping trust
DELLSONiC(config-if-Eth1/1)# show configuration ! interface Eth1/1 mtu 9100 speed 100000 unreliable-los auto no shutdown ip dhcp snooping trust ipv6 dhcp snooping trust DELLSONiC(config-if-Eth1/1)#
DELLSONiC# show ipv6 dhcp snooping DHCPv6 snooping is Enabled DHCPv6 snooping source MAC verification is Enabled DHCPv6 snooping is enabled on the following VLANs: DHCPv6 snooping trusted interfaces: Eth1/1
- Aktivér DHCP-snooping på et VLAN eller en VLAN-liste.
sonic(config)# ipv6 dhcp snooping vlan {vlan-id | vlan-list}
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure
DELLSONiC(config)# ipv6 dhcp snooping vlan 100,200-201
%Info: Configuring only existing vlans in range
BEMÆRK: Ovenstående er en INFO-meddelelse.
DELLSONiC# show ipv6 dhcp snooping DHCPv6 snooping is Enabled DHCPv6 snooping source MAC verification is Enabled DHCPv6 snooping is enabled on the following VLANs: 100 200 201 DHCPv6 snooping trusted interfaces: Eth1/1
- (Valgfrit) Deaktiver DHCP-kilde-MAC-adressebekræftelse
sonic(config)# no ipv6 dhcp snooping verify mac-address admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure DELLSONiC(config)# no ipv6 dhcp snooping verify mac-address
DELLSONiC# show ipv6 dhcp snooping DHCPv6 snooping is Enabled DHCPv6 snooping source MAC verification is Disabled DHCPv6 snooping is enabled on the following VLANs: 100 200 201 DHCPv6 snooping trusted interfaces: Eth1/1 DELLSONiC#
- (Valgfrit) Opret en statisk post til DHCP snooping-bindingstabellen.
sonic(config)# ipv6 source binding source-ip-address source-mac-address vlan vlan-id interface interface-name admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure DELLSONiC(config)# ipv6 source binding 2001:db8:3333::7778 aa:bb:cc:dd:11:11 Vlan 100 Eth 1/1
DELLSONiC# show ipv6 dhcp snooping binding Total number of Dynamic bindings: 0 Total number of Static bindings: 1 Total number of Tentative bindings: 0 MAC Address IPv6 Address VLAN Interface Type Lease (Secs) ----------------- --------------- ---- ----------- ------- ----------- aa:bb:cc:dd:11:11 2001:db8:3333::7778 100 Eth1/1 static NA DELLSONiC#
BEMÆRK: Brug ingen form for IP-kildebindingskommandoen til at fjerne en statisk post.
Ryd poster fra DHCP snooping-bindingstabellen for IPv6
Brug følgende kommandoer til at rydde alle eller en bestemt dynamisk post:
- Ryd alle dynamiske IP DHCP snooping-bindingsposter:
sonic(config)# clear ipv6 dhcp snooping binding
- Ryd en bestemt dynamisk IP DHCP snooping-bindingspost:
sonic(config)# clear ipv6 dhcp snooping binding source-ip-address source-mac-address vlan vlan-id interface interface-name
- Ryd DHCP-snooping-statistik:
sonic# clear ipv6 dhcp snooping statistics
Få vist DHCP-snooping-oplysninger for IPv6.
- Vis generelle oplysninger om DHCP snooping:
sonic# show ipv6 dhcp snooping DELLSONiC# show ipv6 dhcp snooping DHCPv6 snooping is Enabled DHCPv6 snooping source MAC verification is Disabled DHCPv6 snooping is enabled on the following VLANs: 100 200 201 DHCPv6 snooping trusted interfaces: Eth1/1 DELLSONiC#
- Vis DHCP snooping-bindingsdatabasen:
sonic# show ipv6 dhcp snooping binding DELLSONiC# show ipv6 dhcp snooping binding Total number of Dynamic bindings: 0 Total number of Static bindings: 1 Total number of Tentative bindings: 0 MAC Address IPv6 Address VLAN Interface Type Lease (Secs) ----------------- --------------- ---- ----------- ------- ----------- aa:bb:cc:dd:11:11 2001:db8:3333::7778 100 Eth1/1 static NA DELLSONiC#
- Vis dhcp-snooping-statistik:
sonic# show ipv6 dhcp snooping statistics DELLSONiC# show ipv6 dhcp snooping statistics Interface MAC Verify Client Ifc DHCP Server Failures Mismatch Msgs Recvd --------------- ---------- ---------- ----------- Eth1/1 0 0 0 Eth1/2 0 0 0 Eth1/3 0 0 0 Eth1/4 0 0 0
Betroffene Produkte
Enterprise SONiC Distribution, PowerSwitch S5048F-ON, PowerSwitch S5148F-ON, PowerSwitch S5212F-ON, PowerSwitch S5224F-ON, PowerSwitch S5232F-ON, PowerSwitch S5248F-ON, PowerSwitch S5296F-ON, PowerSwitch S5448F-ONArtikeleigenschaften
Artikelnummer: 000218723
Artikeltyp: How To
Zuletzt geändert: 31 Okt. 2023
Version: 2
Antworten auf Ihre Fragen erhalten Sie von anderen Dell NutzerInnen
Support Services
Prüfen Sie, ob Ihr Gerät durch Support Services abgedeckt ist.