10-05-2023 02:33 PM
I have a customer who wants a basic switch config on a 2960. I have been configuring enterprise switches for my career, so I may need some pointers or recommendations. Their switches don't need any VLANs, all hosts will be on the same LAN and the DHCP service will be handled by the switch. Basically, I would need to create the naming scheme, enter the default GW, and create a DHCP pool. thank you.
Solved! Go to Solution.
10-05-2023 07:49 PM - edited 10-05-2023 07:49 PM
First thing if the switch need to handle route you need to enable ip routing (default gateway only be used for Layer 2 switch)
if this switch acting for routing and DHCP below same config should work :(this is bare config - does not cover any fancy stuff, just Routing interface and DHCP Server (so all the device in the VLAN get IP address and communicate in the LAN)
hostname <hostname>
ip domain name XXXXXXXX
ip name-server x.x.x.x
crypto key generate rsa modulus 2048
ip ssh version 2
aaa new-model
aaa authentication login CONSOLE none
aaa authentication login VTY local
service password-encr
username Admin priv 15 secret <password>
enable secret <enable passsword>
VLAN X
name DATA-VLAN
ip routing
ip multicast-routing
ip pim rp-address x.x.x.x
ip pim ssm default
ip pim register-source Interface X
cdp run
lldp run
### DHCP config
ip dhcp excluded-address x.x.x.1 x.x.x.10
ip dhcp pool MyDHCP
network 192.168.0.0 255.255.255.0
default-router 192.168.0.1
dns-server 192.168.0.1
!
service dhcp vlanX
!
interface VLANX
ip address 192.168.0.1 255.255.255.0
!
Interface range gig1/0/1-47
switchport mode access
switchport access vlan XX
no shutdown
!
line con 0
logging synchronous
login authentication CONSOLE
line vty 0 15
login authentication VTY
transport input ssh
vtp mode transparent
10-05-2023 07:49 PM - edited 10-05-2023 07:49 PM
First thing if the switch need to handle route you need to enable ip routing (default gateway only be used for Layer 2 switch)
if this switch acting for routing and DHCP below same config should work :(this is bare config - does not cover any fancy stuff, just Routing interface and DHCP Server (so all the device in the VLAN get IP address and communicate in the LAN)
hostname <hostname>
ip domain name XXXXXXXX
ip name-server x.x.x.x
crypto key generate rsa modulus 2048
ip ssh version 2
aaa new-model
aaa authentication login CONSOLE none
aaa authentication login VTY local
service password-encr
username Admin priv 15 secret <password>
enable secret <enable passsword>
VLAN X
name DATA-VLAN
ip routing
ip multicast-routing
ip pim rp-address x.x.x.x
ip pim ssm default
ip pim register-source Interface X
cdp run
lldp run
### DHCP config
ip dhcp excluded-address x.x.x.1 x.x.x.10
ip dhcp pool MyDHCP
network 192.168.0.0 255.255.255.0
default-router 192.168.0.1
dns-server 192.168.0.1
!
service dhcp vlanX
!
interface VLANX
ip address 192.168.0.1 255.255.255.0
!
Interface range gig1/0/1-47
switchport mode access
switchport access vlan XX
no shutdown
!
line con 0
logging synchronous
login authentication CONSOLE
line vty 0 15
login authentication VTY
transport input ssh
vtp mode transparent
10-06-2023 11:29 AM
Thank you for your feedback. The customer decided to add a voice VLAN.
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