본 제품에 대한 문서 세트는 편견 없는 언어를 사용하기 위해 노력합니다. 본 설명서 세트의 목적상, 편견 없는 언어는 나이, 장애, 성별, 인종 정체성, 민족 정체성, 성적 지향성, 사회 경제적 지위 및 교차성에 기초한 차별을 의미하지 않는 언어로 정의됩니다. 제품 소프트웨어의 사용자 인터페이스에서 하드코딩된 언어, RFP 설명서에 기초한 언어 또는 참조된 서드파티 제품에서 사용하는 언어로 인해 설명서에 예외가 있을 수 있습니다. 시스코에서 어떤 방식으로 포용적인 언어를 사용하고 있는지 자세히 알아보세요.
Cisco는 전 세계 사용자에게 다양한 언어로 지원 콘텐츠를 제공하기 위해 기계 번역 기술과 수작업 번역을 병행하여 이 문서를 번역했습니다. 아무리 품질이 높은 기계 번역이라도 전문 번역가의 번역 결과물만큼 정확하지는 않습니다. Cisco Systems, Inc.는 이 같은 번역에 대해 어떠한 책임도 지지 않으며 항상 원본 영문 문서(링크 제공됨)를 참조할 것을 권장합니다.
이 문서에서는 패킷 캡처 및 디버그의 도움말과 함께 Cisco ASA(Adaptive Security Appliance)의 DHCP 릴레이를 설명하고 컨피그레이션 예를 제공합니다.
DHCP 릴레이 에이전트를 사용하면 보안 어플라이언스가 클라이언트에서 라우터 또는 다른 인터페이스에 연결된 다른 DHCP 서버로 DHCP 요청을 전달할 수 있습니다.
이러한 제한은 DHCP 릴레이 에이전트 사용에만 적용됩니다.
투명 방화벽 모드에서는 DHCP 릴레이 서비스를 사용할 수 없습니다.투명 방화벽 모드의 보안 어플라이언스는 ARP(Address Resolution Protocol) 트래픽만 통과하도록 허용합니다.다른 모든 트래픽에는 ACL(Access Control List)이 필요합니다. 투명 모드에서 보안 어플라이언스를 통해 DHCP 요청 및 회신을 허용하려면 두 ACL을 구성해야 합니다.
Cisco에서는 ASA CLI 및 Cisco IOS® CLI에 대한 기본적인 이해가 필요합니다.
이 문서의 정보는 다음 소프트웨어 및 하드웨어 버전을 기반으로 합니다.
이 문서의 정보는 특정 랩 환경의 디바이스를 토대로 작성되었습니다.이 문서에 사용된 모든 디바이스는 초기화된(기본) 컨피그레이션으로 시작되었습니다.현재 네트워크가 작동 중인 경우, 모든 명령어의 잠재적인 영향을 미리 숙지하시기 바랍니다.
DHCP 프로토콜은 IP 주소(서브넷 마스크 포함), 기본 게이트웨이, DNS 서버 주소, WINS(Windows Internet Name Service) 주소 등 자동 컨피그레이션 매개변수를 호스트에 제공합니다.처음에는 DHCP 클라이언트에 이러한 구성 매개변수가 없습니다.이 정보를 얻기 위해 브로드캐스트 요청을 보냅니다.DHCP 서버가 이 요청을 확인하면 DHCP 서버는 필요한 정보를 제공합니다.이러한 브로드캐스트 요청의 특성상 DHCP 클라이언트와 서버는 동일한 서브넷에 있어야 합니다.라우터 및 방화벽과 같은 레이어 3 디바이스는 일반적으로 기본적으로 이러한 브로드캐스트 요청을 전달하지 않습니다.
동일한 서브넷에서 DHCP 클라이언트 및 DHCP 서버를 찾는 것이 항상 편리하지는 않을 수 있습니다.이러한 경우 DHCP 릴레이를 사용할 수 있습니다.보안 어플라이언스의 DHCP 릴레이 에이전트는 내부 인터페이스의 호스트로부터 DHCP 요청을 받으면 외부 인터페이스의 지정된 DHCP 서버 중 하나에 요청을 전달합니다.DHCP 서버가 클라이언트에 응답하면 보안 어플라이언스는 해당 응답을 다시 전달합니다.따라서 DHCP 릴레이 에이전트는 DHCP 서버와의 대화에서 DHCP 클라이언트의 프록시 역할을 합니다.
이 이미지는 DHCP 릴레이 에이전트를 사용하지 않을 때의 DHCP 패킷 흐름을 보여줍니다.
ASA는 이러한 패킷을 인터셉트하여 DHCP 릴레이 형식으로 래핑합니다.
ASA에서 다양한 필드를 수정하는 방법이므로 RED에서 강조 표시된 내용을 메모합니다.
참고:VPN 클라이언트가 IP 주소를 요청하면 릴레이 에이전트 IP 주소는 dhcp-network-scope에 의해 정의된 첫 번째 사용 가능한 IP 주소입니다.명령을 입력합니다.
참고:Cisco 버그 ID CSCuo89924에 통합된 수정으로 인해 버전 9.1(5.7), 9.3(1) 이상에서 유니캐스트 패킷은 dhcprelay가 활성화된 클라이언트(giaddr)를 향하는 인터페이스 IP 주소에서 DHCP 서버의 IP 소싱으로 전달됩니다.이 경우 내부 인터페이스 IP 주소가 됩니다.
DHCP 서버 인터페이스 198.51.100.2에 전달된 DHCP 요청입니다.
DHCPRA: relay binding created for client 0050.5684.396a.DHCPD:[an error occurred while processing this directive]
setting giaddr to 192.0.2.1.
dhcpd_forward_request: request from 0050.5684.396a forwarded to 198.51.100.2.
DHCPD/RA: Punt 198.51.100.2/17152 --> 192.0.2.1/17152 to CP
DHCPRA: Received a BOOTREPLY from interface 2
DHCPRA: relay binding found for client 0050.5684.396a.
DHCPRA: Adding rule to allow client to respond using offered address 192.0.2.4
DHCP 서버로부터 회신을 수신한 후 보안 어플라이언스는 MAC 주소 0050.5684.396a가 있는 DHCP 클라이언트로 회신을 전달하고 게이트웨이 주소를 자체 내부 인터페이스로 변경합니다.
DHCPRA: forwarding reply to client 0050.5684.396a.[an error occurred while processing this directive]
DHCPRA: relay binding found for client 0050.5684.396a.
DHCPD: setting giaddr to 192.0.2.1.
dhcpd_forward_request: request from 0050.5684.396a forwarded to 198.51.100.2.
DHCPD/RA: Punt 198.51.100.2/17152 --> 192.0.2.1/17152 to CP
DHCPRA: Received a BOOTREPLY from interface 2
DHCPRA: relay binding found for client 0050.5684.396a.
DHCPRA: exchange complete - relay binding deleted for client 0050.5684.396a.
DHCPD: returned relay binding 192.0.2.1/0050.5684.396a to address pool.
dhcpd_destroy_binding() removing NP rule for client 192.0.2.1
DHCPRA: forwarding reply to client 0050.5684.396a.
동일한 트랜잭션이 syslog에도 표시됩니다.
%ASA-7-609001: Built local-host inside:0.0.0.0[an error occurred while processing this directive]
%ASA-7-609001: Built local-host identity:255.255.255.255
%ASA-6-302015: Built inbound UDP connection 13 for inside:
0.0.0.0/68 (0.0.0.0/68) to identity:255.255.255.255/67 (255.255.255.255/67)
%ASA-7-609001: Built local-host identity:198.51.100.1
%ASA-7-609001: Built local-host outside:198.51.100.2
%ASA-6-302015: Built outbound UDP connection 14 for outside:
198.51.100.2/67 (198.51.100.2/67) to identity:198.51.100.1/67 (198.51.100.1/67)
%ASA-7-609001: Built local-host inside:192.0.2.4
%ASA-6-302020: Built outbound ICMP connection for
faddr 192.0.2.4/0 gaddr 198.51.100.2/1 laddr 198.51.100.2/1
%ASA-7-609001: Built local-host identity:192.0.2.1
%ASA-6-302015: Built inbound UDP connection 16 for outside:
198.51.100.2/67 (198.51.100.2/67) to identity:192.0.2.1/67 (192.0.2.1/67)
%ASA-6-302015: Built outbound UDP connection 17 for inside:
192.0.2.4/68 (192.0.2.4/68) to identity:192.0.2.1/67 (192.0.2.1/67)
%ASA-6-302021: Teardown ICMP connection for
faddr 192.0.2.4/0 gaddr 198.51.100.2/1 laddr 198.51.100.2/1
이 섹션에서는 이 문서에 설명된 기능을 구성하는 데 사용되는 정보를 제공합니다.
참고:이 섹션에 사용된 명령에 대한 자세한 내용을 보려면 Command Lookup Tool(등록된 고객만 해당)을 사용합니다.
이 문서에서는 다음 네트워크 설정을 사용합니다.
이 문서에서는 다음 구성을 사용합니다.
dhcprelay server 198.51.100.2 outside[an error occurred while processing this directive]
dhcprelay enable inside
dhcprelay setroute inside
dhcprelay timeout 60
show run[an error occurred while processing this directive]
: Saved
:
ASA Version 9.1(5)
!
hostname ASA
enable password 8Ry2YjIyt7RRXU24 encrypted
passwd 2KFQnbNIdI.2KYOU encrypted
names
!
interface Ethernet0/0
nameif inside
security-level 0
ip address 192.0.2.1 255.255.255.0
!
interface Ethernet0/1
nameif outside
security-level 100
ip address 198.51.100.1 255.255.255.0
!
interface Ethernet0/2
no nameif
no security-level
no ip address
!
interface Ethernet0/3
no nameif
no security-level
no ip address
!
interface Management0/0
shutdown
no nameif
no security-level
no ip address
!
boot system disk0:/asa825-k8.bin
ftp mode passive
no pager
logging enable
logging buffer-size 40960
logging buffered debugging
mtu inside 1500
mtu outside 1500
no failover
icmp unreachable rate-limit 1 burst-size 1
no asdm history enable
arp timeout 14400
timeout xlate 0:30:00
timeout pat-xlate 0:00:30
timeout conn 3:00:00 half-closed 0:30:00 udp 0:15:00 icmp 0:00:02
timeout sunrpc 0:10:00 h323 0:05:00 h225 0:30:00 mgcp 0:05:00 mgcp-pat 0:05:00
timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
timeout tcp-proxy-reassembly 0:01:00
timeout floating-conn 0:00:00
dynamic-access-policy-record DfltAccessPolicy
http server enable
http 0.0.0.0 0.0.0.0 inside
no snmp-server location
no snmp-server contact
crypto ipsec security-association lifetime seconds 28800
crypto ipsec security-association lifetime kilobytes 4608000
telnet timeout 5
ssh timeout 5
console timeout 0
dhcprelay server 198.51.100.2 Outside
dhcprelay enable inside
dhcprelay setroute inside
//Defining DHCP server IP and interface//
//Enables DHCP relay on inside/client facing interface//
//Sets ASA inside as DG for clients in DHCP reply packets//
dhcprelay timeout 60
threat-detection basic-threat
threat-detection statistics access-list
no threat-detection statistics tcp-intercept
webvpn
!
!
prompt hostname context
no call-home reporting anonymous
call-home
profile CiscoTAC-1
no active
destination address http https://tools.cisco.com/its/service/oddce/services/DDCEService
destination address email callhome@cisco.com
destination transport-method http
subscribe-to-alert-group diagnostic
subscribe-to-alert-group environment
subscribe-to-alert-group inventory periodic monthly
subscribe-to-alert-group configuration periodic monthly
subscribe-to-alert-group telemetry periodic daily
Cryptochecksum:7ae5f655ffe399c8a88b61cb13425972
: end
show run[an error occurred while processing this directive]
Building configuration...
Current configuration : 1911 bytes
!
! Last configuration change at 18:36:05 UTC Tue May 28 2013
version 15.1
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
logging buffered 4096
!
no aaa new-model
!
crypto pki token default removal timeout 0
!
!
dot11 syslog
ip source-route
!
ip dhcp excluded-address 192.0.2.1 192.0.2.2
ip dhcp excluded-address 192.0.2.10 192.0.2.254
//IP addresses exluded from DHCP scope//
!
ip dhcp pool pool1
import all network 192.0.2.0 255.255.255.0
dns-server 192.0.2.10 192.0.2.11 domain-name cisco.com
//DHCP pool configuration and various parameters//
!
!
!
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
license udi pid CISCO1811W-AG-A/K9 sn FCTxxxx
!
!
!
interface Dot11Radio0
no ip address
shutdown
speed basic-1.0 basic-2.0 basic-5.5 6.0 9.0 basic-11.0 12.0 18.0 24.0 36.0 48.0 54.0
station-role root
!
interface Dot11Radio1
no ip address
shutdown
speed basic-6.0 9.0 basic-12.0 18.0 basic-24.0 36.0 48.0 54.0
station-role root
!
interface FastEthernet0
ip address 198.51.100.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1
no ip address
duplex auto
speed auto
!
interface FastEthernet2
no ip address
!
interface FastEthernet3
no ip address
!
interface FastEthernet4
no ip address
!
interface FastEthernet5
no ip address
!
interface FastEthernet6
no ip address
!
interface FastEthernet7
no ip address
!
interface FastEthernet8
no ip address
!
interface FastEthernet9
no ip address
!
interface Vlan1
no ip address
!
interface Async1
no ip address
encapsulation slip
!
ip forward-protocol nd
no ip http server
no ip http secure-server
!
!
ip route 192.0.2.0 255.255.255.0 198.51.100.1
//Static route to ensure replies are routed to relay agent IP//
!
!
!
control-plane
!
!
line con 0
line 1
modem InOut
stopbits 1
speed 115200
flowcontrol hardware
line aux 0
line vty 0 4
login
transport input all
!
end
최대 10개의 DHCP 서버를 정의할 수 있습니다.클라이언트가 DHCP 검색 패킷을 전송하면 모든 DHCP 서버로 전달됩니다.
예를 들면 다음과 같습니다.
dhcprelay server 198.51.100.2 outside dhcprelay server 198.51.100.3 outside dhcprelay server 198.51.100.4 outside dhcprelay enable inside dhcprelay setroute inside[an error occurred while processing this directive]
다음은 여러 DHCP 서버를 사용하는 경우의 디버깅 예입니다.
DHCP: Received a BOOTREQUEST from interface 2 (size = 300) DHCPRA: relay binding found for client 000c.291c.34b5. DHCPRA: setting giaddr to 192.0.2.1. dhcpd_forward_request: request from 000c.291c.34b5 forwarded to 198.51.100.2. dhcpd_forward_request: request from 000c.291c.34b5 forwarded to 198.51.100.3. dhcpd_forward_request: request from 000c.291c.34b5 forwarded to 198.51.100.4.[an error occurred while processing this directive]
다음은 여러 DHCP 서버를 사용하는 경우의 패킷 캡처의 예입니다.
ASA# show cap out 3 packets captured 1: 18:48:41.211628 192.0.2.1.67 > 198.51.100.2.67: udp 300[an error occurred while processing this directive]
2: 18:48:41.211689 192.0.2.1.67 > 198.51.100.3.67: udp 300
3: 18:48:41.211704 192.0.2.1.67 > 198.51.100.4.67: udp 300
이 섹션을 사용하여 컨피그레이션이 제대로 작동하는지 확인합니다.
DHCP 릴레이 서비스에 대한 통계 정보를 보려면 ASA CLI에서 show dhcprelay statistics 명령을 입력합니다.
ASA# show dhcprelay statistics[an error occurred while processing this directive]
DHCP UDP Unreachable Errors: 1
DHCP Other UDP Errors: 0
Packets Relayed
BOOTREQUEST 0
DHCPDISCOVER 1
DHCPREQUEST 1
DHCPDECLINE 0
DHCPRELEASE 0
DHCPINFORM 0
BOOTREPLY 0
DHCPOFFER 1
DHCPACK 1
DHCPNAK 0
이 출력은 DHCPDISCOVER, DHCP REQUEST, DHCP OFER, DHCP RELEASE, DHCP RELEASE, DHCP ACK와 같은 여러 DHCP 메시지 유형에 대한 정보를 제공합니다.
참고:Output Interpreter 도구(등록된 고객만 해당)는 특정 show 명령을 지원합니다.show 명령 출력의 분석을 보려면 [출력 인터프리터 도구]를 사용합니다.
이 섹션에서는 컨피그레이션 문제를 해결하는 데 사용할 수 있는 정보를 제공합니다.
Router#show ip dhcp server statistics[an error occurred while processing this directive]
Memory usage 56637
Address pools 1
Database agents 0
Automatic bindings 1
Manual bindings 0
Expired bindings 0
Malformed messages 0
Secure arp entries 0
Message Received
BOOTREQUEST 0
DHCPDISCOVER 1
DHCPREQUEST 1
DHCPDECLINE 0
DHCPRELEASE 0
DHCPINFORM 0
Message Sent
BOOTREPLY 0
DHCPOFFER 1
DHCPACK 1
DHCPNAK 0
ASA# show dhcprelay state
Context Configured as DHCP Relay
Interface inside, Configured for DHCP RELAY SERVER
Interface outside, Configured for DHCP RELAY
참고:Output Interpreter 도구(등록된 고객만 해당)는 특정 show 명령을 지원합니다.show 명령 출력의 분석을 보려면 [출력 인터프리터 도구]를 사용합니다.
다음 debug 명령을 사용할 수도 있습니다.
참고:debug 명령을 사용하기 전에 디버그 명령에 대한 중요 정보를 참조하십시오.