cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5756
Views
0
Helpful
7
Replies

Configuring Multiple vlan interfaces on a layer 3 switch

paulmccherry1
Level 1
Level 1

I am trying to incorporate a layer 3 switch into a network. (see diagram 1 below). My problem is that in the configuration below, the layer 3 switch seems to offer no additional benefits over a layer 2 switch as it does not switch layer 3 packets, instead it will need an additional router configuring.

If i configure the 2 interfaces as no switchports, (diagram2) and create virtual interfaces on the layer 3 switch, ie g0/0.1, g0/0.2, g0/0.3, g0/1.1,g0/1.2, g0/1.3, configure encapsulation dot1q, and add ip addresses and subnets on each interface, then I understand I can use the layer 3 switch as a router.

However this now introduces a new problem, VLAN 1 is on both interfaces, therefore devices in VLAN 1 on each interface will have to point to the default gateway on that specific interface and VLAN 1 devices on the G0/0.1 interface will have to be configured with a different subnet  than those on the G0/1.1 interface.

This does not seem logical, Am I missing something ? 

Diagram 1

1 Accepted Solution

Accepted Solutions

Paul

On a L3 switch you don't configure subinterfaces (usually).

You create what are called SVIs (Switched Virtual Interfaces) instead and these are your L3 interfaces.

So ports on your L3 switch are L2 ports either trunks or assigned to specific vlans.

Then for each vlan you want to route you create an SVI ie. -

int vlan <x>
ip address x.x.x.x <subnet mask>
no shut

and the default gateway of clients in that vlan is the IP assigned to the SVI.

Any other L3 interface configuration you add to the SVI.

The only time you really use L3 ports is when you connect to a router for example.

Jon

View solution in original post

7 Replies 7

donglee36
Level 1
Level 1

Configure VTP domain and instead of sub interface use vlan intefaces on layer 3 switch..

Doesnt VTp just ensure that all switches have the same VLANS listed. how does that have any bearing on this issue ?

Well, if you keep them in vtp domain and use vlan interface, you can use secondary IP address on vlan1.

int vlan1

ip address 192.168.0.254  255.255.255.0

ip address 192.168.1.254 255.255.255.0 secondary

/

Paul

On a L3 switch you don't configure subinterfaces (usually).

You create what are called SVIs (Switched Virtual Interfaces) instead and these are your L3 interfaces.

So ports on your L3 switch are L2 ports either trunks or assigned to specific vlans.

Then for each vlan you want to route you create an SVI ie. -

int vlan <x>
ip address x.x.x.x <subnet mask>
no shut

and the default gateway of clients in that vlan is the IP assigned to the SVI.

Any other L3 interface configuration you add to the SVI.

The only time you really use L3 ports is when you connect to a router for example.

Jon

paulmccherry1
Level 1
Level 1

Aha of course, so i set up trunks as per diagram 1 and simply create SVI's for each VLAN with the IP address that will be used as the gateway device.

thanks Jon

No problem and yes that is exactly what you do.

Jon

One last thing about SVIs.

They will only come up if either -

1) an access port connected to that vlan on the switch is up/up

or

2) an trunk link allowing that vlan is up/up.

Just in case they aren't coming up.

Jon

Review Cisco Networking for a $25 gift card