cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Community Helping Community

1761
Views
5
Helpful
9
Replies
Highlighted
Beginner

What happens when switch trunk port connected to PC?

If 2 PC connected to trunk port, can they still ping each other? What is the reason behind if they can or cannot?

Everyone's tags (1)
3 ACCEPTED SOLUTIONS

Accepted Solutions
Beginner

Re: What happens when switch trunk port connected to PC?

Hello Getaway51,

 

Yes they can, but the native must be the same on both ports.

The reason is simple, when PC1 send the frame to the switch, the switch put a tag of vlan in the frame. (Native VLAN). When the switch send the frame to the PC2, this tag are stripped from frame.

 

Image12001.gif

 

View solution in original post

VIP Advisor

Re: What happens when switch trunk port connected to PC?

Better still:

 

!
interface range fa0/1-24
  switchport mode trunk
  switchport trunk native vlan 10
!

View solution in original post

Hall of Fame Master

Re: What happens when switch trunk port connected to PC?

There some things that we do not know about the environment that you are suggesting and so we must make some assumptions. You have not identified whether these switches are layer 2 switches or whether they might be layer 3 switches. I am assuming that they are layer 2 and not layer 3 switches. You have not specified whether there is any device connected in the network providing routing between subnets. I am assuming that there is not any layer 3 routing being performed. Some PCs have ethernet cards that understand trunking and can process ethernet frames with vlan tags but most PC ethernet cards do not process ethernet frames with vlan tags. I am assuming that these PC do not process vlan tags. Can you verify whether these assumptions are correct?

 

Based on those assumptions here is my explanation:

The PC connected on fa0/24 will be sending ethernet frames with no vlan tag. So the switch will treat the PC as a member of vlan 10. Frames from the PC in vlan 10 can be forwarded to other devices in vlan 10, including being sent to other switches that participate in vlan 10. If there are PCs connected on other switches in vlan 10 then this PC and those PCs in vlan 10 should be able to communicate (and this is based on another assumption which is that all devices that belong to vlan 10 are configured with IP addresses in the same IP subnet).

 

Perhaps another way to think about this starts from the understanding that an arp request is sent out as a broadcast frame. So if this PC sends an arp request in vlan 10 then the switch will forward the arp request throughout vlan 10. If there are other switches connected to this switch on vlan 10 then the arp request is forwarded to those switches, and to all devices connected on those switches in vlan 10. So any 2 PCs connected in vlan 10 on separate switches should be able to communicate. 

 

But devices connected in vlan 10 will not be able to communicate with devices in vlan 5 unless there is some device providing layer 3 routing.

 

HTH

 

Rick

If you found this post helpful, please let the community know by clicking the helpful button!
By doing so, and until end of January, you are helping Doctors Without Borders

View solution in original post

9 REPLIES 9
Beginner

Re: What happens when switch trunk port connected to PC?

Hello Getaway51,

 

Yes they can, but the native must be the same on both ports.

The reason is simple, when PC1 send the frame to the switch, the switch put a tag of vlan in the frame. (Native VLAN). When the switch send the frame to the PC2, this tag are stripped from frame.

 

Image12001.gif

 

View solution in original post

Beginner

Re: What happens when switch trunk port connected to PC?

do you mean that each port (from port 0/1-0/24) , I have to set native vlan?

omnisecu.com.sw01(config)#interface fa0/24
omnisecu.com.sw01(config-if)#switchport mode trunk
omnisecu.com.sw01(config-if)#switchport trunk native vlan 10

 something like this? repeat this cmd for 24 times?

VIP Advisor

Re: What happens when switch trunk port connected to PC?

Better still:

 

!
interface range fa0/1-24
  switchport mode trunk
  switchport trunk native vlan 10
!

View solution in original post

Beginner

Re: What happens when switch trunk port connected to PC?

1)Does it means that fa0/24 cant ping fa0/23 & fa0/22?

2)fa0/23 & fa0/22 can ping each other?

omnisecu.com.sw01(config)#interface fa0/24
omnisecu.com.sw01(config-if)#switchport mode trunk
omnisecu.com.sw01(config-if)#switchport trunk native vlan 10
omnisecu.com.sw01(config)#interface fa0/23
omnisecu.com.sw01(config-if)#switchport mode trunk
omnisecu.com.sw01(config-if)#switchport trunk native vlan 5

 

omnisecu.com.sw01(config)#interface fa0/22
omnisecu.com.sw01(config-if)#switchport mode access
omnisecu.com.sw01(config-if)#switchport access vlan 5

 

VIP Advisor

Re: What happens when switch trunk port connected to PC?

In a purely Layer2 environment, your statements are correct.

Hall of Fame Master

Re: What happens when switch trunk port connected to PC?

What you suggest here is kind of interesting. It is quite legitimate though some might say that it was not a proper configuration. In discussing this let us start by reviewing what it means to be native vlan. Trunking using 802.1q inserts tags in the frame to identify individual vlans when a trunk will carry more than one vlan. So the switch uses tags to know whether a particular frame belongs to vlan 1 or to vlan 5 or to vlan 10. Most devices that participate in trunks will understand and process the vlan tags. But some devices (probably including the PCs in your example) do not understand tags. So the trunking protocol specifies that one vlan will be identified as the native vlan and the important thing about the native vlan is that frames in this vlan do not have tags. So the native vlan provides compatibility for devices that do not process vlan tags.

 

If we look into your configuration we see that fa0/22 is an access port in vlan 5. Remember that access ports do not use tags. We see that fa0/23 is a trunk port and that the native vlan is 5. So when the PC connected to fa0/23 sends an ethernet frame with no tag the switch will assume that it is in vlan 5. So the PC on fa0/22 and fa0/23 are in the same vlan. Frames from one are easily forwarded to the other and these two PCs can communicate. We see that fa0/24 is a trunk with native vlan of 10. So when the PC connected to this interface sends an ethernet frame with no tag the switch will assume that it is in vlan 10. A layer 2 switch can not forward frames from one vlan to another vlan. So the PC on fa0/24 can not communicate with the other PCs in vlan 5 without having some layer 3 device to provide routing between vlans.

 

HTH

 

Rick

If you found this post helpful, please let the community know by clicking the helpful button!
By doing so, and until end of January, you are helping Doctors Without Borders
Beginner

Re: What happens when switch trunk port connected to PC?

Is it possible tht frame frm fa0/24 goes to adjacent switch & ping those pc
runnning on vlan 10 (which is the same vlan as fa0/24 native vlan setting)?
Considering tht frame frm fa0/24 are untagged. Can it still talk to others
in the same vlan i.e vlan 10? On the same switch only or all trunk
connected switches?
Hall of Fame Master

Re: What happens when switch trunk port connected to PC?

There some things that we do not know about the environment that you are suggesting and so we must make some assumptions. You have not identified whether these switches are layer 2 switches or whether they might be layer 3 switches. I am assuming that they are layer 2 and not layer 3 switches. You have not specified whether there is any device connected in the network providing routing between subnets. I am assuming that there is not any layer 3 routing being performed. Some PCs have ethernet cards that understand trunking and can process ethernet frames with vlan tags but most PC ethernet cards do not process ethernet frames with vlan tags. I am assuming that these PC do not process vlan tags. Can you verify whether these assumptions are correct?

 

Based on those assumptions here is my explanation:

The PC connected on fa0/24 will be sending ethernet frames with no vlan tag. So the switch will treat the PC as a member of vlan 10. Frames from the PC in vlan 10 can be forwarded to other devices in vlan 10, including being sent to other switches that participate in vlan 10. If there are PCs connected on other switches in vlan 10 then this PC and those PCs in vlan 10 should be able to communicate (and this is based on another assumption which is that all devices that belong to vlan 10 are configured with IP addresses in the same IP subnet).

 

Perhaps another way to think about this starts from the understanding that an arp request is sent out as a broadcast frame. So if this PC sends an arp request in vlan 10 then the switch will forward the arp request throughout vlan 10. If there are other switches connected to this switch on vlan 10 then the arp request is forwarded to those switches, and to all devices connected on those switches in vlan 10. So any 2 PCs connected in vlan 10 on separate switches should be able to communicate. 

 

But devices connected in vlan 10 will not be able to communicate with devices in vlan 5 unless there is some device providing layer 3 routing.

 

HTH

 

Rick

If you found this post helpful, please let the community know by clicking the helpful button!
By doing so, and until end of January, you are helping Doctors Without Borders

View solution in original post

Hall of Fame Master

Re: What happens when switch trunk port connected to PC?

I am glad that our suggestions have been helpful and that you now have a better understanding of trunking, and of vlans. Thank you for marking this question as solved. This will help other participants in the community to identify discussions that have helpful information. I hope to see you continue to be active in the community.

 

HTH

 

Rick

If you found this post helpful, please let the community know by clicking the helpful button!
By doing so, and until end of January, you are helping Doctors Without Borders
CreatePlease to create content
Content for Community-Ad