cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3309
Views
0
Helpful
3
Replies

2950 Assign DHCP to VLAN

gregz0012
Level 1
Level 1

Morning,

Stumped again with my Catalyst 2950. Everything is working perfectly with wan/dhcp/router on fa 0/1 with all ports assigned to vlan1. All devices plugged in connect to the router correctly with ip's being assigned via dhcp.

Instead of hooking up by console port I want to be able to SSH or telnet in to the switch using any port while still maintaining the above functionallity. Is it possible to assign a dhcp assigned ip address to vlan 2 and have vlan1 and 2 bridged? Or is there a better way of doing this?

2 Accepted Solutions

Accepted Solutions

Andy Dabell
Level 1
Level 1

You could apply a static IP address to vlan 1 and then exclude that address from the dhcp pool.

Sent from Cisco Technical Support iPhone App

View solution in original post

Alex,

You can put the management address on any vlan that you want, but the vlan will need to be accessible from hosts. If you put the address on vlan 2, you'll need to have your host on a port that's configured for vlan 2 or router-on-a-stick configured on the router to route for vlan 2. Either way, the easiest is to put your address on vlan 1 since the 2950 is a L2 switch (no routing functionality). You can only have a management address on the 2950 and that address cannot be used as a gateway for hosts; you would still use the router as your gateway.

Console into the switch and run these commands from the config prompt:

int vlan 1

ip address 192.168.1.2 255.255.255.0 (or whatever address you want to give it).

You'll want to have the address in the same subnet as what you're giving your hosts from your dhcp server, but you don't want the address to be in the range of the dhcp scope. If it is, you'll need to exclude the address on your router (if that's where the scope is) by putting in the command:

ip dhcp excluded-address (if it's the above one, it's: ip dhcp excluded-address 192.168.1.2)

HTH,

John

Please rate useful posts...

HTH, John *** Please rate all useful posts ***

View solution in original post

3 Replies 3

Andy Dabell
Level 1
Level 1

You could apply a static IP address to vlan 1 and then exclude that address from the dhcp pool.

Sent from Cisco Technical Support iPhone App

Is ssh supported and configured on the switch? Are you attempting to open an ssh connection to the bridge admin address (the vlan1 address)?

Sent from Cisco Technical Support iPad App

Alex,

You can put the management address on any vlan that you want, but the vlan will need to be accessible from hosts. If you put the address on vlan 2, you'll need to have your host on a port that's configured for vlan 2 or router-on-a-stick configured on the router to route for vlan 2. Either way, the easiest is to put your address on vlan 1 since the 2950 is a L2 switch (no routing functionality). You can only have a management address on the 2950 and that address cannot be used as a gateway for hosts; you would still use the router as your gateway.

Console into the switch and run these commands from the config prompt:

int vlan 1

ip address 192.168.1.2 255.255.255.0 (or whatever address you want to give it).

You'll want to have the address in the same subnet as what you're giving your hosts from your dhcp server, but you don't want the address to be in the range of the dhcp scope. If it is, you'll need to exclude the address on your router (if that's where the scope is) by putting in the command:

ip dhcp excluded-address (if it's the above one, it's: ip dhcp excluded-address 192.168.1.2)

HTH,

John

Please rate useful posts...

HTH, John *** Please rate all useful posts ***
Review Cisco Networking for a $25 gift card