Windows DHCP最佳实践(二)

{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"这是Windows DHCP最佳实践和技巧的最终指南。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"如果您有任何最佳做法或技巧,请在下面的评论中发布它们。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在本指南(二)中,我将分享以下","attrs":{}},{"type":"text","marks":[{"type":"strong","attrs":{}}],"text":"DHCP最佳实践和技巧","attrs":{}},{"type":"text","text":"。","attrs":{}}]},{"type":"numberedlist","attrs":{"start":"1","normalizeStart":1},"content":[{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":1,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"http://bigyoung.cn","title":""},"content":[{"type":"text","text":"从DHCP作用域中排除IP","attrs":{}}]}]}],"attrs":{}},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":2,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"http://bigyoung.cn","title":""},"content":[{"type":"text","text":"了解PowerShell DHCP命令","attrs":{}}]}]}],"attrs":{}},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":3,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"http://bigyoung.cn","title":""},"content":[{"type":"text","text":"子网划分和网络分段的好处","attrs":{}}]}]}],"attrs":{}},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":4,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"http://bigyoung.cn","title":""},"content":[{"type":"text","text":"DHCP租约期限提示","attrs":{}}]}]}],"attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"从DHCP作用域中排除IP","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"-------------","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"创建DHCP作用域时,建议不要为静态IP分配排除一小部分范围。是的,我在上一个技巧中知道我说过不使用静态分配,但是基础设施设备将需要它。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"您的网络将具有一个默认路由,该默认路由将是路由器,因此您绝对希望将其排除在DHCP池之外。您可能还会遇到其他需要静态IP的设备,因此最好将这些设备的排除的IP在DHCP池中设置一个较小范围较。例如,我看到了各种需要静态IP的警报和安全设备,因此我只提供排除范围内的IP。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"这是用于工作站和笔记本电脑的数据VLAN的屏幕截图,其中排除了10.2.10.1至10.2.10.10。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/96/96ddef8aff7162b961ec596592f8f2de.jpeg","alt":null,"title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"了解PowerShell DHCP命令","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"-------------------","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"使用DHCP控制台(dhcpmgmt.ms)并没有错,但是PowerShell很棒,并且简化了许多任务。如果您的大型网络具有数百个DHCP作用域,那么使用PowerShell将节省大量时间。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"这里有一些命令可以帮助您入门。","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"安装DHCP角色","attrs":{}}]},{"type":"codeblock","attrs":{"lang":""},"content":[{"type":"text","text":"Install-WindowsFeature -IncludeManagementTools DHCP","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"备用DHCP服务器","attrs":{}}]},{"type":"codeblock","attrs":{"lang":""},"content":[{"type":"text","text":"Backup-DhcpServer -ComputerName \"dhcp1.ad.activedirectorypro.com\" -Path \"C:\\Windows\\system32\\dhcp\\backup\"","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"查看DHCP租约","attrs":{}}]},{"type":"codeblock","attrs":{"lang":""},"content":[{"type":"text","text":"Get-DhcpServerv4Scope | Get-DhcpServerv4Lease","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"从MAC地址查找DHCP租约","attrs":{}}]},{"type":"codeblock","attrs":{"lang":""},"content":[{"type":"text","text":"Get-DhcpServerv4Scope |Get-DhcpServerv4Lease |where {$_.ClientId -like “b4-b6-86-b4-**-**” }","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"添加DHCP作用域","attrs":{}}]},{"type":"codeblock","attrs":{"lang":""},"content":[{"type":"text","text":"Add-DHCPServerv4Scope -EndRange 10.2.1.254 -Name Vlan110 -StartRange 10.2.1.1 -SubnetMask 255.255.255.0 -State Active","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"获取所有活动的ipv4范围","attrs":{}}]},{"type":"codeblock","attrs":{"lang":""},"content":[{"type":"text","text":"Get-DHCPServerv4Scope","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"获取范围的所有DHCP保留","attrs":{}}]},{"type":"codeblock","attrs":{"lang":""},"content":[{"type":"text","text":"Get-DHCPServerv4Lease -ScopeId 10.2.1.0","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"创建DHCP预留","attrs":{}}]},{"type":"codeblock","attrs":{"lang":""},"content":[{"type":"text","text":"Get-DhcpServerv4Lease -ComputerName dhcpserver1 -IPAddress 10.2.1.8 | Add-DhcpServerv4Reservation -ComputerName server1","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"这只是用PowerShell管理DHCP服务器。下面的一些链接,是使用Powershell管理其他的一些服务。","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"资料来源","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https://docs.microsoft.com/en-us/powershell/module/dhcpserver/?view=win10-ps","title":""},"content":[{"type":"text","text":"https://docs.microsoft.com/zh-cn/powershell/module/dhcpserver/?view=win10-ps","attrs":{}}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https://4sysops.com/archives/configure-dhcp-with-powershell-in-windows-server-2012-r2-and-above/","title":""},"content":[{"type":"text","text":"https://4sysops.com/archives/configure-dhcp-with-powershell-in-windows-server-2012-r2-and-above/","attrs":{}}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https://activedirectorypro.com/powershell-commands/","title":""},"content":[{"type":"text","text":"Active Directory的PowerShell命令的大量列表","attrs":{}}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"子网划分和网络分段的好处","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"------------","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我不会深入探讨子网划分,因为有很多服务可以做到这一点。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"但是,在配置DHCP作用域时,它有助于对网络有一些基本的了解。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"您不想为所有设备只有一个大的DHCP池,而是应将设备分段到单独的网络中。这也取决于网络的大小,如果网络较小,则网络分段不是那么重要。","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"网络分段的好处","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"安全","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"通过将设备保持在单独的网络上,您可以更好地控制网络。您的打印机需要访问互联网吗?可能不会。财务部门的计算机是否需要直接与HR中的计算机对话,绝对不是。通过将设备分成自己的网络,您可以更好地控制它们的访问。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"限制网络中的横向移动确实可以减慢攻击者和病毒的速度。在网络级别启用防火墙或访问控制列表以限制网络中的横向移动非常重要。","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"网络性能","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"将所有内容都放在一个大型网络上将创建一个巨大的广播域。这可能会导致各种问题,例如生成树循环,广播和多播风暴。对网络进行分段将分隔广播域并减少可能的性能问题。","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"控制访客/访客访问","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"您不希望您的访客网络访问您的安全网络。将此流量分离到其自己的网络,可以过滤流量并阻止对内部网络的访问。我还将访客网络用于仅需要Internet连接的IOT类型的设备。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"以下是如何细分网络流量的示例。","attrs":{}}]},{"type":"bulletedlist","content":[{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"计算机= 10.2.10.0/24 VLAN 110","attrs":{}}]}],"attrs":{}},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"打印机= 10.2.8.0/24 VLAN 108","attrs":{}}]}],"attrs":{}},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"语音= 10.2.6.0/24 VLAN 106","attrs":{}}]}],"attrs":{}},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"视频监控= 10.2.4.0/24 VLAN 104","attrs":{}}]}],"attrs":{}},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"服务器= 10.2.2.0/24 VLAN 102","attrs":{}}]}],"attrs":{}},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"访客= 10.16.0.0/23 VLAN 116","attrs":{}}]}],"attrs":{}}],"attrs":{}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/48/48d09b2dbb2da14fc53cdc470eeaca1f.jpeg","alt":null,"title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"除了进行网络分段之外,请尝试使IP方案保持简单,这确实简化了DHCP作用域的管理。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"DHCP租约期限提示","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"----------","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"DHCP租约是DHCP服务器为客户端分配IP地址的时间段。DHCP作用域的默认DHCP租用时间为8天。","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"提示#1增加固定设备的租赁时间","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"对于小型网络,您可以将租约时间保留为默认设置8小时。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"对于大型网络,请考虑将固定设备(工作站)的DHCP作用域更改为16天。这样可以减少与DHCP相关的网络流量。工作站不经常移动,因此无需为了获得IP地址而经常跟DHCP进行交互。","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"提示#2减少访客/移动设备的租赁时间","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"如果提供来宾wifi,则这些DHCP作用域会很快耗尽可用IP。这些设备很可能只需要临时访问(例如几个小时)。对于这些范围,请考虑将DHCP租用时间调整为1小时。如果设备仍然处于活动状态,它将续订,但是如果设备断开连接,它将释放IP地址,这将有助于您的来宾有足够的可用IP。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"移动设备也可能是这种情况,尽管越来越多的用户使用笔记本电脑,但这种设备可能会很棘手。默认的8天可能就足够了,但是如果您知道移动设备经常到处移动,则可以考虑减少租赁时间。","attrs":{}}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong","attrs":{}}],"text":"总结:","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"如果您拥有仅用于特定设备(例如工作站)的DHCP作用域,请考虑调整DHCP租用时间。","attrs":{}}]}],"attrs":{}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"本系列文档目录:","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"===","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"http://www.bigyoung.cn/posts/174/","title":""},"content":[{"type":"text","text":"DHCP最佳实践(一)","attrs":{}}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"http://www.bigyoung.cn/posts/175/","title":""},"content":[{"type":"text","text":"DHCP最佳实践(二)","attrs":{}}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"http://www.bigyoung.cn/posts/176/","title":""},"content":[{"type":"text","text":"DHCP最佳实践(三)","attrs":{}}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"http://www.bigyoung.cn/posts/177/","title":""},"content":[{"type":"text","text":"DHCP最佳实践(四)","attrs":{}}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章