?
Solved

vtp and vlan on cisco switch and router

Posted on 2009-06-27
8
Medium Priority
?
1,032 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 25

Accepted Solution

by:
Ken Boone earned 1000 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 25

Assisted Solution

by:Ken Boone
Ken Boone earned 1000 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
Turn your laptop into a mobile console!

The CV211 Laptop USB Console Adapter provides a direct Laptop-to-Computer connection for fast and easy remote desktop access with no software to install.

 

Author Closing Comment

by:Kjartane
ID: 31597580
Thank you. It's working now. So easy when you know how. Thanks for quick responses.
0
 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Getting hacked is no longer a matter or "if you get hacked" — the 2016 cyber threat landscape is now titled "when you get hacked." When it happens — will you be proactive, or reactive?
WARNING:   If you follow the instructions here, you will wipe out your VTP and VLAN configurations.  Make sure you have backed up your switch!!! I recently had some issues with a few low-end Cisco routers (RV325) and I opened a case with Cisco TA…
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…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Suggested Courses

770 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