routing vlans on a switch

Please read carefully. What is the syntax to get a layer 3 switch to act functionally equivalent to a router on a stick by routing vlans, but not use an actual router. Every piece of documentation I find refers to an actual router.
Robert HatcherNetwork EngineerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Don JohnstonInstructorCommented:
Well... It would really help to know what make/model switch.

But assuming a Cisco multilayer switch:

int g0/1 ! Interface connecting to the other (L2) switch
 switchport mode trunk
int vlan 10
 ip address
int vlan 20
 ip address
int vlan 30
 ip address

There you go.  Instant switch on a stick.
Robert HatcherNetwork EngineerAuthor Commented:
I don't have to set up switchport trunk encap dot1q on the trunk port?
The switch in question is either a 3750G-12S-E or a 3850-12S-E
Don JohnstonInstructorCommented:
I don't have to set up switchport trunk encap dot1q on the trunk port?
On the 3750's, the default is to negotiate the encapsulation. If you want to manually set it, "switchport trunk encap dot1q" is the command.  IIRC, the 3850's only support dot1q.
SolarWinds® VoIP and Network Quality Manager(VNQM)

WAN and VoIP monitoring tools that can help with troubleshooting via an intuitive web interface. Review quality of service data, including jitter, latency, packet loss, and MOS. Troubleshoot call performance and correlate call issues with WAN performance for Cisco and Avaya calls

And most important command  in global configuration mode :)
ip routing
It is not enabled by default on L3 switches.
And on L3 switch simply forget about router on a stick, you don't need it.
Robert HatcherNetwork EngineerAuthor Commented:
So just setting IP routing...setting up a trunk line (assumed open to all the various VLANs)... Assign a subnet to each vlan and they all intercommunicate? Thank You

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Don JohnstonInstructorCommented:
Robert HatcherNetwork EngineerAuthor Commented:
I didn't select my own comment and both gentlemen contributed to the answer
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Network Architecture

From novice to tech pro — start learning today.