cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
807
Views
0
Helpful
2
Replies

how to create vlan and trunk port with dhcp server

manivalaguru
Level 1
Level 1

hello, 

i have been using cisco switch sg350 trying to create  two vlan and two trunk port to connect with one acess point 

vlan 1 should trunked with vlan 30-->router 192.168.1.1 netmask 255.255.255.0 should get internet with dhcp from tplink router ip range shoud be 192.168.1.10 to 192.168.1.10 (port 2 to 11)

vlan 2 should trunked with vlan 40-->router192.168.100.1 netmask 255.255.240.0 static route ip range should be 192.168.96.1 to 192.168.96.20(port 12 to 20)

acess point

2ghz-->vlan 1

5ghz-->vlan 21680153174896.jpg

2 Replies 2

Dallas52698
Level 1
Level 1

To create a VLAN and trunk port with a DHCP server, you will need to follow these general steps:

  1. Configure the switch interface: First, configure the interface that will be used as the trunk port. This will be the port that connects to another switch or to the router. Use the following commands:

switch(config)#interface gigabitethernet 1/0/1
switch(config-if)#switchport mode trunk

  1. Create a VLAN: Next, create the VLAN that will be used for the DHCP server. Use the following commands:

switch(config)#vlan 10
switch(config-vlan)#name dhcp_server

  1. Assign ports to the VLAN: Assign ports to the VLAN that will be used for the DHCP server. Use the following command:

switch(config)#interface gigabitethernet 1/0/2
switch(config-if)#switchport access vlan 10

  1. Configure the DHCP server: Finally, configure the DHCP server on the VLAN. Use the following commands:

switch(config)#ip dhcp pool dhcp_server
switch(dhcp-config)#network 192.168.1.0 255.255.255.0
switch(dhcp-config)#default-router 192.168.1.1
switch(dhcp-config)#dns-server 8.8.8.8

In the above example, VLAN 10 has been created and assigned to interface GigabitEthernet 1/0/2. The DHCP server has been configured on this VLAN with the IP address range of 192.168.1.0/24 and a default gateway of 192.168.1.1. The DNS server is set to 8.8.8.8.

Sketchiz

Note that the exact commands used may vary depending on the switch and the specific configuration requirements.

manivalaguru
Level 1
Level 1

hello,

not clear on how to tag my trunk port with vlan and how to create another vlan with different trunk port with static route