Solved

vtp and vlan on cisco switch and router

Posted on 2009-06-27
8
1,021 Views
Last Modified: 2012-05-07
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?
0
Comment
Question by:Kjartane
  • 4
  • 2
  • 2
8 Comments
 
LVL 24

Accepted Solution

by:
Ken Boone earned 250 total points
ID: 24728550
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
 

Author Comment

by:Kjartane
ID: 24728594
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
 
LVL 24

Assisted Solution

by:Ken Boone
Ken Boone earned 250 total points
ID: 24728631
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
 

Author Closing Comment

by:Kjartane
ID: 31597580
Thank you. It's working now. So easy when you know how. Thanks for quick responses.
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 79

Expert Comment

by:lrmoore
ID: 24728727
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
 

Author Comment

by:Kjartane
ID: 24728980
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
 

Author Comment

by:Kjartane
ID: 24728990
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
 
LVL 79

Expert Comment

by:lrmoore
ID: 24729340
We're here any time you need us.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

This tutorial will go through the steps required to write a script that will back up the configuration settings of a HP-ProCurve switch. You will need to get the following things to follow this tutorial: Telnet Scripting Tool e.g. TST10.exe …
David Varnum recently wrote up his impressions of PRTG, based on a presentation by my colleague Christian at Tech Field Day at VMworld in Barcelona. Thanks David, for your detailed and honest evaluation!
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now