Router on a stick / VLAN help

drew2000drew2000 Member Posts: 290
Guys,
I ran into a problem and want to validate what I think happened.

Working on router-on-a-stick with my 1721 and a 2950.

I created two VLAN's on the 2950. Once I gave VLAN 2 an IP, VLAN 1 shut down.

I think is because this is not a layer 3 switch, so there can only be one VLAN with an IP assigned. Basically every time I run a "no shutdown" on one VLAN, the other shuts down.

So I am going to add another layer 2 switch (I have 2 other 2950's).

Just looking for validation on the WHY behind the what.

Thanks,

Drew

Current configuration : 1419 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname 2950N
!
enable secret 5 $1$sN0F$.668OFL6UJGf3HORdWz4F1
enable password password
!
ip subnet-zero
!
no ip domain-lookup
!
spanning-tree mode pvst
no spanning-tree optimize bpdu transmission
spanning-tree extend system-id
!
!
!
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
spanning-tree cost 19
!
interface FastEthernet0/5
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/6
switchport access vlan 2
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/7
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/8
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/9
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/10
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/11
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/12
switchport mode access
switchport nonegotiate
!
interface Vlan1
ip address 172.16.0.20 255.255.0.0
no ip route-cache
!
interface Vlan2
description 19Net
ip address 172.19.0.20 255.255.0.0
no ip route-cache
shutdown
!
ip http server
!
line con 0
line vty 0 4
password cisco
login
line vty 5 15
password cisco
login
!
!
end

Comments

  • tech-airmantech-airman Member Posts: 953
    drew2000,
    drew2000 wrote: »
    Guys,
    I ran into a problem and want to validate what I think happened.

    Working on router-on-a-stick with my 1721 and a 2950.

    I created two VLAN's on the 2950. Once I gave VLAN 2 an IP, VLAN 1 shut down.

    What is the purpose of an IP address for a VLAN on a switch?
    drew2000 wrote: »
    I think is because this is not a layer 3 switch, so there can only be one VLAN with an IP assigned. Basically every time I run a "no shutdown" on one VLAN, the other shuts down.

    This is related to my question above.
    drew2000 wrote: »
    So I am going to add another layer 2 switch (I have 2 other 2950's).

    That won't solve the problem you're having now.
    drew2000 wrote: »
    Just looking for validation on the WHY behind the what.

    Thanks,

    Drew

    Current configuration : 1419 bytes
    !
    version 12.1
    no service pad
    service timestamps debug uptime
    service timestamps log uptime
    no service password-encryption
    !
    hostname 2950N
    !
    enable secret 5 $1$sN0F$.668OFL6UJGf3HORdWz4F1
    enable password password
    !
    ip subnet-zero
    !
    no ip domain-lookup
    !
    spanning-tree mode pvst
    no spanning-tree optimize bpdu transmission
    spanning-tree extend system-id
    !
    !
    !
    !
    interface FastEthernet0/1
    !
    interface FastEthernet0/2
    !
    interface FastEthernet0/3
    !
    interface FastEthernet0/4
    spanning-tree cost 19
    !
    interface FastEthernet0/5
    switchport mode access
    switchport nonegotiate
    !
    interface FastEthernet0/6
    switchport access vlan 2
    switchport mode access
    switchport nonegotiate
    !
    interface FastEthernet0/7
    switchport mode access
    switchport nonegotiate
    !
    interface FastEthernet0/8
    switchport mode access
    switchport nonegotiate
    !
    interface FastEthernet0/9
    switchport mode access
    switchport nonegotiate
    !
    interface FastEthernet0/10
    switchport mode access
    switchport nonegotiate
    !
    interface FastEthernet0/11
    switchport mode access
    switchport nonegotiate
    !
    interface FastEthernet0/12
    switchport mode access
    switchport nonegotiate
    !
    interface Vlan1
    ip address 172.16.0.20 255.255.0.0
    no ip route-cache
    !
    interface Vlan2
    description 19Net
    ip address 172.19.0.20 255.255.0.0
    no ip route-cache
    shutdown
    !
    ip http server
    !
    line con 0
    line vty 0 4
    password cisco
    login
    line vty 5 15
    password cisco
    login
    !
    !
    end

    Why are you assigning an IP address to both VLAN1 and VLAN2?
  • drew2000drew2000 Member Posts: 290
    Thanks for the reply tech-airman - I guess I woke up too early to be working on this!

    I over-thought this a little.

    What I was trying to do was assign a separate IP address to each VLAN in order to be able to ping one from the other (by way of the router and trunking) without having to setup an additional device on the other end.

    After looking at your questions, I need to drop one IP (remembering that the primary purpose is for management) and just plug in a router or a laptop to VLAN2 and use that as my pingable host.

    Drew
  • shai83shai83 Member Posts: 3 ■□□□□□□□□□
    You can only assign one IP to a VLAN configured on a switch, for management purposes (so you can manage the switch remotely). You can't assign two IP's to a switch.

    That is why one interface keeps shutting down.
  • drew2000drew2000 Member Posts: 290
    I remember that from ICND1 now (thanks to you guys).

    I removed the IP address from the other VLAN. Now when I "no shut" the new VLAN, it automatically shuts down VLAN1 (with the IP address). Then the new VLAN "steals" the IP from VLAN1 and assigns it to itself.

    I'll post a config in a minute..

    Drew
  • drew2000drew2000 Member Posts: 290
    Here is my current config. I am trying to delete VLAN 10 and VLAN 19, but the switch keeps creating them. Also every time I bring up VLAN2 it steals the IP from VLAN1 and shuts down VLAN1. I am performing a RELOAD right now.

    Drew



    Current configuration : 1576 bytes
    !
    version 12.1
    no service pad
    service timestamps debug uptime
    service timestamps log uptime
    service password-encryption
    !
    hostname 2950N
    !
    enable secret 5 $1$sN0F$.668OFL6UJGf3HORdWz4F1
    enable password 7 140713181F13253920
    !
    ip subnet-zero
    !
    no ip domain-lookup
    !
    spanning-tree mode pvst
    no spanning-tree optimize bpdu transmission
    spanning-tree extend system-id
    !
    !
    !
    !
    interface FastEthernet0/1
    !
    interface FastEthernet0/2
    !
    interface FastEthernet0/3
    !
    interface FastEthernet0/4
    !
    interface FastEthernet0/5
    switchport mode trunk
    switchport nonegotiate
    !
    interface FastEthernet0/6
    switchport access vlan 2
    switchport mode access
    switchport nonegotiate
    !
    interface FastEthernet0/7
    switchport mode access
    switchport nonegotiate
    !
    interface FastEthernet0/8
    switchport mode access
    switchport nonegotiate
    !
    interface FastEthernet0/9
    switchport mode access
    switchport nonegotiate
    !
    interface FastEthernet0/10
    switchport mode access
    switchport nonegotiate
    !
    interface FastEthernet0/11
    switchport mode access
    switchport nonegotiate
    !
    interface FastEthernet0/12
    switchport mode access
    switchport nonegotiate
    !
    interface Vlan1
    ip address 172.16.0.20 255.255.0.0
    no ip route-cache
    !
    interface Vlan2
    description 19Net
    no ip address
    no ip route-cache
    shutdown
    !
    interface Vlan10
    no ip address
    no ip route-cache
    shutdown
    !
    interface Vlan19
    description 19Net
    no ip address
    no ip route-cache
    shutdown
    !
    ip default-gateway 172.16.0.1
    ip http server
    !
    line con 0
    line vty 0 4
    password 7 0822455D0A16
    login
    line vty 5 15
    password 7 13061E010803
    login
    !
    !
    end
  • drew2000drew2000 Member Posts: 290
    Ok - I solved it. In my mind I have to keep straight that there is a difference between INT vlan's and normal vlans.

    I was trying to delete the vlans by using "no vlan 19." What actually worked was "no in vlan 19".

    This has always been a hard one for me to remember. I think that's because when I first learned Cisco I was using Layer 3 switches and we actually used multiple INT vlans (this was years ago so I may be wrong).

    Drew
Sign In or Register to comment.