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

Simple switch config

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.

1 Accepted Solution

Accepted Solutions

balaji.bandi
Hall of Fame
Hall of Fame

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

 

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

View solution in original post

2 Replies 2

balaji.bandi
Hall of Fame
Hall of Fame

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

 

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Thank you for your feedback. The customer decided to add a voice VLAN.