06-11-2012 07:49 PM - edited 03-07-2019 07:11 AM
Hello,
I have some PC which require running in environment with VLAN. However, some of them could not configure with VLAN tag but some can. So simple drawing
PC (cannot config VLAN) <-----> CISCO 2960 <-----> Server (can support VLAN tag)
How should I config it? Example
!PC
interface FastEthernet0/9
switchport access vlan 20
switchport mode access
!Server
interface FastEthernet0/9
switchport access vlan 20
switchport mode access
or
interface FastEthernet0/9
switchport mode truck
switchport trunk allowed vlan 20
Thanks!
06-11-2012 07:54 PM
Machi Ma wrote:
Hello,
I have some PC which require running in environment with VLAN. However, some of them could not configure with VLAN tag but some can. So simple drawing
PC (cannot config VLAN) <-----> CISCO 2960 <-----> Server (can support VLAN tag)
How should I config it? Example
!PC
interface FastEthernet0/9
switchport access vlan 20
switchport mode access
!Server
interface FastEthernet0/9
switchport access vlan 20
switchport mode access
or
interface FastEthernet0/9
switchport mode truck
switchport trunk allowed vlan 20
Thanks!
Generally speaking, there should be no need to configure a VLAN tag on an end device such as a PC or server *unless* that device runs some form of VM or multiple-machine and has a virtual NIC or trunk requirement.
You should just be able to configure both your PC and your server with an IP address and no VLAN tag, and plug them into access ports such as your first example.
*If* your server does need multiple VLAN's on the one physical NIC (and supports VLAN tagging), then you need a combination of your two scenarios - configure your PC as an access port in VLAN 20, and your server port as a trunk with VLAN20 as an allowed VLAN, then configure your server VNIC with VLAN 20 and an appropriate IP address.
The only time you should need the latter is if you're doing virtualisation on your server, and need servers in different VLAN's for some reason. Otherwise two access ports should just work - as long as you DON'T tell your server to add a VLAN tag.
Cheers.
06-11-2012 08:27 PM
Hello,
Thanks for your suggestion. I will try it.
Additional question is that PC also require to access another VLAN say VLAN 30. That means access VLAN 20 and VLAN 30 too. How should I config in switch?
Thanks!
06-12-2012 05:27 PM
Machi Ma wrote:
Hello,
Thanks for your suggestion. I will try it.
Additional question is that PC also require to access another VLAN say VLAN 30. That means access VLAN 20 and VLAN 30 too. How should I config in switch?
Thanks!
The PC needs to only be in one VLAN. Routing between VLAN's should be done either via an SVI on the switch (interface VLAN20 and interface VLAN30 rather than VLAN20 and VLAN30), or via an external router which is connected to each VLAN.
06-11-2012 08:46 PM
Pc should only be in one Vlan. That Vlan should be routed by layer 3 switch or router to the other Vlan.
Sent from Cisco Technical Support iPhone App
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide