This document explains about the requirement and configuration required while configuring the Layer 3 VLAN on cnMatrix switch with DHCP server.
Create different LAN segment to reduce the broadcast domain with central DHCP management:
I have considered the below network topology for this setup which is ideal for small and medium grade enterprises:
Note: I have considered VLAN 1 for connectivity between gateway device to cnMatrix switch as an example and considered 3 VLANs (50,100,150) for LAN connectivity. You can use any VLAN as per your Network requirement. NAT is configured on the gateway router for all outgoing traffic towards the internet.
** In the below network scenario, you need to configure the reverse static route for all the L3 network which belong/configured on cnMatrix switch at gateway router/Firewall to provide internet.
Example- IP ROUTE <Source Address> <Destination Address> <Next hop>
IP ROUTE 0.0.0.0 192.168.100.0/24 184.108.40.206
Please follow the below steps to configure cnMatrix switch:
Step 1: Log into the cnMatrix switch using the management/network IP address and enter the Username and Password.
Step 2: Enter in privilege mode using “Configure Terminal” command and enable DHCP server:
Step 3: Create Layer 3 VLAN Interface and assign IP address on the interface:
** Create other VLAN interface using the above command
Step 4: Configure DHCP Pool:
Command Syntax –
# ip dhcp pool <pool ID> <pool name>
# network <Start IP Address> <Subnet Mask> <End IP Address>
# default-router <VLAN interface IP Address>
# dns-server <DNS server 1 IP Address> <DNS server 2 IP address>
** Create other DHCP Pools using the above command
Step 5: Create Layer 2 VLAN Interface and map it with switch interface:
Command Syntax –
# vlan <ID>
# ports <Member Port> <Untagged Port>
# name <VLAN Name>
** Create other L3 VLAN interface using the above command
Step 6: Assign PVID on switch interface for untagged traffic:
** Assign other VLAN on interface using the above command
Step 7: Save Switch Configuration from nvram to startup-config:
Results: In this case, once the ethernet client connects with the desired Port, it will then become a member of the respective VLAN and will get an IP address dynamically from respective DHCP Pool. You can extend the network using L2 switch without making any additional configuration on L2 switches.
Note: Ensure that the Switch is on the latest version. You can check or download the latest cnMatrix switches from below Links: