configuring L2 and L3 switch for VLAN

Answered Question
May 4th, 2010
User Badges:

Hi,

Could you assist me in configuring a 2960 and 3750 switches for VLAN. How is an interface on the 3750 configured with sub interfaces for VLANS? VLAN 10, 192.168.1.0, VLAN 20,192.168.2.0? The following is the initial config. Thanks.


2960 switch:
en
config t
hostname 2960
enable secret cisco
line con 0
logging synchronous
login
password switch
exit
line aux 0
login
password tahiti
exit
line vty 0 15
login
password tahiti
exit
vtp mode client
ip default-dateway 192.168.1.1
vlan 10
name Admin
exit
vlan 20
name Accounting
vlan 30
name Engineering
exit
interface range fastethernet 0/2 - 8
switchport mode access
switchport access vlan 10
interface range fastethernet 0/9 - 15
switchport mode access
switchport vlan 20
interface range fastethernet 0/16 - 24
switchport mode access
exit
exit
copy run start
config t
interface fasteth 0/1
switchport mode dynamic desirable
switchport mode dynamic auto
switchport nonegotiate
switchport mode trunk
exit
vtp domain switch
vtp passw mteverest
vtp v2-mode


3750 switch:
en
config t
hostname 3750
enable secret cisco
line con 0
logging synchronous
login
password switch
exit
line aux 0
login
password tahiti
exit
line vty 0 15
login
password tahiti
exit
int fastethnet 1/0/1
switchport mode trunk
switchport trunk encap dot1q
exit
vtp domain switch
vtp passw mteverest
vtp v2-mode
vtp pruning
exit copy run start

Correct Answer by Jon Marshall about 7 years 2 months ago

You don't use subinterfaces on a L3 switch. What you do is connect your L2 switch to your L3 switch via a L2 trunk. Then for each vlan you want to route on the 3750 you create a L3 SVI (switched virtual interface) eg.


int vlan 10

ip address 192.168.5.1 255.255.255.0


int vlan 11

ip address 192.168.6.1 255.255.255.0


etc.. for each vlan


on the clients in vlan 10 their default-gateway would be 192.168.5.1. Clients on vlan 11 would use 192.168.6.1.


Jon

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
Jon Marshall Tue, 05/04/2010 - 09:48
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

You don't use subinterfaces on a L3 switch. What you do is connect your L2 switch to your L3 switch via a L2 trunk. Then for each vlan you want to route on the 3750 you create a L3 SVI (switched virtual interface) eg.


int vlan 10

ip address 192.168.5.1 255.255.255.0


int vlan 11

ip address 192.168.6.1 255.255.255.0


etc.. for each vlan


on the clients in vlan 10 their default-gateway would be 192.168.5.1. Clients on vlan 11 would use 192.168.6.1.


Jon

Actions

This Discussion