บทความนี้มีจุดประสงค์เพื่อทำให้การตั้งค่าบริการ DHCP สำหรับ VXLAN BGP EVPN และ DFA fabric โดยใช้ Microsoft ง่ายขึ้น Windows Server 2016 / 2019

ในเอกสารอย่างเป็นทางการระบุว่า บริการ DHCP นั้นใช้แพลตฟอร์มของ Microsoft Windows Server ในปี 2012 โรงงานถูกกำหนดค่าเป็น SuperScope ซึ่งประกอบด้วยพูล Loopback (ในพูลนี้ จุดเด่นคือการยกเว้นที่อยู่ IP ทั้งหมดออกจากพูล (ที่อยู่ IP ที่ถูกยกเว้น = พูล)) และพูลสำหรับออกที่อยู่ IP สำหรับเครือข่ายจริง (จุดเด่นในที่นี้คือการกำหนดค่านโยบาย ซึ่งจะกรอง DHCP Relay Circuit ID และ DHCP Relay Circuit ID นี้มี VNI สำหรับเครือข่าย กล่าวคือ สำหรับพูลอื่น DHCP Relay Circuit ID นี้จะแตกต่างกันเล็กน้อย)
To configure DHCP on Windows server.
1. Create a super scope. Within the super scope, create scope B, S1, S2, S3, …, Sn for the subnet B and the subnets for each segment.
2. In scope B, specify the 'Exclusion Range' to be the entire address range (so that the offered address range must not be from this scope).
3. For every segment scope Si, specify a policy that matches on Agent Circuit ID with value of '0108000600XXXXXX', where '0108000600' is a fixed value for all segments, the 6 numbers "XXXXXX" is the segment ID value in hexadecimal. Also ensure to check the Append wildcard(*) check box.
4. Set the policy address range to the entire range of the scope.บทความนี้มีคำตอบสำหรับคำถามต่อไปนี้:
Содержание
- ( & )
การแนะนำ
ส่วนนี้จะแสดงรายการข้อมูลต้นฉบับโดยย่อ ได้แก่ คำแนะนำสำหรับการกำหนดค่าอุปกรณ์เครือข่าย, RFC ที่ใช้ในแพ็กเก็ต DHCP ในโรงงาน eVPN และคู่มืออ้างอิงเกี่ยวกับวิวัฒนาการของการตั้งค่าเซิร์ฟเวอร์ DHCP บน Microsoft Windows Server เอกสารของ Cisco ปี 2012 ระบุข้อมูลโดยย่อเกี่ยวกับ Superscope และ Policy ในบริการ DHCP บนเซิร์ฟเวอร์ของ Microsoft Windows Server.
วิธีกำหนดค่า DHCP Relay บน VXLAN BGP EVPN, DFA Fabric
การกำหนดค่ารีเลย์ DHCP บนแฟบริค VXLAN BGP EVPN ไม่ใช่หัวข้อหลักของบทความนี้ เนื่องจากค่อนข้างง่าย ฉันให้ลิงก์ไปยังเอกสารประกอบและสปอยเลอร์เกี่ยวกับการตั้งค่าบนอุปกรณ์เครือข่าย
ตัวอย่างการตั้งค่ารีเลย์ DHCP บน Nexus 9000V v9.2(3)
service dhcp
ip dhcp relay
ip dhcp relay information option
ip dhcp relay information option vpn
interface loopback10
vrf member VRF1
ip address 10.120.0.1/32 tag 1234567
interface Vlan12
no shutdown
vrf member VRF1
no ip redirects
ip address 10.120.251.1/24 tag 1234567
no ipv6 redirects
fabric forwarding mode anycast-gateway
ip dhcp relay address 10.0.0.5
ip dhcp relay source-interface loopback10
RFC ที่ถูกนำไปใช้ในการทำงานของบริการ DHCP Relay ในแฟบริค VXLAN BGP EVPN
RFC#6607: ตัวเลือกย่อย 151(0x97) - การเลือกเครือข่ายย่อยเสมือน
• Sub-option 151(0x97) - Virtual Subnet Selection (Defined in RFC#6607)
Used to convey VRF related information to the DHCP server in an MPLS-VPN and VXLAN EVPN multi-tenant environment.“ชื่อ” ของ VRF ที่ลูกค้าอยู่จะถูกส่งไป
RFC#5107: ตัวเลือกย่อย 11(0xb) - การแทนที่รหัสเซิร์ฟเวอร์
• Sub-option 11(0xb) - Server ID Override (Defined in RFC#5107.)
The server identifier (server ID) override sub-option allows the DHCP relay agent to specify a new value for the server ID option, which is inserted by the DHCP server in the reply packet. This sub-option allows the DHCP relay agent to act as the actual DHCP server such that the renew requests will come to the relay agent rather than the DHCP server directly. The server ID override sub-option contains the incoming interface IP address, which is the IP address on the relay agent that is accessible from the client. Using this information, the DHCP client sends all renew and release request packets to the relay agent. The relay agent adds all of the appropriate sub-options and then forwards the renew and release request packets to the original DHCP server. For this function, Cisco’s proprietary implementation is sub-option 152(0x98). You can use the ip dhcp relay sub-option type cisco command to manage the function.ตัวเลือกนี้ใช้เพื่อให้แน่ใจว่าลูกค้าส่งคำขอเพื่อต่ออายุการเช่าที่อยู่ไปยังที่อยู่ IP ที่ใช้ในตัวเลือกนี้ (บน Cisco VXLAN BGP นั้น EVPN คือที่อยู่ Anycast เกตเวย์เริ่มต้นของไคลเอ็นต์)
RFC#3527: ตัวเลือกย่อย 5(0x5) - การเลือกลิงก์
Sub-option 5(0x5) - Link Selection (Defined in RFC#3527.)
The link selection sub-option provides a mechanism to separate the subnet/link on which the DHCP client resides from the gateway address (giaddr), which can be used to communicate with the relay agent by the DHCP server. The relay agent will set the sub-option to the correct subscriber subnet and the DHCP server will use that value to assign an IP address rather than the giaddr value. The relay agent will set the giaddr to its own IP address so that DHCP messages are able to be forwarded over the network. For this function, Cisco’s proprietary implementation is sub-option 150(0x96). You can use the ip dhcp relay sub-option type ciscocommand to manage the function.ที่อยู่ของเครือข่ายที่ไคลเอ็นต์ต้องการที่อยู่ IP
วิวัฒนาการของเอกสารจาก Cisco เกี่ยวกับการกำหนดค่า DHCP บน Microsoft Windows Server 2012
ฉันรวมส่วนนี้ไว้เนื่องจากผู้ขายมีแนวโน้มเชิงบวก:
เอกสารประกอบจะแสดงวิธีกำหนดค่ารีเลย์ DHCP บนอุปกรณ์เครือข่ายเท่านั้น
วิธีการตั้งค่า DHCP บน Windows Server ในปี 2012 ใช้คำนำหน้าบทความที่แตกต่างออกไป:
บทความนี้ระบุว่าแต่ละเครือข่าย/VNI ต้องการชุด SuperScope ของตัวเองและชุดที่อยู่ Loopback ของตัวเอง:
If multiple DHCP Scopes are required for multiple subnets, you need to create one LoopbackX per subnet/vlan on all LEAFS and create a superscope with a loopbackX range scope and actual client IP subnet scope per vlan.
เพิ่มการตั้งค่า Windows ในเอกสารการกำหนดค่าอุปกรณ์เครือข่ายของเซิร์ฟเวอร์ 2012 กลุ่มที่อยู่ทั้งหมดที่ใช้จำเป็นต้องมี SuperScope หนึ่งตัวต่อศูนย์ข้อมูล และ SuperScope นี้คือขอบเขตของศูนย์ข้อมูล:
Create Superscope for all scopes you want to use for Option 82-based policies.
Note
The Superscope should combine all scopes and act as the administrative boundary.
ทุกอย่างอธิบายได้กระชับมาก:
Let us assume the switch is using the address from subnet B (it can be the backbone subnet, management subnet, or any customer designated subnet for this purpose) to communicate with the Windows DHCP server. In DFA we have subnets S1, S2, S3, …, Sn for segment s1, s2, s3, …, sn.
To configure DHCP on Windows server.
1. Create a super scope. Within the super scope, create scope B, S1, S2, S3, …, Sn for the subnet B and the subnets for each segment.
2. In scope B, specify the 'Exclusion Range' to be the entire address range (so that the offered address range must not be from this scope).
3. For every segment scope Si, specify a policy that matches on Agent Circuit ID with value of '0108000600XXXXXX', where '0108000600' is a fixed value for all segments, the 6 numbers "XXXXXX" is the segment ID value in hexadecimal. Also ensure to check the Append wildcard(*) check box.
4. Set the policy address range to the entire range of the scope.
DHCP ใน Microsoft Windows Server (ขอบเขตและนโยบาย)
Superscope is an administrative feature of a DHCP server that can be used to group multiple scopes as a single administrative entity. Superscope allows a DHCP server to provide leases from more than one scope to clients on a single physical network. Scopes added to a superscope are called member scopes. SuperScope คืออะไร - เป็นฟังก์ชันที่ช่วยให้คุณสามารถรวมที่อยู่ IP หลายกลุ่มไว้ในหน่วยการดูแลระบบเดียว เพื่อโฆษณากับผู้ใช้บนเครือข่ายทางกายภาพเดียวกัน (ใน VLAN เดียวกัน) ที่อยู่ IP จากหลายกลุ่ม หากคำขอมาถึงกลุ่มที่อยู่ซึ่งเป็นส่วนหนึ่งของ SuperScope ลูกค้าก็จะได้รับที่อยู่จากขอบเขตอื่นที่รวมอยู่ใน SuperScope นี้
The DHCP Server role in Windows Server 2012 introduces a new feature that allows you to create IPv4 policies that specify custom IP address and option assignments for DHCP clients based on a set of conditions.
The policy based assignment (PBA) feature allows you to group DHCP clients by specific attributes based on fields contained in the DHCP client request packet. PBA enables targeted administration and greater control of the configuration parameters delivered to network devices with DHCP. นโยบาย – ช่วยให้คุณสามารถกำหนดที่อยู่ IP ให้กับผู้ใช้ตามประเภทผู้ใช้หรือพารามิเตอร์ต่างๆ วิศวกรของซิสโก้ใช้นโยบายเหล่านี้ใน Windows Server สำหรับการกรองข้อมูลโดยใช้ VNI (Virtual Network Identifier) ในปี 2012
ส่วนหลัก
ในส่วนนี้ประกอบด้วยผลลัพธ์ของการวิจัย เหตุใดจึงไม่ได้รับการสนับสนุน วิธีการทำงาน (ตรรกะ) มีอะไรใหม่ และสิ่งใหม่นี้จะช่วยเราได้อย่างไร
ทำไม Microsoft จึงไม่ให้การสนับสนุน? Windows Server 2000/2003/2008?
ไมโครซอฟท์ Windows Server เวอร์ชันปี 2008 และเวอร์ชันก่อนหน้าจะไม่ประมวลผลตัวเลือก 82 และจะส่งแพ็กเก็ตตอบกลับโดยไม่มีตัวเลือก 82
- คำขอจากไคลเอนต์ถูกส่งไปยัง Broadcast (DHCP Discover)
- อุปกรณ์ (Nexus) จะส่งแพ็กเก็ตไปยังเซิร์ฟเวอร์ DHCP (DHCP Discover + Option 82)
- เซิร์ฟเวอร์ DHCP รับแพ็กเก็ต ประมวลผล ส่งกลับ แต่ไม่มีตัวเลือก 82 (ข้อเสนอ DHCP – ไม่มีตัวเลือก 82)
- อุปกรณ์ (Nexus) รับแพ็กเก็ตจากเซิร์ฟเวอร์ DHCP (ข้อเสนอ DHCP) แต่ไม่ได้ส่งแพ็กเก็ตนี้ไปยังผู้ใช้ปลายทาง
ข้อมูลการดักจับสัญญาณ - บน Windows Server ปี 2008 และบนไคลเอ็นต์ DHCPWindows Server ในปี 2008 มีการรับคำขอจากอุปกรณ์เครือข่าย (ตัวเลือกที่ 82 อยู่ในรายการ)

Windows Server 2008 ส่งการตอบกลับไปยังอุปกรณ์เครือข่าย (ตัวเลือก 82 ไม่อยู่ในรายการตัวเลือกในแพ็กเก็ต)

คำขอจากไคลเอ็นต์ - มี DHCP Discover และไม่มีข้อเสนอ DHCP

สถิติเกี่ยวกับอุปกรณ์เครือข่าย:
NEXUS-9000V-SW-1# show ip dhcp relay statistics
----------------------------------------------------------------------
Message Type Rx Tx Drops
----------------------------------------------------------------------
Discover 8 8 0
Offer 8 8 0
Request(*) 0 0 0
Ack 0 0 0
Release(*) 0 0 0
Decline 0 0 0
Inform(*) 0 0 0
Nack 0 0 0
----------------------------------------------------------------------
Total 16 16 0
----------------------------------------------------------------------
DHCP L3 FWD:
Total Packets Received : 0
Total Packets Forwarded : 0
Total Packets Dropped : 0
Non DHCP:
Total Packets Received : 0
Total Packets Forwarded : 0
Total Packets Dropped : 0
DROP:
DHCP Relay not enabled : 0
Invalid DHCP message type : 0
Interface error : 0
Tx failure towards server : 0
Tx failure towards client : 0
Unknown output interface : 0
Unknown vrf or interface for server : 0
Max hops exceeded : 0
Option 82 validation failed : 0
Packet Malformed : 0
Relay Trusted port not configured : 0
DHCP Request dropped on MCT : 0
* - These counters will show correct value when switch
receives DHCP request packet with destination ip as broadcast
address. If request is unicast it will be HW switched
NEXUS-9000V-SW-1#
ทำไมต้อง Microsoft? Windows Server การตั้งค่าในปี 2012 ยากขนาดนั้นเลยเหรอ?
ที่ไมโครซอฟท์ Windows Server 2012 ยังไม่ได้รับการสนับสนุนโดย RFC#3527 (ตัวเลือก 82 ตัวเลือกย่อย 5(0x5) — การเลือกการเชื่อมโยง)
แต่ฟังก์ชันนโยบายได้ถูกนำมาใช้แล้ว
วิธีการทำงาน:
- ไมโครซอฟท์ Windows Server ในปี 2012 มีซูเปอร์พูล (SuperScope) ซึ่งประกอบด้วยที่อยู่ Loopback และพูลสำหรับเครือข่ายจริง
- การเลือกพูลสำหรับการออกที่อยู่ IP ตกอยู่ใน SuperScope เนื่องจากการตอบกลับมาจาก DHCP Relay พร้อมด้วยที่อยู่ Loopback Source ที่รวมอยู่ใน SuperScope
- เมื่อใช้นโยบาย คำขอจะเลือกจาก Superscope ว่าขอบเขตสมาชิกที่มี VNI อยู่ใน Option 82 Suboption 1 Agent Circuit ID (“0108000600”+ 24 บิต VNI + 24 บิตซึ่งฉันไม่รู้จักค่า แต่ผู้ดมกลิ่นแสดงค่า 0 ในฟิลด์นี้)
วิธีที่ Microsoft ทำให้การตั้งค่าง่ายขึ้น Windows Server 2016 / 2019?
ที่ไมโครซอฟท์ Windows Server มีการนำฟังก์ชันการทำงานของ RFC#3527 ปี 2016 มาใช้งานแล้ว นั่นคือ Windows Server เวอร์ชัน 2016 สามารถระบุเครือข่ายที่ถูกต้องได้จากแอตทริบิวต์ Option 82 Sub-option 5(0x5) — Link Selection
คำถามสามข้อเกิดขึ้นทันที:
- เราสามารถทำได้โดยไม่มี Superscope ไหม?
- เราสามารถทำได้โดยไม่มีนโยบายและแปลง VNI เป็นรูปแบบเลขฐานสิบหกหรือไม่
- เราสามารถทำได้โดยไม่มีขอบเขตสำหรับที่อยู่ต้นทาง DHCP ของ Loopback หรือไม่
Q. เราสามารถทำได้โดยไม่มี Superscope ไหม?
A. ใช่ สามารถสร้างขอบเขตได้ทันทีในพื้นที่ที่อยู่ IPv4
Q. เราสามารถทำได้โดยไม่มีนโยบายและแปลง VNI เป็นรูปแบบเลขฐานสิบหกหรือไม่
A. ใช่ การเลือกเครือข่ายจะขึ้นอยู่กับตัวเลือก 82 Suboption 0x5
Q. เราสามารถทำได้โดยไม่มีขอบเขตสำหรับที่อยู่ต้นทาง DHCP ของ Loopback หรือไม่
A. ไม่ เราทำไม่ได้ เพราะที่ Microsoft Windows Server นับตั้งแต่ปี 2016/2019 เป็นต้นมา ระบบป้องกันคำขอ DHCP ที่เป็นอันตรายได้เริ่มใช้งานแล้ว ซึ่งหมายความว่าคำขอทั้งหมดจากที่อยู่ที่ไม่ปรากฏอยู่ในกลุ่มของเซิร์ฟเวอร์ DHCP จะถูกพิจารณาว่าเป็นอันตราย
Note
All relay agent IP addresses (GIADDR) must be part of an active DHCP scope IP address range. Any GIADDR outside of the DHCP scope IP address ranges is considered a rogue relay and Windows DHCP Server will not acknowledge DHCP client requests from those relay agents.
A special scope can be created to "authorize" relay agents. Create a scope with the GIADDR (or multiple if the GIADDR's are sequential IP addresses), exclude the GIADDR address(es) from distribution, and then activate the scope. This will authorize the relay agents while preventing the GIADDR addresses from being assigned.สิ่งเหล่านั้นที่จะกำหนดค่าบน Microsoft Windows Server พูล DHCP สำหรับ VXLAN BGP EVPN เวอร์ชัน 2016/2019 ต้องการเพียง:
- สร้างพูลสำหรับที่อยู่รีเลย์ต้นทาง
- สร้างพูลสำหรับเครือข่ายไคลเอนต์
สิ่งที่ไม่จำเป็น (แต่สามารถกำหนดค่าได้และจะทำงานได้และไม่รบกวนการทำงาน):
- สร้างนโยบาย
- สร้างซูเปอร์สโคป
ตัวอย่างตัวอย่างการตั้งค่าเซิร์ฟเวอร์ DHCP (มีไคลเอนต์ DHCP จริง 2 ตัว - ไคลเอนต์เชื่อมต่อกับแฟบริค VXLAN)

ตัวอย่างการตั้งค่ากลุ่มผู้ใช้:

ตัวอย่างการตั้งค่ากลุ่มผู้ใช้ (เลือกนโยบาย - เพื่อพิสูจน์ว่าไม่ได้ใช้นโยบายสำหรับการดำเนินการที่ถูกต้องของพูล):

ตัวอย่างการกำหนดค่าพูลสำหรับที่อยู่ DHCP Relay ต้นทาง (ช่วงของที่อยู่สำหรับการออกสอดคล้องกับการแยกออกจากกลุ่มที่อยู่):

การตั้งค่าบริการ DHCP บน Microsoft Windows Server 2019
การกำหนดค่าพูลสำหรับที่อยู่ Loopback (แหล่งที่มา) สำหรับ DHCP Relay
เราสร้างพูลใหม่ (ขอบเขต) ในพื้นที่ IPv4

วิซาร์ดการสร้างพูล "ถัดไป >"

กำหนดค่าชื่อพูลและคำอธิบายของพูล

ตั้งค่าช่วงที่อยู่ IP สำหรับ Loopback และมาสก์สำหรับพูล

การเพิ่มข้อยกเว้น ช่วงการแยกต้องตรงกับช่วงพูลทุกประการ

เวลาเช่า. "ถัดไป >"

คำถาม: คุณจะกำหนดค่าตัวเลือก DHCP ตอนนี้ (DNS, WINS, เกตเวย์, โดเมน) หรือจะดำเนินการในภายหลัง มันจะเร็วกว่าถ้าตอบไม่ แล้วเปิดใช้งานพูลด้วยตนเอง หรือไปที่จุดสิ้นสุดโดยไม่ต้องกรอกข้อมูลใดๆ และเปิดใช้งานพูลที่ส่วนท้ายของวิซาร์ด

เรายืนยันว่าไม่ได้กำหนดค่าตัวเลือกและไม่ได้เปิดใช้งานพูล "เสร็จ"

เราเปิดใช้งานพูลด้วยตนเอง — เลือกขอบเขตและในเมนูบริบท — เลือก “เปิดใช้งาน”

เราสร้างพูลสำหรับผู้ใช้/เซิร์ฟเวอร์
เราสร้างสระน้ำใหม่

วิซาร์ดการสร้างพูล "ถัดไป >"

กำหนดค่าชื่อพูลและคำอธิบายของพูล

ตั้งค่าช่วงที่อยู่ IP สำหรับ Loopback และมาสก์สำหรับพูล

การเพิ่มข้อยกเว้น (ไม่มีข้อยกเว้นตามค่าเริ่มต้น) "ถัดไป >"

เวลาเช่า. "ถัดไป >"

คำถาม: คุณจะกำหนดค่าตัวเลือก DHCP ตอนนี้ (DNS, WINS, เกตเวย์, โดเมน) หรือจะดำเนินการในภายหลัง มาตั้งค่ากันตอนนี้เลย

กำหนดค่าที่อยู่เกตเวย์เริ่มต้น

เรากำหนดค่าโดเมนและที่อยู่เซิร์ฟเวอร์ DNS

การกำหนดค่าที่อยู่ IP ของเซิร์ฟเวอร์ WINS

การเปิดใช้งานขอบเขต

พูลได้รับการกำหนดค่าแล้ว "เสร็จ"

ข้อสรุป
ใช้ Windows Server เวอร์ชัน 2016/2019 ช่วยลดความซับซ้อนในการกำหนดค่าเซิร์ฟเวอร์ DHCP สำหรับเครือข่าย VXLAN (หรือเครือข่ายอื่นๆ) (ไม่จำเป็นต้องแชร์รหัสวงจรเครือข่าย/เอเจนต์พิเศษกับผู้เชี่ยวชาญด้านไอทีเพื่อกำหนดค่าตัวกรองอีกต่อไป)
การตั้งค่านี้จะใช้งานได้หรือไม่ Windows Server เวอร์ชัน 2012 บนเซิร์ฟเวอร์ใหม่ปี 2016/2019 – ใช่ มันจะใช้งานได้
เอกสารนี้มีการอ้างอิงถึง 2 เวอร์ชัน: 7.X และ 9.3 เนื่องจากเวอร์ชัน 7.0(3)I7(7) เป็นเวอร์ชันที่ Cisco แนะนำ และเวอร์ชัน 9.3 เป็นเวอร์ชันที่ล้ำสมัยที่สุด (แม้จะรองรับ Multicast ผ่าน VXLAN Multisite ก็ตาม)
รายการแหล่งที่มา
ที่มา: will.com
