vtp and vlan on cisco switch and router

I got a cisco switch and a cisco router and I'm going to configure 3 vlans. Making fa0/1 to 3 subinterfaces 0.1,  0.2 and 0.3. I have put in ip adresses on these. I have a switch where there are 3 pc's attached via fa connections. These are on different vlans. encapsulation on the router are dot1q 1 native, dot1q 2 and dot1q 3 on the different subinterfaces. The router and switch are connected via fa0/1. How do I set up the vtp, vlan and trunking to get this to work? Anybody with a good walkthrough?
KjartaneAsked:
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.

Ken BooneNetwork ConsultantCommented:
Well typically unless you really have a good handle on vtp, it is recommend to set the vtp  mode to transparent

On the switch in config mode type

vtp mode transparent

then on the port where you want to trunk you will need these command on the switch

int fa0/0
switchport trunk encapsulation dot1q     <--- some switches may not need this command
switchport mode trunk
switchport trunk allowed vlan 1,2,3      


On the router make sure you use the command native on the subinterface fa0/1.1

If memory serves me the command there would be:

encapsuatlion dot1q 1 native   or maybe native 1  

Use the old ? trick..

That is basically it
0

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
KjartaneAuthor Commented:
I understand that transparent is more convenient, but I really would like to use vtp server mode on the switch. I.m going to expand this in a live configuration with 2 more routers and ospf protocol. I got 3 routers connected in a series, with serial link, running ospf protocol. I will add this switch to hook up more pc's in one end, and these are supposed to have contact with the whole network. Not sure how I can explain this, since I'm not too familiar with this. Could you try to give me a input on vtp server and client config to get this to work?
0
Ken BooneNetwork ConsultantCommented:
So vtp is just a protocol that cisco switches uses to communicate vlan information between switches.  It has nothing to do with routers or with routing.  So if you have 3 cisco switches connected together, you could do the following:

One each switch manually add vlan 1, 2, and 3

Or you could set one switch to vtp mode server and the other switches to vtp mode client

Then define vlan 1,2 and 3 on the vtp server switch and it will tell the other switches about those vlans via vtp.

So if you have a100 switches, you can see how easy it would be to use vtp to add a new vlan.

The problem is that if you inadvertently add a switch that you have been playing with in a lab, to your network and it is set for vtp mode server, and it possible has a higher reviision number on its vtp table, then it will pass its vlan information to the rest of the network, possibly wiping out all the vlans on all your switches effectively taking you down.  So that is why it is not recommended to run vtp because of the risk if it is not handled carefully.

I manage one particular network with approximately 180 switches and we run vtp mode transparent for safety reasons.  We have had an engineer kill half the network when we were running vtp.
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

KjartaneAuthor Commented:
Thank you. It's working now. So easy when you know how. Thanks for quick responses.
0
lrmooreCommented:
Agree with Kenboonejr above, with some caveats.
VTP is used between switches exclusively, and has many redeaming qualities when you have more than 2 switches. It also allows for authentication, so when you setup the VTP domain, always set the authentication, too. This prevents someone from accidently wiping out your vlan configs (done it myself once, and saw someone else do it, too, so it does happen).
Of course, when you only have one switch, all that is irrelevant.
Between the router and the switch, all you have to worry about is the trunking and you have a perfect example posted above.
Depending on which switch you have, how you actually define the vlans may be different. Some you can do in native IOS some you have to be in Vlan database mode. You also have to make sure it support 802.1q trunking and not just ISL.  What exact model switch are we talking about here?
0
KjartaneAuthor Commented:
Hi Irmoore. Nice to see that this site is loaded with people who knows what they are talking about. :)
It's an 2950T 24p switch.
0
KjartaneAuthor Commented:
I'm pretty new at this, but I try my best to learn this. Thinking about CCNA exam after the summer, so I see I have a lot of work to do. Very nice to have this site explaining me what goes were and why. I get confused sometimes when I read, and googles a lot, but this site is genius.
0
lrmooreCommented:
We're here any time you need us.
0
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 Operations

From novice to tech pro — start learning today.