02-16-2024
06:16 AM
- last edited on
02-16-2024
06:32 AM
by
shaiksh
Please I need help of the CLI configuration guide for my layer 3 switch.
I want to create 3 vlans with dhcp, I also have a tplink router to give internet to the switch. I need the CLI configurations. Thank you
02-16-2024 06:49 AM
TPLINK you need to route back to switch and make sure also add to NAT those IP address using in the LAN
depends on the switch model below config should work for you ( there are lot document available in the google if you like to use it)
basic config :
config t
VLAN 10,20,30
ip dhcp excluded-address 192.168.10.0 192.168.10.5
ip dhcp pool VLAN10
default-router 192.168.10.1
dns-server 8.8.8.8
network 192.168.10.0 255.255.255.0
ip dhcp excluded-address 192.168.20.0 192.168.20.5
ip dhcp pool VLAN20
default-router 192.168.20.1
dns-server 8.8.8.8
network 192.168.20.0 255.255.255.0
ip dhcp excluded-address 192.168.30.0 192.168.30.5
ip dhcp pool VLAN30
default-router 192.168.30.1
dns-server 8.8.8.8
network 192.168.30.0 255.255.255.0
interface vlan 10
ip address 192.168.10.1 255.255.255.0
no shutdown
interface vlan 20
ip address 192.168.20.1 255.255.255.0
no shutdown
interface vlan 30
ip address 192.168.30.1 255.255.255.0
no shutdown
Interface Fa0/0
no switchport
ip address x.x.x.x 255.255.255.0 ( TPLINK Lan IP address)
no shutdown
ip routing
ip route 0.0.0.0 0.0.0.0 x.x.x.1 (TP Link Router IP)
end device connecting to different VLAN
Interface Fa0/1
switchport mode access
switchport access vlan 10
no shutdown
Interface Fa0/2
switchport mode access
switchport access vlan 20
no shutdown
Interface Fa0/3
switchport mode access
switchport access vlan 20
no shutdown
02-18-2024 02:46 PM
I implemented this, but when I pinged the different vlan ip addresses, it did not reply.
There must be something am missing.
02-18-2024 11:25 PM
I implemented this, but when I pinged the different vlan ip addresses, it did not reply.
what IP to what IP you pinging ? did the VLAN SVI up (show ip interface brief)
did the PC able to ping gateway IP's ?
Does the PC have Firewalls ?
Do you IP arp on the switch in related to the PC not pinging ?
There must be something am missing.
sure we hear you, we can not see what configured there what missing, you need to provide show run - show ip arp, show ip interface brief (output for us to know what is missing ?)
02-19-2024 03:39 AM
Ok will do
02-19-2024 04:05 AM - edited 02-19-2024 04:05 AM
Hello,
post the output of:
show ip int brief
from the switch.
02-19-2024 08:53 AM
If the switch supports it the output of show interface status might be helpful.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide