Example-1: The example below demonstrates VLANs configuration.
This configuration creates and manages Virtual Local Area Networks (VLANs) to segment network traffic, provide organized IP allocation, and enable DHCP services. The example includes VLAN definitions, subnet assignments, DHCP settings, reserved IP ranges, DHCP options, and DNS configuration for structured network management.
VLAN 10 – “VLAN10”: Subnet: 192.168.10.0/24 with appliance IP 192.168.10.1 as the default gateway. DHCP is enabled with lease time 1 day and mandatory DHCP to prevent static IP assignment. DHCP boot options include PXE boot support (codes 66/67) pointing to tftp.example.com and bootfile. Reserved IP range 192.168.10.40–50 is set aside for printers. DNS is set to Google DNS (8.8.8.8). Optional DHCP relay server is defined as 192.168.10.254.
VLAN 20 – “VLAN20”: Subnet: 192.168.20.0/24 with appliance IP 192.168.20.1. DHCP enabled with lease time 1 day and mandatory DHCP enforcement. DHCP boot options configured identically to VLAN 10 for PXE boot support. Reserved IP range 192.168.20.40–50 for printers. DNS also uses Google DNS (8.8.8.8). This configuration ensures centralized IP management, prevents unauthorized static IP usage, supports PXE boot for devices requiring network boot, and separates traffic into distinct VLANs for better organization, security, and network efficiency.
meraki:
domains:
- name: !envdomain
administrator:
name: !envorg_admin
organizations:
- name: !envorg
networks:
- name: !envnetwork_name
product_types:
- appliance
- switch
- wireless
- camera
- sensor
- cellularGateway
appliance:
# single_lan:
# subnet: "192.168.1.0/24"
# appliance_ip: "192.168.1.1"
# # ipv6:
# # enabled: true
# # prefix_assignments:
# # - autonomous: true
# # static_prefix: "2001:db8::/32"
# # static_appliance_ip6: "2001:db8::1"
# mandatory_dhcp: true
vlans:
# - vlan_id: 1
# name: "Default"
# subnet: "192.168.128.0/24"
# appliance_ip: "192.168.128.1"
- vlan_id: 10
name: "VLAN10"
subnet: "192.168.10.0/24"
appliance_ip: "192.168.10.1"
group_policy_name: "CORP"# Maps to group policy ID for CORP policy
dhcp_handling: "Run a DHCP server"
dhcp_lease_time: "1 day"
dhcp_boot_options: false
dhcp_options:
- code: "66"
type: "text"
value: "tftp.example.com"
- code: "67"
type: "text"
value: "bootfile"
reserved_ip_ranges:
- start: "192.168.10.40"
end: "192.168.10.50"
comment: "Reserved for printers"
dns_nameservers: "8.8.8.8"
# vpn_nat_subnet: "192.168.10.0/24"
mandatory_dhcp: true
# ipv6:
# enabled: true
# prefix_assignments:
# - autonomous: true
# static_prefix: "2001:db8::/32"
# static_appliance_ip6: "2001:db8::1"
# origin:
# type: "independent"
# interfaces:
# - "6"
- vlan_id: 20
name: "VLAN20"
subnet: "192.168.20.0/24"
appliance_ip: "192.168.20.1"
group_policy_name: "BMS"# Maps to group policy ID for BMS policy