Skip to Main Content
Liongard Library

Welcome to Liongard Library, where Lions share! This is a community-led space where Liongard users can come to teach and learn from one another.
Share custom Metrics, get inspired and see what’s trending in the Pride.

Pride Etiquette:
➕ Have great custom Metrics? Add them as entries!
🌟 Want to use a Metric? Copy the query and
follow this doc.
👍 Tried a Metric from the Library? Like it!
📣 Have a question or feedback on a Metric? Add a comment!
🔎 Not sure where to start? Learn about Metrics and how to write them.
💬 Need help writing a metric or want to help support others? Join the conversation in our Liongard Lounge #metrics slack channel.


🥴 See something off? Open a support chat to let us know.

Categories Windows Server
Created by Lamont Largie
Created on Dec 10, 2024

Windows Server: Check if Network Card is DHCP or Static

Category: Network Configuration Metrics


Description:
This metric determines whether a Windows server’s network interface card (NIC) is configured for DHCP (Dynamic Host Configuration Protocol) or a static IP address.


Purpose:
To assist IT Organizations in quickly identifying network configurations that may impact connectivity, troubleshooting, or compliance with established best practices.


Use Cases:

  1. Network Troubleshooting: Quickly identify misconfigurations that may cause connectivity issues, such as an incorrect static IP or unexpected use of DHCP.

  2. Compliance and Best Practices Audits: Validate server configurations during routine maintenance to ensure compliance with organizational or client-specific standards.

  3. Change Management: Verify that static IP assignments remain consistent after server migrations or network changes.

  4. Proactive Monitoring: Identify servers inadvertently set to DHCP when they should use static IPs, avoiding potential downtime.

  5. Client Documentation and Reporting: Provide detailed reports to clients on their server configurations, highlighting potential risks or misalignments.


How it works:
The metric uses JMESPath to parse data from the Liongard Windows Server Inspector. It evaluates the server’s IPEnabled and DHCPEnabled fields and outputs the NIC’s configuration as either "DHCP Enabled" or "Static Enabled."


Beneficiaries:

  • MSPs: Gain clarity on network configurations to support client environments effectively.

  • IT Administrators: Ensure server network settings align with enterprise requirements.

  • End Clients: Benefit from improved uptime and compliance with best practices.


Notes for Customization:

  1. Additional Enhancements:

    • Expand Output Details: Include related data such as DNSHostName, IPAddressStr, IPSubnetStr, or MACAddress to provide a fuller picture of the network configuration.

    • Highlight Inconsistencies: Flag specific conditions, such as DHCP being enabled on a server in a static IP-restricted subnet.

  2. Why Modify:

    • Deeper Insights for MSPs: Expanded details allow technicians to address broader configuration issues or validate against complex network requirements.

    • Faster Resolution Times: By incorporating more data, you can reduce the need for follow-up investigations, saving time during troubleshooting or audits.

    • Client-Specific Policies: Tailoring the metric to client-specific requirements (e.g., all servers in a DMZ must have static IPs) can enhance the value your organization delivers.

Query

Network.Configuration[?IPEnabled==`true`].[['Name:'Description], [replace(to_string('DHCPEnabled'), 'true', 'DHCP Enabled') | replace(to_string('DHCP is Enabled'), 'false', 'Static is Enabled')],['--']][]

  • Attach files