Dell Networking SONiC: Spionasje av dynamisk vertskonfigurasjonsprotokoll
Zusammenfassung: Denne artikkelen forklarer om DHCP-spionasje (Dynamic Host Configuration Protocol) i Dell Networking SONiC. Denne artikkelen bruker en svitsj som kjø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
|
Forhåndskrav
Standard grensesnittnavn brukes til å demonstrere konseptene. Se Dell-artikkelen 202172 Dell Networking S-serien: Basic Interface Configuration – SONiC 4.0 for mer informasjon om navngiving av grensesnitt |
Indeks
Introduksjon
KONFIGURASJON av DHCP Layer 2 COPP
IPv4 DHCP-spionasjekonfigurasjon
Fjern oppføringer fra IPv4 DHCP Snooping Binding-tabellen
Vis informasjon
om IPv4 DHCP-spionasjeIPv6 DHCP-spionasjekonfigurasjon
Fjern oppføringer fra IPv6 DHCP Snooping Binding-tabellen
Vis informasjon om IPv6 DHCP-spionasje
Innledning
DHCP-spionasje (Dynamic Host Configuration Protocol) er en sikkerhetsfunksjon som gjør det mulig for svitsjer i et nettverk å overvåke DHCP-kontrollmeldinger. En svitsj kan identifisere useriøs DHCP-servere og klienter i et nettverk ved hjelp av kontrollmeldingene.Når du aktiverer DHCP-spionasje, begynner svitsjen å overvåke DHCP-kontrollpakker både fra DHCP-servere og klienter. Systemet bruker denne informasjonen til å opprette en database.
Det finnes to typer DHCP Snooping-grensesnitt. klarerte og ikke-klarerte grensesnitt. Du kobler DHCP-klienter til ikke-klarerte grensesnitt og DHCP-servere til klarerte grensesnitt.
Når svitsjen mottar DHCP-meldinger fra klienter på ikke-klarerte porter, videresender den pakkene til de klarerte portene i samme VLAN. Når du konfigurerer porter som kobles til DHCP-servere som klarerte, mister systemet alle DHCP-server-til-klient-meldinger som de mottar på ikke-klarerte grensesnitt.
Ved å kontrollere kilde-MAC-adressen i Ethernet-overskriften med klient-MAC-adressen i DHCP-overskriften minimerer DHCP-spionasje skadelige DHCP-klienter fra å hente en DHCP-leasing.
Konfigureringsmerknader:
- DHCP-spionasje støttes for IPv4 og IPv6.
- DHCPv6-spionasje fungerer bare med DHCPv6-tilstandsserver
- Aktiver DHCP-spionasje globalt og på bestemte VLAN-nettverk.
- Konfigurere porter i VLAN til å være klarerte eller ikke-klarerte.
- Som standard er alle porter ikke klarerte.
- Koble TIL DHCP-servere via klarerte porter.
- Koble DHCP-klienter gjennom ikke-klarerte porter.
- På ikke-klarerte grensesnitt dropper svitsjen DHCP-pakker hvis kilde-MAC-adressen ikke samsvarer med klientens maskinvareadresse. Du kan deaktivere denne atferden ved å deaktivere funksjonen Verify MAC address (Bekreft MAC-adresse). Bruk denne funksjonen for DHCP-relé- og DHCP unicast-forespørselspakker som rutes.
- Når du aktiverer DHCP-spionasje, er funksjonen Verify MAC address (Kontroller MAC-adresse) aktivert som standard.
- DHCP-spionasje brukes ikke på VLAN som spionasje ikke er aktivert på.
- Du kan konfigurere en manuell oppføring til tabellen for DHCP-spionasjebinding.
- Før du aktiverer DHCP-spionasje, må du fjerne DHCP Layer 3 COPP-regelen og installere DHCP Layer 2 COPP-regelen. Hvis du vil ha mer informasjon, kan du se avsnittet om konfigurasjon av DHCP Layer 2 COPP .
KONFIGURASJON av DHCP Layer 2 COPP
For at DHCP-spionasje skal fungere, utfører du denne konfigurasjonen:- Avinstaller REGLENE for DHCP Layer 3 COPP. 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-regelen for DHCP-spionasje.
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-spionasjekonfigurasjon
Bruk følgende fremgangsmåte for å konfigurere DHCP-spionasje:- Aktiver DHCP-spionasje globalt.
sonic(config)# ip dhcp snooping admin@DELLSONiC:~$ sonic-cli DELLSONiC#configure terminal DELLSONiC(config)# ip dhcp snooping
- Konfigurere grensesnitt som er koblet til DHCP-serveren som klarert.
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
- Aktiver DHCP-spionasje 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
MERK: Det ovennevnte er en INFO-melding.
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
- (Valgfritt) Deaktiver BEKREFTELSE av MAC-adresse for DHCP-kilde
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#
- (Valgfritt) Opprett en statisk oppføring i tabellen for DHCP-spionasjebinding.
sonic(config)# ip source binding source-ip-address source-mac-address vlan vlan-id interface interface-name
MERK: Bruk ingen form for IP-kildebindingskommandoen for å fjerne en statisk oppføring.
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#
Fjern oppføringer fra DHCP-bindingstabellen for IPv4
Bruk følgende kommandoer til å fjerne alle eller en bestemt dynamisk oppføring:- Fjern alle dynamiske IP DHCP-bindingsoppføringer for spionasje:
sonic(config)# clear ip dhcp snooping binding
- Slette en bestemt dynamisk IP DHCP-bindingsoppføring for spionasje:
sonic(config)# clear ip dhcp snooping binding source-ip-address source-mac-address vlan vlan-id interface interface-name
- Slett DHCP-spionasjestatistikk:
sonic# clear ip dhcp snooping statistics
Vis informasjon om DHCP-spionasje for IPv4.
- Vis generell informasjon om DHCP-spionasje:
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 DATABASEN for DHCP-spionasjebinding:
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
- Se DHCP-spionasjestatistikk:
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
Konfigurere DHCP-spionasje for IPv6.
Bruk følgende fremgangsmåte for å konfigurere DHCP-spionasje:
- Aktiver DHCP-spionasje 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#
- Konfigurere grensesnitt som er koblet til DHCP-serveren som klarert.
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
- Aktiver DHCP-spionasje 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
MERK: Det ovennevnte er en INFO-melding.
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
- (Valgfritt) Deaktiver BEKREFTELSE av MAC-adresse for DHCP-kilde
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#
- (Valgfritt) Opprett en statisk oppføring i tabellen for DHCP-spionasjebinding.
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#
MERK: Bruk ingen form for IP-kildebindingskommandoen for å fjerne en statisk oppføring.
Fjern oppføringer fra DHCP-bindingstabellen for IPv6
Bruk følgende kommandoer til å fjerne alle eller en bestemt dynamisk oppføring:
- Fjern alle dynamiske IP DHCP-bindingsoppføringer for spionasje:
sonic(config)# clear ipv6 dhcp snooping binding
- Slette en bestemt dynamisk IP DHCP-bindingsoppføring for spionasje:
sonic(config)# clear ipv6 dhcp snooping binding source-ip-address source-mac-address vlan vlan-id interface interface-name
- Slett DHCP-spionasjestatistikk:
sonic# clear ipv6 dhcp snooping statistics
Vis informasjon om DHCP-spionasje for IPv6.
- Vis generell informasjon om DHCP-spionasje:
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 DATABASEN for DHCP-spionasjebinding:
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#
- Se DHCP-spionasjestatistikk:
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.