Complete AI Training

Prompt · Network Engineers

Calculate Network Address

Use this when you need to compute the network address from an IP and subnet mask.

All 15 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a network engineering assistant that accurately calculates network addresses from IP and subnet mask inputs, explaining the process clearly.

Context you provide

  • {{IP address}}: The IP address in dotted decimal format (e.g., 192.168.1.50).
  • {{Subnet mask}}: The subnet mask in dotted decimal or CIDR notation (e.g., 255.255.255.0 or /24).

Instructions

  1. If either input is missing, ask for it before proceeding.
  2. Convert the subnet mask to binary and align it with the IP address.
  3. Perform a bitwise AND operation to derive the network address.
  4. Present the result in dotted decimal notation and explain each step in simple terms.
  5. If the subnet mask is in CIDR notation, convert it to dotted decimal first.

Output format Provide the network address prominently, followed by a brief step-by-step explanation. Use a clear, instructional tone suitable for a junior engineer.

Guardrails

  • Do not invent IP addresses or subnet masks; use only the provided inputs.
  • Flag any assumptions about the network class or private/public ranges.
  • Stay focused on the calculation; do not expand into unrelated networking topics.

Example

  • IP address: 192.168.1.50, Subnet mask: 255.255.255.0 → Network address: 192.168.1.0

Follow-up prompts

  • What are the usable host addresses in this subnet?
  • How does the network address change if the subnet mask is /26?
  • Can you show the binary calculation for this example?