How to Manage Networks and IP Addresses in MAAS with Static IPs and CLI
Managing IP addresses is one of the most important tasks in IT infrastructure. Networks without a clear plan face IP conflicts, downtime, and failed deployments.
Canonical’s MAAS (Metal as a Service) automates network discovery, assigns static IP addresses, manages subnets, and supports VLANs. The MAAS CLI gives administrators full control over IP ranges, allocation, and configuration.
This guide explains how to manage networks effectively in MAAS. It covers static vs dynamic IPs, subnets, VLANs, discovery, interfaces, and best practices. By the end, you will know how to build a clean, scalable, and reliable network.
What is an IP Address and Why Does it Matter in MAAS?
An IP address is a unique identifier that every device on a network must have. Servers, routers, and virtual machines cannot communicate without one.
In MAAS, managing IP addresses is a core function because every deployment relies on stable communication. MAAS supports both dynamic IPs, assigned through DHCP, and static IPs that remain fixed. Static IPs are critical for services such as gateways, DNS servers, and storage systems. Dynamic IPs work well in testing environments and for less critical workloads.
By controlling IP allocation in MAAS, administrators reduce conflicts and improve routing. The CLI provides direct control to view subnets, assign ranges, and track connected devices.
How Do Subnets and VLANs Work in MAAS?
Subnets and VLANs are core tools in MAAS that keep networks organized, scalable, and secure.
Understanding Subnets in MAAS
A subnet divides a large network into smaller groups. This makes it easier to manage devices and prevents the exhaustion of unique IP addresses. In MAAS, you can assign addresses dynamically with DHCP leases or configure static IPs. CLI commands such as profile subnet update allow administrators to set gateways, DNS, and routing.
VLANs in MAAS for Traffic Separation
A VLAN (Virtual Local Area Network) separates network traffic even when devices share the same hardware. In MAAS, VLANs can be assigned to management, storage, or production traffic. This separation prevents cross-traffic and improves security. For example, one VLAN may carry DHCP traffic while another secures storage operations. With commands like profile vlans create or profile interfaces create-vlan, administrators can design flexible and secure VLAN structures.
How to Manage Networks Effectively with MAAS
Network management in MAAS goes beyond assigning IP addresses. Administrators must also configure DHCP servers, set gateways, and define routing rules. The management network functions as the central hub for connected devices such as routers and switches.
For high availability, MAAS supports redundant routers and scalable configurations. Planning ahead prevents downtime and reduces troubleshooting. CLI commands give administrators visibility into subnets, IP ranges, and traffic flow, making it easier to maintain stable and reliable networks.
Managing IP Addresses: Static vs Dynamic
One key decision in MAAS is whether to use static IP addresses or dynamic ones. This choice directly affects reliability, scalability, and ease of management.
Static IP addresses stay fixed. They are used for critical resources such as DNS servers, gateways, and database systems. A static IP provides stability during reboots and redeployments.
Dynamic IP addresses are assigned by a DHCP server. They are suited for non-critical devices or test environments where flexibility is more important than permanence.
In MAAS, both static and dynamic IPs can be configured. Administrators can assign static IPs during setup. They can also let DHCP handle allocation automatically. This ensures the right balance between control and efficiency.
How to Manage Network Discovery in MAAS
Discovery in MAAS scans the network for new devices. By default, it uses ARP queries and DHCP snooping to detect active machines. This process helps administrators bring unregistered servers under management quickly.
MAAS also supports tuning of discovery settings. If a scan runs slowly, administrators can adjust performance with options such as limit-threads. For troubleshooting, it is possible to force a re-scan or use ping commands to confirm live hosts. Devices can also be placed in “unmanaged” mode when they should not receive DHCP leases.
These features provide flexibility for handling different types of devices across the infrastructure.
Best Ways to Manage Subnets in Large-Scale Deployments
In large networks, subnets are the foundation for keeping devices organized and connected. Proper planning in MAAS prevents conflicts and keeps performance stable.
Plan ahead: Each subnet must have enough IP addresses for current devices and room for future growth.
Use clear IP ranges: Define separate pools for DHCP, static assignments, and reserved addresses. This ensures critical services stay stable.
Configure with CLI: Commands such as profile subnet update allow control over gateways, DHCP lease times, and DNS options.
Manage routes: Routing between subnets must be set correctly so traffic moves securely and efficiently.
Prevent shortages: Careful subnet allocation reduces IP conflicts and helps the network scale as demand grows.
With correct planning, subnets in MAAS remain reliable, organized, and ready to support growth without disruption.
How to Manage VLANs for Better Isolation
VLANs in MAAS are used for network isolation. This separation is essential for security and performance. Storage systems, for example, can be kept apart from user traffic.
Tagging interfaces allows administrators to label traffic for each VLAN. With commands like profile interfaces create-vlan and profile interface link-subnet, VLANs can be tied to subnets with precision.
For outbound connections, NAT can be applied to mask internal addresses. This setup protects private IPs while still allowing external communication.
How to Manage Interfaces in MAAS
Every device has one or more network interfaces, and each can be managed differently in MAAS. Interfaces can be set to static, DHCP, or unmanaged mode.
The profile interface update command allows administrators to change configurations. Multi-NIC servers can dedicate one interface for storage and another for user access. This separation prevents bottlenecks and improves routing control.
For monitoring, the profile interfaces read command shows detailed information about all active interfaces.
Using Common Networking Commands in the CLI
The MAAS CLI gives administrators direct control over networks. It is designed to simplify management in large environments and reduce manual errors.
Key commands include:
maas $PROFILE subnets read – lists all active subnets.
maas $PROFILE vlans read – shows VLAN configurations.
maas $PROFILE interfaces read – displays interface details.
Other commands such as profile subnet update and profile interface link-subnet allow fast configuration changes. By scripting these commands, administrators can automate repetitive tasks and maintain consistency across large deployments.
How to Tag Interfaces and Verify Your Changes
Tagging helps organize interfaces by project, department, or role. It improves troubleshooting and makes it easier to filter devices in large deployments.
After changes, always verify configurations:
Check bindings with system_id maas to confirm the interface assignments.
Review IP allocations to ensure correct static or dynamic addresses.
Test connectivity using ping to confirm live status.
Run a force re-scan to validate that updates are applied.
This process ensures accurate configurations and reduces errors when scaling infrastructure.
IP Ranges, Allocation, and Hostnames Explained
Planning IP ranges is critical to avoid shortages and conflicts. MAAS allows administrators to define static pools, DHCP pools, and reserved ranges to keep networks organized. Allocation can be automatic or manual based on requirements.
Hostnames map IP addresses to readable names. With DNS integration, routing becomes simpler and conflicts are reduced. In enterprise environments, hostnames also make it easier for administrators to identify devices and maintain clear records.
Best Practices for Networking in MAAS
To maintain stable and scalable networks in MAAS, follow these best practices:
Keep the management network separate from production workloads. This separation reduces risk and makes troubleshooting easier.
Enable DHCP, VLANs, and discovery features in MAAS to simplify network automation and monitoring.
Update subnet profiles regularly so they reflect the latest changes in infrastructure.
Use two routers for redundancy. Redundant routers improve uptime and protect against hardware failures.
Monitor for IP conflicts as the system scales to prevent communication issues.
Plan IP ranges carefully to avoid shortages and maintain room for growth.
By applying these practices, networks remain reliable, secure, and easier to manage as demands increase.
Conclusion
Managing networks in Canonical MAAS means planning IP addresses, subnets, and VLANs with care. Static IPs keep core systems stable, while dynamic IPs offer flexibility. With the MAAS CLI, administrators can configure subnets, assign ranges, and verify changes quickly. Following best practices ensures scalable, secure, and high-availability infrastructure.
Key Takeaways
Every device needs a unique IP address: MAAS handles allocation to prevent conflicts and downtime.
Subnets and VLANs improve control: Subnets split networks into manageable pools, while VLANs isolate traffic for security and performance.
Static vs Dynamic IPs: Static IPs keep core systems stable, while DHCP is the smarter choice for handling large numbers of clients.
Good planning ensures scalability: Defining IP ranges, monitoring for conflicts, and enabling redundancy keeps networks reliable as they grow.
Frequently Asked Questions
How to assign IP addresses in a network?
In MAAS, you can assign IP addresses manually as static or allow the DHCP server to allocate them dynamically. This ensures flexibility for both critical and non-critical systems.
Which IP address class is primarily used for large-scale networks?
Class A addresses or large CIDR blocks (/8, /16) are common for large deployments. They provide a wide range of IPs to support thousands of devices.
Which is the preferred method for assigning IP addresses to a large number of clients?
DHCP is preferred, as it automates assignments and reduces manual errors. It also saves time when scaling across large infrastructures.
How many IPs does /29 allocate?
A /29 subnet provides 8 IPs, with 6 usable for devices once network and broadcast addresses are excluded. This makes it ideal for small groups of servers or routers.
If I can re-assign an IP address, why would I add another device for NAT?
NAT allows many devices to share one external IP address, adds security, and simplifies external routing. It also helps conserve limited public IP addresses.
- Allen Bradley 1783-NATR NAT Router — network address translation and segmentation.
- Allen Bradley 1783-IMS28RAC Stratix Managed Switch — VLANs, QoS, and advanced diagnostics.
- Allen Bradley 1756-EN2TR Ethernet Module — dual-port EtherNet/IP for controllers.
- Allen Bradley 5069-L320ER CompactLogix Controller — integrates with industrial networks.