Cisco Support Community
Community Member

2 ways to configure layer 3

Using a 6500 /w Sup720's Native IOS.

you can configure a switch 2 ways.

A. interface vlan 10

ip add x.x.x.x y.y.y.y

int g1/1

switchport access vlan 10


B. int g1/1

no switchport

ip add x.x.x.x y.y.y.y


Which one is best. or perfered. both achieve the same thing. What is best from a processing perspective?


Re: 2 ways to configure layer 3

Hello Todd,

Actually both these command sets will be used on the switches, depending on what exactly is required...... Commands A ie giving an IP to VLAN will be used when you want to enable intervlan or Layer 3 routing for VLAN 10..... now, when you configure the gig interface to VLAN 10, it becomes a layer 2 port and the layer 3 will be taken care by the SUP or MSFC..This is the standard way of configuring the access ports.. if you want to set standards, then this command sets "A" is what you will need to configure...

Some guys also use command sets "B" , but not for access ports.. you cannot assign an IP to the port and connect it to a PC.. the PC never gets an IP address then.. we can use a gig port as a layer 3 (by giving Ip directly), when we need to configure a Layer 3 trunk... for eg, if u have this 6500 connected to another 3560 switch on g1/1 and you want to configure layer 3 between these switches, then command set B, is the one you gotta use !!!

So, just to brief, if you are configuring access ports, use A, and if you are configuring L3 trunks, use B.......

Hope this helps.. all the best.. rate replies if found useful..



Re: 2 ways to configure layer 3

If it is just a connecting link then use a routed port .If you are going to need to trunk to another switch then useing a SVI with a layer 2 connection would be best. If you use this switch as both a access switch and a routing switch where you actually have clients on the switch then you would use the SVI so that you can put multiple ports into that vlan . Operational and speed wise there is very little difference as everything is CEF switched anyway .


Re: 2 ways to configure layer 3


Good Day! They could have the same result but generally, these two are different. On the first configuration, you created a layer 3 access using a logical interface Vlan 10 but the switch port is still layer 2. You can add several L2 ports/hosts to this logical layer 3 by adding these ports/host to Vlan 10 and making the IP address of interface Vlan 10 as gateway.

As for the 2nd configuration, you basically made the port a layer 3 port. Usually connected to a router or L3 switch to route traffic to an external network. You can no longer add other L2 ports on the same switch to this L3 network.

Now, it depends on your requirment. If your 6500 will act as a core switch and not much port will be used, go for the 2nd config. But if your 6500 will act as an aggregation or distribution switch and several hosts will be connected to a network then the use 1st configuration.

Hope this helps,



CreatePlease to create content