setup VLAN

555 pts.
Tags:
Cisco Catalyst
VLAN
VLAN Setup
I have a cisco catalyst 2950 24port. I would like to setup 3 different vlans. Can someone email me the commands or configuration as to how i setup for example 8 ports for 192.168.9.x, 8 ports for 192.168.31.x, and 8 ports for 192.168.35.x ... thank you in advance

Answer Wiki

Thanks. We'll let you know when a new response is added.

FastEthernet0/0 on the router will connect to FastEthernet0/1 on the switch.

you will need a router config like this:

interface FastEthernet0/0
description LAN Interface
no ip address
duplex full
speed 100
!
interface FastEthernet0/0.1
description **MANAGEMENT VLAN – DO NOT USE**
encapsulation dot1Q 1 native
no snmp trap link-status
!
interface FastEthernet0/0.9
description **Vlan 9**
encapsulation dot1Q 9
ip address 192.168.9.1 255.255.255.0
no snmp trap link-status
!
interface FastEthernet0/0.31
description **Vlan 31**
encapsulation dot1Q 31
ip address 192.168.31.1 255.255.255.0
no snmp trap link-status
!
interface FastEthernet0/0.35
description **Vlan 35**
encapsulation dot1q 35
ip address 192.168.35.1 255.255.255.0
no snmp trap link-status

and then you will need the following on the switch:

vlan 9
name Vlan_9

vlan 31
name vlan_31

vlan 35
name vlan_35
!
interface vlan9
description **Vlan 9**
ip address 192.168.9.254 255.255.255.0
!
interface vlan31
description **Vlan 31**
ip address 192.168.31.254 255.255.255.0
!
interface vlan35
description **Vlan 35**
ip address 192.168.35.254 255.255.255.0
!
interface FastEthernet0/1
description **Uplink to Airline INT G0/0**
switchport mode trunk
speed 100
duplex full
!
interface range FastEthernet0/2 – 9
description **Vlan 9**
switchport mode access
switchport access vlan 9
spanning-tree portfast
!
interface range FastEthernet0/10 – 17
description **Vlan 31**
switchport mode access
switchport access vlan 31
spanning-tree portfast
!
interface range FastEthernet0/18 – 24
description **Vlan 35**
switchport mode access
switchport access vlan 35
spanning-tree portfast

Discuss This Question: 9  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Kwt712
    Thanks for the configuration. for the router configuration, is this i have to add to the main router or the router that is pointing to this switch ... let me know. thanks
    555 pointsBadges:
    report
  • BlankReg
    The router config is on the interface that connects directly to the FastEthernet0/1 of the switch. One other thing, as R0berth1 fixed the speed and duplex on the trunk port on the switch, you should also do the same on the router, otherwise it will probably end up as half-duplex. Just add the commands on the router. interface FastEthernet0/0 speed 100 duplex full Other than that, R0berth1 gave you the full working answer :-)
    12,325 pointsBadges:
    report
  • R0berth1
    Good catch, I forgot to select the FastEthernet0/0 section when i copied it from my switch.
    175 pointsBadges:
    report
  • R0berth1
    Kwt712, if you need me to. I can post a 2811 and 2950 template and you can just change what you need for later use.
    175 pointsBadges:
    report
  • Kwt712
    Can you please do that, i would help alot ... thanks
    555 pointsBadges:
    report
  • Kwt712
    I have a cisco catalyst 2950 24 port and i have a Linksys 48 port 10/100 + 2-Port Gigabit Smart Switch. When i do the VLan on Cisco Catalyst Switch and daisy chain the linksys to it, would it let me configure the port on linksys (my answer is no) ... just checking. Also, when i daisy chain off of Cisco Switch, i assume i have to use the the port (like .35 or .31) to daisy chain cause if i want to use that entire switch (linksys) for .35. thanks
    555 pointsBadges:
    report
  • R0berth1
    This is for a 2811: ! version 12.4 service timestamps debug datetime service timestamps log datetime serice password-encryption ! hostname ##rtrname## <---Enter your router name here ! enable secret 0 password <---your password goes here ! aaa new-model <---These are used for TACACS+, but you can remove them aaa authentication login default group tacacs+ <---These are used for TACACS+, but you can remove them aaa authentication ppp default local <---These are used for TACACS+, but you can remove them aaa authorization exec default local group tacacs+ <---These are used for TACACS+, but you can remove them aaa accounting exec default start-stop group tacacs+ <---These are used for TACACS+, but you can remove them aaa accounting network default start-stop group tacacs+ <---These are used for TACACS+, but you can remove them aaa session-id common <---These are used for TACACS+, but you can remove them ! clock timezone CST -6 clock summer-time CST recurring 2 Sun Mar 2:00 1 Sun Nov 2:00 clock calendar-valid ! ip cef ! crypto key generate rsa <---These are used for TACACS+, but you can remove them 1024 <---These are used for TACACS+, but you can remove them ! ip tftp source-interface Loopback0 no ip bootp server no ip domain lookup ip domain name yourdomainhere <---These are used for TACACS+, but you can remove them ip ssh authentication-retries 4 <---These are used for TACACS+, but you can remove them ! username User secret 0 pass <--your pass here ! class-map match-any data match access-group 101 class-map match-all voice match dscp ef ! policy-map voice-priority class voice priority 384 class data set precedence 3 bandwidth remaining percent 100 class class-default fair-quere random-detect set ip precedence 0 ! interface Loopback0 ip address ##loop0-ip## 255.255.255.255 <---Remove everthing from the first # and the last # and replace with your IP Address ! interface Serial0/0 description **MPLS Circut** mtu 1600 bandwidth 1544 no ip address encapsulation frame-relay IETF load-interval 30 service-module t1 timeslots 1-24 frame-relay lmi-type ansi service-policy output voice-priority no shutdown ! interface Serial0/0.##frame-DLCI## point-to-point <---Replace everything from the first # and the last # and replace with your DLCI ip address ##frame-ip## 255.255.255.252 <---Remove everthing from the first # and the last # and replace with your IP Address ip flow ingress <---Only used if you have a netflow server ip flow egress <---Only used if you have a netflow server no cdp enable frame-relay interface-dlci ##frame-DLCI## <---Replace everything from the first # and last # and replace with your DLCI ! interface FastEthernet0/0.1 description **MANAGEMENT VLAN - DO NOT USE** encapsulaiton dot1Q native no snmp trap link-status ! interface FastEthernet0/0.220 <---Change to any vlan number description **PC-VLAN** encapsulation dot1Q 220 <---Change to any vlan number ip address ##eth0-ip## 255.255.255.0 <---Remove everthing from the first # and the last # and replace with your IP Address no shut ! interface FastEthernet0/0.120 <---Change to any vlan number description **VOIP-VLAN** encapsulation dot1Q 120 <---Change to any vlan number ip address ##eth1-ip## 255.255.255.0 <---Remove everthing from the first # and the last # and replace with your IP Address no shut ! interface FastEthernet0/1 no ip address shutdown ! ip route 0.0.0.0 0.0.0.0 ##frame1-ip## <---Remove everthing from the first # and the last # and replace with your Next Hop address ! ip flow-export source serial0/0/0 <---Used for netflow and can be removed ip flow-export version 5 <---Used for netflow and can be removed ip flow-export destination 10.50.30.201 2055 <---Used for netflow and can be removed ! ip http server ip http access-class 23 ip http authentication local ip http secure-server ip http timeout-policy idle 60 life 864000 requesta 10000 ip tacacs source-interface Loopback0 ! logging 0.0.0.0 <----Sends info to Syslog server and can be removed access-list 101 remark **MPLS QOS ACL** access-list 101 permit ip any any access-list 101 remark **MPLS QOS ACL** snmp-server community 3cl1p$3 RW ! tacacs-server host 0.0.0.0 <---Used for TACACS+ and SSH2 but can be removed tacacs-server directed-request <---Used for TACACS+ and SSH2 but can be removed tacacs-server key pass <---Used for TACACS+ and SSH2 but can be removed ! banner login ^CCC This is optional but enter your banner here. Shows up on the login screen.^C ! line con 0 exec-timeout 30 0 logging synchronous ! line aux 0 modem Dialin transport input all ! line vty 0 4 exec-timeout 30 0 logging synchronous transport input ssh <--- if you only want to telnet, change SSH to telnet ! line vty 5 15 exec-timeout 30 0 logging synchronous transport input ssh <--- if you only want to telnet, change SSH to telnet ! scheduler allocate 20000 1000 ntp source Loopback0 ntp server 0.0.0.0 <--- if you have an NTP server, enter it's ip here, or remove this line. ! end
    175 pointsBadges:
    report
  • R0berth1
    This is for the switch: service timestamps debug datetime service timestamps log datetime service password-encryption ! hostname devicename <---Device name goes here ! enable secret level 15 pass <---your pass goes here ! aaa new-model aaa authentication login default local aaa authentication login no-tacacs local aaa authentication ppp default local aaa authorization exec default local aaa authorization network default local ! username username secret pass <---your pass goes here ! clock timezone CST -6 clock summer-time CDT recurring ip subnet-zero no ip domain-lookup ! vlan 1 name **VLAN1** vlan 2 name **VLAN2** vlan 3 name **VLAN3** ! interface FastEthernet0/1 description **Uplink to router** switchport mode trunk switchport trunk encapsulation dot1q speed 100 duplex full ! interface range FastEthernet0/2 - 9 description **VLAN1** switchport access vlan 1 switchport mode access speed 100 duplex full spanning-tree portfast ! interface range FastEthernet0/10 - 17 description **VLAN2** switchport access vlan 2 switchport mode access spanning-tree portfast ! interface range FastEthernet0/18 - 24 description **Vlan3** switchport access vlan 3 switchport mode access spanning-tree portfast ! interface range GigabitEthernet0/1 - 2 description **Servers** switchport access vlan 3 switchport mode access spanning-tree portfast ! interface vlan1 no ip address shutdown ! interface vlan1 description **PC Vlan** ip address 0.0.0.0 255.255.255.0 no shutdown ! ip default-gateway 0.0.0.0 ! snmp-server community pass RW ! banner login ^C this is optional, but enter your banner text here.^C ! line con 0 exec-timeout 30 0 line vty 0 4 exec-timeout 30 0 line vty 5 15 exec-timeout 30 0 ! ntp server 0.0.0.0 logging 0.0.0.0 ! end
    175 pointsBadges:
    report
  • Kwt712
    Can someone help with this please I have a cisco catalyst 2950 24 port and i have a Linksys 48 port 10/100 + 2-Port Gigabit Smart Switch. When i do the VLan on Cisco Catalyst Switch and daisy chain the linksys to it, would it let me configure the port on linksys (my answer is no) … just checking. Also, when i daisy chain off of Cisco Switch, i assume i have to use the the port (like .35 or .31) to daisy chain cause if i want to use that entire switch (linksys) for .35. thanks
    555 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following