Dell Networking SONiC: 동적 호스트 구성 프로토콜 스누핑
Summary: 이 문서에서는 Dell Networking SONiC에서 DHCP(Dynamic Host Configuration Protocol) 스누핑에 대해 설명합니다. 이 문서에서는 Dell SONiC 4.1을 실행하는 스위치를 사용합니다.
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Instructions
|
필수 구성 요소
표준 인터페이스 명명은 개념을 시연하는 데 사용됩니다. Dell Networking S 시리즈 202172 Dell 문서를 참조하십시오. 기본 인터페이스 구성 - 인터페이스 명명에 대한 자세한 내용을 보려면 SONiC 4.0 |
인덱스
소개
DHCP Layer 2의 구성
IPv4 DHCP 스누핑 구성
IPv4 DHCP 스누핑 바인딩 표
에서 항목 지우기IPv4 DHCP 스누핑 정보
보기IPv6 DHCP 스누핑 구성
IPv6 DHCP 스누핑 바인딩 표
에서 항목 지우기IPv6 DHCP 스누핑 정보 보기
소개
DHCP(Dynamic Host Configuration Protocol) 스누핑은 네트워크의 스위치가 DHCP 제어 메시지를 모니터링할 수 있는 보안 기능입니다. 스위치는 제어 메시지를 사용하여 네트워크에서 악성 DHCP 서버 및 클라이언트를 식별할 수 있습니다.DHCP 스누핑을 활성화하면 스위치가 DHCP 서버와 클라이언트 모두에서 DHCP 제어 패킷 모니터링을 시작합니다. 시스템은 이 정보를 사용하여 데이터베이스를 구축합니다.
DHCP 스누핑 인터페이스에는 두 가지 유형이 있습니다. 신뢰할 수 있고 신뢰할 수 없는 인터페이스 신뢰할 수 없는 인터페이스에 DHCP 클라이언트를 연결하고 DHCP 서버를 신뢰할 수 있는 인터페이스에 연결합니다.
스위치가 신뢰할 수 없는 포트의 클라이언트로부터 DHCP 메시지를 수신하면 동일한 VLAN의 신뢰할 수 있는 포트로 패킷을 전달합니다. 신뢰할 수 있는 것으로 DHCP 서버에 연결하는 포트를 구성하면 신뢰할 수 없는 인터페이스에서 수신되는 모든 DHCP-서버-클라이언트 메시지가 삭제됩니다.
DHCP 스누핑은 DHCP 헤더의 클라이언트 MAC 주소와 함께 이더넷 헤더의 소스 MAC 주소를 확인하여 악의적인 DHCP 클라이언트가 DHCP 임대를 획득하지 못하도록 최소화합니다.
구성 참고 사항:
- DHCP 스누핑은 IPv4 및 IPv6에서 지원됩니다.
- DHCPv6 스누핑은 DHCPv6 상태 저장 서버에서만 작동합니다.
- 전 세계 및 특정 VLAN에서 DHCP 스누핑을 활성화합니다.
- VLAN 내의 포트를 신뢰할 수 있거나 신뢰할 수 되도록 구성합니다.
- 기본적으로 모든 포트는 신뢰할 수 없는 상태입니다.
- 신뢰할 수 있는 포트를 통해 DHCP 서버를 연결합니다.
- 신뢰할 수 없는 포트를 통해 DHCP 클라이언트를 연결합니다.
- 신뢰할 수 없는 인터페이스에서 소스 MAC 주소가 클라이언트 하드웨어 주소와 일치하지 않으면 스위치가 DHCP 패킷을 삭제합니다. MAC 주소 확인 기능을 비활성화하는 이 동작을 비활성화할 수 있습니다. 라우팅된 DHCP 릴레이 및 DHCP 유니캐스트 요청 패킷에 이 기능을 사용합니다.
- DHCP 스누핑을 활성화하면 MAC 주소 확인 기능이 기본적으로 활성화되어 있습니다.
- 스누핑이 활성화되지 않은 VLAN에는 DHCP 스누핑이 적용되지 않습니다.
- DHCP 스누핑 바인딩 테이블에 대한 수동 항목을 구성할 수 있습니다.
- DHCP 스누핑을 활성화하기 전에 DHCP Layer 3 PUP 규칙을 제거하고 DHCP Layer 2 PUP 규칙을 설치합니다. 자세한 내용은 DHCP Layer 2 LIGHTNING 구성 섹션을 참조하십시오.
DHCP Layer 2의 구성
DHCP 스누핑이 작동하려면 다음 구성을 수행하십시오.- DHCP Layer 3 CPU 규칙을 제거합니다. 기본 규칙입니다.
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
-
DHCP 스누핑을 위한 DHCP Layer 2의 BUTTERFLY 규칙을 설치합니다.
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 스누핑 구성
DHCP 스누핑을 구성하려면 다음 절차를 따르십시오.- 전 세계적으로 DHCP 스누핑을 활성화합니다.
sonic(config)# ip dhcp snooping admin@DELLSONiC:~$ sonic-cli DELLSONiC#configure terminal DELLSONiC(config)# ip dhcp snooping
- 신뢰할 수 있는 DHCP 서버에 연결된 인터페이스를 구성합니다.
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
- VLAN 또는 VLAN 목록에서 DHCP 스누핑을 활성화합니다.
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
참고: 위의 내용은 INFO 메시지입니다.
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
- (선택 사항) DHCP 소스 MAC 주소 확인 비활성화
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#
- (선택 사항) DHCP 스누핑 바인딩 테이블에 정적 항목을 생성합니다.
sonic(config)# ip source binding source-ip-address source-mac-address vlan vlan-id interface interface-name
참고: IP 소스 바인딩 명령의 형식을 사용하지 않고 정적 항목을 제거합니다.
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#
IPv4용 DHCP 스누핑 바인딩 테이블에서 항목 지우기
다음 명령을 사용하여 모든 항목 또는 특정 동적 항목을 지웁니다.- 모든 동적 IP DHCP 스누핑 바인딩 항목 지우기:
sonic(config)# clear ip dhcp snooping binding
- 특정 동적 IP DHCP 스누핑 바인딩 항목 지우기:
sonic(config)# clear ip dhcp snooping binding source-ip-address source-mac-address vlan vlan-id interface interface-name
- DHCP 스누핑 통계 지우기:
sonic# clear ip dhcp snooping statistics
IPv4에 대한 DHCP 스누핑 정보를 봅니다.
- DHCP 스누핑에 대한 일반 정보 보기:
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
- DHCP 스누핑 바인딩 데이터베이스 보기:
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
- DHCP 스누핑 통계 보기:
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
IPv6에 대한 DHCP 스누핑을 구성합니다.
DHCP 스누핑을 구성하려면 다음 절차를 따르십시오.
- 전 세계적으로 DHCP 스누핑을 활성화합니다.
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#
- 신뢰할 수 있는 DHCP 서버에 연결된 인터페이스를 구성합니다.
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
- VLAN 또는 VLAN 목록에서 DHCP 스누핑을 활성화합니다.
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
참고: 위의 내용은 INFO 메시지입니다.
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
- (선택 사항) DHCP 소스 MAC 주소 확인 비활성화
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#
- (선택 사항) DHCP 스누핑 바인딩 테이블에 정적 항목을 생성합니다.
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#
참고: IP 소스 바인딩 명령의 형식을 사용하지 않고 정적 항목을 제거합니다.
IPv6용 DHCP 스누핑 바인딩 테이블에서 항목을 지웁니까?
다음 명령을 사용하여 모든 항목 또는 특정 동적 항목을 지웁니다.
- 모든 동적 IP DHCP 스누핑 바인딩 항목 지우기:
sonic(config)# clear ipv6 dhcp snooping binding
- 특정 동적 IP DHCP 스누핑 바인딩 항목 지우기:
sonic(config)# clear ipv6 dhcp snooping binding source-ip-address source-mac-address vlan vlan-id interface interface-name
- DHCP 스누핑 통계 지우기:
sonic# clear ipv6 dhcp snooping statistics
IPv6에 대한 DHCP 스누핑 정보를 봅니다.
- DHCP 스누핑에 대한 일반 정보 보기:
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#
- DHCP 스누핑 바인딩 데이터베이스 보기:
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#
- DHCP 스누핑 통계 보기:
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
Affected Products
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-ONArticle Properties
Article Number: 000218723
Article Type: How To
Last Modified: 31 Oct 2023
Version: 2
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.