VLAN routing overhead
-
I agree that in duplex you can have up and down on the wire at the same time - ie a packet in both directions.. And if marketing wants to call it 2gpbs - that is marketing ;) Just like they market PHY for wireless…
My point is that there can only ever be 1 packet on a wire at any given time - be it the up wire (tx) or the down (rx) wire. If you trunk and have more than 1 vlan on the trunk, and these vlans talk to each other then the packet has to travel this wire twice once going to the router, once coming back to the switch. And to be honest doesn't even matter that only 1 packet can actually be on the wire at a time.. Its the fact that packet has to travel the same road twice. And the road is X wide, if you double up the times a packet travels this road then X /2 is just plain fact doesn't matter if you want to call it 2gbs pr not. When your machine moves a file it sure and the F does not get 2gbps does it.. When your wifi client is on wifi does it really get 300mbps ;) On 2x2 N connection??
Therefore does not matter how much bandwidth you say the wire has be it gig, 2 gig, 10 gig the fact that your hairpinning and packet has to travel the same road twice be it the same actual.. You guys are all thinking copper here -- fiber is full duplex as well ;) the tx and the rx.. Still same thing happens! when you hairpin to total available bandwidth is going to be /2 if device in vlan A is talking to vlan B and those are trunked on the same uplink.
Seem to be hung up on the actual phy make up of the road.. Which doesn't matter at all.. Its the fact that is a hairpin and your data is traveling the same road more than once that /2 the data that road can carry..
If your designing a network and you have vlan A that sends lots of data or gets lots of data to B.. I sure would not put them on the same uplink to your router.. A and B should be on their own uplinks or they should be in different trunks that uplink.. So lets say you have A, B, C and D for vlans and A and B do lots of chatter between them and moving data.. You don't put them on the same trunk you would to use 2 trunks and do it AC on 1 and BD on the other so that your not hairpinning when A and B talk. C or D could be using up the bandwidth when A and B are talking and still cause you a shared bandwidth problem. But atleast when A and B talk to each other its not a hairpin..
-
I agree that in duplex you can have up and down on the wire at the same time - ie a packet in both directions..
Great.
As we seem to have a hard time understanding each other I have to ask if you actively avoid the bandwidth part of my statement or if you agree on that as well. Does a full duplex gigabit ethernet allow traffic to flow at 1 Gbps up and 1 Gbps down at the same time?
In other words, can we agree on that a full duplex ethernet connection can be logically thought of as two independent one-way wires/channels/roads, with one leading up to a node (in this case a router) and the other leading down from it and since they are one-way paths packets can flow with 1 Gbps in both directions concurrently?
The above is very important here as that as far as I can tell was the part Jahonix got confused about.
-
1Gb/s link is 1Gb/s in both directions at the same time, the definition of full-duplex is that it's possible to transmit in both directions at the same time on the same medium. However, the two directions can never be mixed/merged together to form a faster link so both individual channels must be 1Gb/s or you would never be able to reach the transfer rates you're accustomed to on a gigabit network, only half of the rates if the opposite was true.
-
I think you getting tied up in the technical aspects of the link, yes its a tx and rx path that in theory can do 1gpbs in each direction. But that is not what you see in real world in how the exchange of information is done in tcp..
If I am pulling a file from a server B to server A - what is the speed at which I can move that file. Its going to be something less than 1Gbps.. If it was actually 2Gbps because its full duplex why do they not call it a 2Gbps connection ;)
Why does your interface never show its moving more than 1Gpbs? Even when you send a file and copy a file at the same time to the same server on the same switch why do you not see the interface go above its 1Gbps ;)
If your running gig - its a given that is full duplex. Yet a file from server A to server B is never going to be faster than your 1Gbps connection. Since I can only move a file at 1Gbps and now since I am sharing the trunk for both the traffic going to the router and then back down from the router for another vlan over the trunk the real world bandwidth that I can move my file is going to be approx /2 of the bandwidth I could see in moving the file from B to A if B and A were on the same switch.
They call it a 1Gbps interface for a reason ;) Since its "full duplex" if gig then given its full duplex so why do they not call it 2Gbps interface ;) If your using this interface as a trunk for the 2 vlans and both of these vlans are using the 1Gbps interface when moving data between server in vlan A to server or client in vlan B to be routed your now did a hairpin on the router interface and with a hairpin its going to be yes approx /2 the real world data flow if you had 2 different uplinks for these vlans or if each server was just moving data across a switch connected to their own ports in their own vlans - or even if the switch was routing the traffic since your not actually hairpinning a 1Gbps interface..
-
If it was actually 2Gbps because its full duplex why do they not call it a 2Gbps connection
I never claimed that a gigabit full duplex connection should be considered 2 Gbps but yet you've used that in every reply to me. Also instead of trying different ways to explain things when you're not getting through, you make long posts repeating the same things over and over.
I understand now that it's because you want to avoid any discussion and analysis of your /2 statement and instead aim to wear anybody down that question it. Since you're not interested in having a serious discussion I must now give up so mission accomplished for you. It's a pity though, since my reason for being here is to learn. :'(
-
Oh boy, what have I started…
I did some reading of the IEEE 802.3ab standard and what's written is:
we have 1Gbit/s in each direction simultaneously.
(even though each of the 4 twisted pairs are bi-directional [the graphic above is correct], the transceivers can actually send and receive data at the same time. This is done with echo cancellation and adaptive equalization.)As a thought experiment: take two 1Gbit switches and connect them with one CAT5e/6/7 cable.
Each side can send data at 1Gbit/s to the other side simultaneously. It doesn't matter if the packets carry VLAN ID bits or not. Think of UDP traffic so we don't have to account for ACK packets etc.
There is no /2 in the equation until now.I'll digg further when I have the time to (which probably won't be until this weekend).
-
"Think of UDP traffic so we don't have to account for ACK packets etc."
Because yeah that what the enterprise and all users use to move files from their workstations to their NAS, etc.
Where did we say there was /2 on a switch.. So did you do that same thought experiment now between your vlans while you upload both those vlans up the trunk.. So up down the same wire - how much bandwidth do you get now?? Its a hairpin so its /2 the total be you want to discuss that its really 2 gig because its full duplex..
I am more than happy to have a discussion - what I am having a hard time understanding is what you do not understand about actual HAIRPIN?? It's a gig interface - you can only move data across it from one server to another server at a gig.. No I am not talking UDP across a switch port…. I am talking real world applications hairpin through a trunk to a router.. In this thought experiment do your udp test with that.. Do you still see your 2 gig total or not? Or did we now just cut it in 2 because your going up and then down the same wire twice vs once.. So you see what 1 gig do you not. So if in real world my clients only move 1 gig when doing a file copy, and then I hairpin it what happens to my gig - yeah 500mbps.. Be its full duplex or not..
If you can not grasp what a hairpin is - then I suggest you actually TEST it.. And see how you still get your gig on a hairpin because you think your really have 2 gig to play with because its full duplex..
So in our thought experiment and full duplex streaming UDP traffic at each other from 2 pc's at 1 gig each.. Ok there you have 2 gig.. This is the picture on the left.. red is 1 gbps, green is 1gbps
Now look at the picture at the right.. My PC still streaming 1 gig udp out and the other PC is streaming 1 gbps to the other machine.. But to get to each other they have to go through a hairpin via the trunk port to the router.. This connection still only has full duplex.. But how many red arrows are there, how many green arrows are there.. There is twice as many on the wire so there is you /2!!
So each side of the duplex has both gbs stream at the same time so now that uplink is 4gbs??? No since we know that is not the case -- guess the speed is going to be cut in half or /2 now isn't it..
So in a real world conversation while yes there is data flow in both directions.. Just like on the switch when I move a file via tcp you have packets with data, then you have your packets back with acks.. Flowing in both directions.. But my speed in my file transfer is something less then gig.. Now when I have to go up and then down the same wire to move those packets - what happens to the data.. Yeah that right /2..
Why this has had to drag on for so long I don't get.. It's a 1 gig connection, your moving the data up and then down the only 1 connection.. So how is it not just obvious that its /2??? You comprehend that if vlan A was trying to download from say the internet on that router, and vlan B was trying to download from the internet. That they would share the 1 gig uplink and their max speed would be /2 of whatever the internet speed was. But since they are talking each other which means up and down the same trunk that is also /2 but this doesn't make sense to you? That we have to break out the crayons is just freaking crazy!
-
…the transceivers can actually send and receive data at the same time.
Yes, I found another graphic on a Cisco site that shows that it is 4*250 full duplex (send and receive at the same time) better but now we don't need that. :D
In my opinion going down to actual physical wire pairs may be more confusing (as it was to you). We only need to think of the connection as two channels, one up and one down and they're at 1 Gbps concurrently. If we settle on that, all this theory applies regardless of copper or optics are being used on the physical layer.
As a thought experiment: take two 1Gbit switches and connect them with one CAT5e/6/7 cable.
Each side can send data at 1Gbit/s to the other side simultaneously.When those computers are in different VLANs and you hairpin that same traffic up to a router, the traffic sent from both computers need to share the channel up to the router and the traffic back out to both computers need to share the down link so throughput will be /2 on each stream. It will be two VLANs competing for access to the same up channel and also on the same down channel.
Let's do two more experiments:
#1. A more interesting case (if we really want to understand what happens) is when that same UDP traffic flows in only one direction, from one sender to a receiver. Then suddenly that stream will flow at 1 Gbps and definitely isn't /2.#2. If in that same scenario we switch to TCP (still with a one-directional traffic flow), the throughput will effectively become the same as half duplex (minus the collisions since we don't need CSMA/CD in this full duplex connection) as the acks going back from the receiver need to share both the up link and then the down link with the actual data stream. A wild guess is that throughput will be around 900 Mbps. At least it should be far better than /2.
The /2 (or /x depending on how many VLANs we hairpin) will be true in a busy large network we're there's always an excess of traffic in all VLANs. On the other hand those networks are hopefully designed by knowledgeable people so less likely to be hairpinned or then at least using link aggregation or faster than gigabit interfaces to mitigate the effect of that shared connection.
If instead we talk about a home network, where probably the majority of the hairpins are deployed because it's there we often need to save money on router interfaces, the traffic is much more likely to be unevenly distributed between the VLANs. A DMZ may only see traffic occasionally when you want to check the ip cameras when nobody is at home (and therefore the other VLANs will have very little traffic). The administrative network will probably have a pretty low load. If we have a file server in a separate network, we're likely to see far better throughput than /2 when a single client up or download a file to it.
-
"A wild guess is that throughput will be around 900 Mbps. At least it should be far better than /2."
You go ahead and try that in real world.. Lets not forget the overhead.. Lets not forget that there collision domains there on each wire.. There can only ever be 1 packet on each wire.. Be it that is a full frame or an ack.. Lets not forget the all the other noise that is on a vlan that will be traveling the trunk, etc.
900… Yeah good luck seeing that on a switch between 2 machines.. That is your typical normal wire speed of a 1 gig interface.. We just talked that your sharing the pipe both up and down how is it not /2?
Do we really need to break out iperf and trunk some ports?
While I agree that in a home network your going to have very sporadic traffic flow.. But we are talking about design of the network not ins and out if its .5 or .6 or .4 in the ratio of traffic flow when you hairpin.. Like what is the real world bandwidth of wifi.. You /2 the number on the box puts you right in the ball park of what the actual real world speed is vs the PHY they report.
If your wanting to move files between your workstation and your NAS, I would put them on the same network or if your going to put them on different networks that those networks use their own uplinks to the router. Or you going to be back here asking why your performance between your workstation and your nas sucks when it routes through pfsense ;)
-
this is a hairpinned vlan setup, in production, around 300 clients behind it.
"LAN" is the parent interface for all the vlans. (oh yea, pfsense is running on esxi)