Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 23138
  • Last Modified:

Cisco 2950 Changing VLAN IP address

Hello -
I'm looking for some guidance on configuring VLANs and assigning addresses to them...I'm using a Catalyst 2950, with IOS version 12.0 (a little old, I know...)

The switch is configured with 3 VLANs, and VLAN1 has an ip address assigned to it 192.168.2.100. This address is incorrect - it should actually be an address in 192.168.4.x, and it should be assigned to VLAN2.

I did this:
en
conf t
interface VLAN1
no ip address
interface VLAN2
ip address 192.168.4.100 255.255.255.0

no ip default-gateway 192.168.2.1
ip default-gateway 192.168.4.1

exit
write mem

So - now, when I do 'show config', it still shows interface VLAN1 there with 'no ip address', and interface VLAN2 isn't there at all.
When I do 'show interfaces', it shows interface VLAN1 is up, line protocol is up (but with no IP address) and it shows interface VLAN2 is deleted, line protocol is down. VLAN2 has the correct address, and the default gateway is also changed.

Any ideas what I missed? I really want to have VLAN2 up with the new address, and I don't really care about the VLAN1 interface anymore.

thanks
0
JammyPak
Asked:
JammyPak
  • 3
  • 3
1 Solution
 
JammyPakAuthor Commented:
note: I haven't rebooted the switch, but I don't want to do that unless I need to....
0
 
scampgbCommented:
Hi JammyPak,

You shouldn't have to reboot - it's one of the nice things about Cisco kit :-)

I can't think of any problems with having the IP address on VLAN2.

It's a shame you wrote the config back.  Can you please post the full running config?

0
 
JammyPakAuthor Commented:
Here's the running config - you can see it doesn't show VLAN2 interface at all (I only see it with 'show interfaces'). I've posted part of the previous config below.
Unfortunately, I didn't setup this switch myself, so I'm not sure what some of the reasons were for using rootguard and portfast on some interfaces and not on others. This could be setup in an inefficient way since the VLANs aren't being used for the same function as the person who set it up intended.
VLAN2 is connected to the internal LAN. VLAN3 is the DMZ, and VLAN1 connects to the upstream router on the public internet.
cheers

*Running Config*
version 12.0
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname 2950pubdmz
!
enable secret 5 $1$Vp7.$y87D5GP1Wnp8L7Ts4NhU80
!
ip subnet-zero
!
interface FastEthernet0/1
 description Cisco 1605R
switchport access vlan 2
 spanning-tree portfast
!
interface FastEthernet0/2
 description Cisco VPN 3005 private
 switchport access vlan 2
 spanning-tree portfast
!
interface FastEthernet0/3
 description Cisco PIX Ethernet 1 private
 switchport access vlan 2
 spanning-tree portfast
!
interface FastEthernet0/4
 switchport access vlan 2
 spanning-tree portfast
!
interface FastEthernet0/5
 switchport access vlan 2
 spanning-tree portfast
!
interface FastEthernet0/6
 switchport access vlan 2
spanning-tree portfast
!
interface FastEthernet0/7
 switchport access vlan 2
 spanning-tree portfast
!
interface FastEthernet0/8
 switchport access vlan 2
 spanning-tree portfast
!
interface FastEthernet0/9
 switchport access vlan 3
 spanning-tree portfast
!
interface FastEthernet0/10
 switchport access vlan 3
 spanning-tree portfast
!
interface FastEthernet0/11
 switchport access vlan 3
 spanning-tree portfast
 spanning-tree rootguard
!
interface FastEthernet0/12
 switchport access vlan 3
 spanning-tree portfast
 spanning-tree rootguard
!
interface FastEthernet0/13
 switchport access vlan 3
 spanning-tree portfast
 spanning-tree rootguard
!
interface FastEthernet0/14
 switchport access vlan 3
 spanning-tree portfast
 spanning-tree rootguard
!
interface FastEthernet0/15
 switchport access vlan 3
 spanning-tree portfast
 spanning-tree rootguard
!
interface FastEthernet0/16
 description Cisco PIX DMZ Ethernet 2
switchport access vlan 3
 spanning-tree portfast
 spanning-tree rootguard
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
 description Cisco VPN 3005 public
!
interface FastEthernet0/23
 description Cisco PIX Ethernet 0 public
!
interface FastEthernet0/24
 description Inet uplink
!
interface VLAN1
 no ip address
 no ip directed-broadcast
 no ip route-cache
!
ip default-gateway 192.168.4.1
snmp-server engineID local 0000000902000008A445AE00
snmp-server community private RW
snmp-server community public RO
banner login - Unauthorized use is Prohibited !!!
*************************************************************
!
line con 0
 transport input none
 stopbits 1
end

*Previous Config*
I won't post the entire previous config, since it was virtually identical, except for these lines:
interface VLAN1
 ip address 192.168.2.248 255.255.255.0
 no ip directed-broadcast
 no ip route-cache
!
ip default-gateway 192.168.2.1
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
scampgbCommented:
That all looks pretty sensible to me.

What happens if you do the following?

conf t
ip default-gateway 192.168.4.1
interface VLAN1
ip address 192.168.4.100 255.255.255.0
no shut
interface VLAN3
no ip address
no shut
0
 
JammyPakAuthor Commented:
OK, that's the problem...

I just needed to do this:

conf t
interface VLAN1
shutdown
interface VLAN2
no shutdown

- now the old VLAN interface is inactive, and the new one's working.

thanks!
0
 
scampgbCommented:
Sorry, I didn't realise you actually wanted VLAN1 shut down.  I just thought you wanted to move the IP.

Glad I could help  - thanks for the "A".
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now