<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>VKernel.co.uk - Your interface to the world</title>
	<atom:link href="http://www.vkernel.co.uk/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.vkernel.co.uk</link>
	<description>&#34;Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world.&#34;</description>
	<lastBuildDate>Thu, 24 Jun 2010 10:29:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Nvidia Drivers and Fedora 13 / New Kernel Upgrade</title>
		<link>http://www.vkernel.co.uk/?p=137</link>
		<comments>http://www.vkernel.co.uk/?p=137#comments</comments>
		<pubDate>Thu, 24 Jun 2010 10:29:36 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.vkernel.co.uk/?p=137</guid>
		<description><![CDATA[For sadism, i wanted to see how badly I could break my system so i decided to run &#8220;yum upgrade&#8221; via an X session. Rebooted, and saw that my normal loading page was tucked in the top left hand corner. This then dissappeared and gave me green/red lines, noise, etc. I booted from another Linux [...]]]></description>
			<content:encoded><![CDATA[<p>For sadism, i wanted to see how badly I could break my system so i decided to run &#8220;yum upgrade&#8221; via an X session. Rebooted, and saw that my normal loading page was tucked in the top left hand corner. This then dissappeared and gave me green/red lines, noise, etc.</p>
<p>I booted from another Linux OS and trawled through xorg.logs in /var/log/ and found it was struggling to discover my Screen0 for some reason. For fun, i decided to run &#8220;yum remove nvidia-x11-xorg..&#8221; (cant remember the exact syntax):</p>
<p>xorg-x11-drv-nvidia.i686 : NVIDIA&#8217;s proprietary display driver for NVIDIA graphic cards</p>
<p>I then tinkered with rewriting xorg.conf etc and managed to get it back to a running X session, granted at 800&#215;600 (shudder).</p>
<p>I then ran &#8220;nvidia-xconfig&#8221; to regenerate my xorg.conf for Nvidia now the drivers were re-installed, and then rebooted. Same problem again. Hmm.</p>
<p>After rinse-repeating this process, I twigged the problem &#8211; the &#8220;xorg-x11-drv-nvidia&#8221; drivers were showing as &#8220;&#8230;2.6.32.12-115&#8243; whereas my new kernel was definitely a 2.6.32.14-127. After rebooting and choosing the 2.6.32.12-115 kernel, automagically everything sprang back into life again.</p>
<p>Moral of the story &#8211; dont be a feckwit like me and do something like this, but if you do, try and boot from the kernel which matches the version of Nvidia drivers as above.</p>
<p>HTH</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vkernel.co.uk/?feed=rss2&amp;p=137</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rhythmbox: How to add plugins</title>
		<link>http://www.vkernel.co.uk/?p=133</link>
		<comments>http://www.vkernel.co.uk/?p=133#comments</comments>
		<pubDate>Sat, 01 May 2010 10:16:12 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Rhythmbox]]></category>

		<guid isPermaLink="false">http://www.vkernel.co.uk/?p=133</guid>
		<description><![CDATA[So I have had a bit of a &#8220;mod session&#8221; today; I wanted to get embedded terminal windows working in my desktop using Compiz &#8211; after which i decided to see what mod&#8217;s i can get for Rhythmbox (my music player de jour). Now Rhythmbox doesnt particularly make it easy for users to add their [...]]]></description>
			<content:encoded><![CDATA[<p>So I have had a bit of a &#8220;mod session&#8221; today; I wanted to get embedded terminal windows working in my desktop using Compiz &#8211; after which i decided to see what mod&#8217;s i can get for Rhythmbox (my music player de jour).</p>
<p>Now Rhythmbox doesnt particularly make it easy for users to add their own plugins via the GUI, so you will need to do it via the terminal / CLI. In this example, I will be installing the &#8220;Jump to playing&#8221; plugin for Rhythmbox (download here <a href="http://www.stevenbrown.ca/blog/files/2008/10/jump-to-playing-0.3.1.tar.gz">jump-to-playing-0.3.1.tar.gz ).</a></p>
<p>First, download the file to your standard directory. Mine is /home/Sam/Downloads . Then, fire open a CLI / Terminal window and change directory to where you downloaded the file to, i.e.</p>
<p><span style="text-decoration: underline;">cd /home/Sam/Downloads</span></p>
<p>Now, you will need to extract the .tar.gz file using a command like below:</p>
<p><span style="text-decoration: underline;">tar -zxvf jump-to-playing-0.3.1.tar.gz</span></p>
<p>In situations like the above, tab complete is your best friend. You will now have a folder created with files inside at the location /home/Sam/Downloads/jump-to-playing . You now need to get these files into Rhythmbox in order to get the plugins to work. Fortunately, Rhythmbox in this sense has been kind and made it fairly simple. All you need to do, is copy the folder <span style="text-decoration: underline;">and all its contents</span> to /usr/lib/rhythmbox/plugins using a command such as:</p>
<p><span style="text-decoration: underline;">sudo cp -R jump-to-playing/ /usr/lib/rhythmbox/plugins/</span></p>
<p>This command needs to be ran when your current directory is the Downloads folder. Once you have done this, Close/re-open Rhythmbox and go to &#8220;Edit -&gt; Plugins&#8221; and voila, your new plugin is available to use.</p>
<p>Sam</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vkernel.co.uk/?feed=rss2&amp;p=133</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Packet Capture &#8211; Size manipulation</title>
		<link>http://www.vkernel.co.uk/?p=130</link>
		<comments>http://www.vkernel.co.uk/?p=130#comments</comments>
		<pubDate>Fri, 30 Apr 2010 13:13:39 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[General Site]]></category>

		<guid isPermaLink="false">http://www.vkernel.co.uk/?p=130</guid>
		<description><![CDATA[Splitting a very large packet capture If a packet capture is over a certain file size, i.e. 300Mb+, it may be beneficial for processing / distribution purposes to split it into smaller chunks. You can do this using the &#8220;editcap&#8221; Wireshark command. (For Windows) &#8211; Firstly, copy the packet capture to your &#8220;C:\Program files\Wireshark&#8221; folder. [...]]]></description>
			<content:encoded><![CDATA[<h3>Splitting a very large packet capture</h3>
<p>If a packet capture is over a certain file size, i.e. 300Mb+, it may be beneficial for processing / distribution purposes to split it into smaller chunks. You can do this using the &#8220;editcap&#8221; Wireshark command.</p>
<p>(For Windows) &#8211; Firstly, copy the packet capture to your &#8220;C:\Program files\Wireshark&#8221; folder. Then use the &#8220;capinfos -c&#8221; command on the packet capture to find out how many packets it contains, as below:</p>
<pre>C:\Program Files\Wireshark&gt;capinfos -c samplepacketcapture.cap
File name: samplepacketcapture.cap
Number of packets: 1070031
</pre>
<p>As we have 1,070,031 packets, it may be beneficial to split them into pcaps of 50,000 each:</p>
<pre>C:\Program Files\Wireshark&gt;editcap -c 50000 samplepacketcapture.cap
</pre>
<p>When the command has completed succesfully, there will be an amount of small .cap files in the same directory of 50,000 packets each.</p>
<p><a name="Merging_lots_of_packet_captures_into_a_single_Pcap"></a></p>
<h3>Merging lots of packet captures into a single Pcap</h3>
<p>Sometimes we may wish to merge multiple packet captures i.e. 4-5 100Mb Packet Captures into a single one for analysis and to remove errors such as &#8220;Ack received for unknown packet&#8221; etc. To do this, (For Windows) &#8211; Firstly, copy the packet capture to your &#8220;C:\Program files\Wireshark&#8221; folder. Then, we can use the &#8220;mergecap.exe&#8221; program, similar to how editcap works.</p>
<pre>C:\Program Files\Wireshark\mergecap.exe -w master-cap.cap subcap1.cap
subcap2.cap subcap3.cap
</pre>
<p>In this command, we are merging subcap1 &#8211; subcap3 into a few file, called master-cap.cap.</p>
<p>Thats all there is to it. For references, some useful operators are:</p>
<pre>Usage: mergecap [options] -w &lt;outfile&gt;|- &lt;infile&gt; ...
Output:
 -a                concatenate rather than merge files.
                   default is to merge based on frame timestamps.
 -s &lt;snaplen&gt;      truncate packets to &lt;snaplen&gt; bytes of data.
 -w &lt;outfile&gt;|-    set the output filename to &lt;outfile&gt; or '-' for stdout.
 -F &lt;capture type&gt; set the output file type; default is libpcap.
                   an empty "-F" option will list the file types.
 -T &lt;encap type&gt;   set the output file encapsulation type;
                   default is the same as the first input file.
                   an empty "-T" option will list the encapsulation types.
 -h                display this help and exit.
 -v                verbose output.
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.vkernel.co.uk/?feed=rss2&amp;p=130</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tcpdump &#8211; Usage and operators</title>
		<link>http://www.vkernel.co.uk/?p=126</link>
		<comments>http://www.vkernel.co.uk/?p=126#comments</comments>
		<pubDate>Fri, 30 Apr 2010 13:10:36 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[tcpdump]]></category>

		<guid isPermaLink="false">http://www.vkernel.co.uk/?p=126</guid>
		<description><![CDATA[&#8220;tcpdump&#8221;: Installation and Options TCPDump is a de facto packet capturing tool for Linux, Unix etc. Its usage is outlined below. Installation is very often not required as it is bundled with most operating systems; if not then there are various ways to install using apt-get install, yum install, etc or you can download the [...]]]></description>
			<content:encoded><![CDATA[<h4>&#8220;tcpdump&#8221;: Installation and Options</h4>
<p>TCPDump is a de facto packet capturing tool for Linux, Unix etc. Its usage is outlined below.</p>
<p>Installation is very often not required as it is bundled with most operating systems; if not then there are various ways to install using apt-get install, yum install, etc or you can download the source and compile accordingly.</p>
<p>To run tcpdump, you simple need to run the command &#8220;tcpdump&#8221; from CLI as such:</p>
<pre>root@SRM-TAC-2010:~# tcpdump
</pre>
<p>There are many TCP dump flags which are useful operators; a list of which can be found here <a title="http://www.tcpdump.org/tcpdump_man.html" rel="nofollow" href="http://www.tcpdump.org/tcpdump_man.html">[13]</a>.</p>
<p>Normal usage would be:</p>
<p><strong>1.</strong> List all interfaces we are able to listen on, using the command:</p>
<pre>root@SRM-TAC-2010:~# tcpdump -D
</pre>
<p>This will give you an output such as:</p>
<pre>root@SRM-TAC-2010:~# tcpdump -D
1.eth0
2.any (Pseudo-device that captures on all interfaces)
3.lo
</pre>
<p>As above, the NIC we want to listen to is &#8220;eth0&#8243; as the other 2 are &#8220;all NIC&#8217;s&#8221; and the loopback interface. As such, we will note the integer on the far left, in this example &#8220;1&#8243;.</p>
<p><strong>2.</strong> Now we know we want to listen on interface &#8220;1&#8243;, we run the command:</p>
<pre>root@SRM-TAC-2010:~# tcpdump -i 1
</pre>
<p>This will kick off the windump capture on interface 3, giving an output like so:</p>
<pre>root@SRM-TAC-2010:~# tcpdump -i 1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes

[traffic removed for blog]

10 packets captured
13 packets received by filter
0 packets dropped by kernel
</pre>
<p><strong>3.</strong> Obviously, we dont want to output it to CMD as its very hard to process in tools such as Wireshark and we dont want to be copying and pasting etc. So we run the command using the -w switch which tells the program to write (-w) to the file specified directly after (parameter), as such:</p>
<pre>root@SRM-TAC-2010:~# tcpdump -i 1 -w outputfile.txt
</pre>
<p>This will write the packets to the file &#8220;outputfile.txt&#8221; to where you are running the program <strong>FROM</strong> i.e. in my example here, i am in the directory /root running the command &#8220;tcpdump&#8221; therefore my &#8220;outputfile.txt&#8221; is saved in /root/outputfile.txt. If i wanted to, i could create &#8220;/root/files/&#8221;, change directory there &#8220;cd /root/files/&#8221; and then run the command and the logs would be saved there.</p>
<p>If you try and open the &#8220;outputfile.txt&#8221; in vi, cat, etc you will see something along the lines of:</p>
<pre>ÔÃ²¡???*?½?E :#&amp;à–›#P?úð€`
</pre>
<p>However, if you change it from &#8220;outputfile.txt&#8221; to &#8220;outputfile.cap&#8221; &#8211; you can then open it in Wireshark no problem at all for analysis.</p>
<p><strong>4.</strong> However, in Wireshark if you run the command above, you may see the following packet header errors:</p>
<pre>14	0.001629	10.1.1.102	10.1.3.42
SMB	NT Trans Response, &lt;unknown&gt;[Packet size limited during capture]
</pre>
<p>This is regarding the &#8220;Snarf&#8221; (-s) operator for the program. If the packet size is left at default (96) it should be ok for IP/TCP/ICMP/UDP, but may provide errors on things such as SMB, etc. You may need to increase the snarf (snaplen) to avoid seeing this error message; using &#8220;-s 150&#8243; i havent ran into any errors so far. To use the -s flag, use the following:</p>
<pre>root@SRM-TAC-2010:~# tcpdump -i 1 -s 150 -w outputfile.txt
</pre>
<p>This will result in packet captures being actually usable in Wireshark as below:</p>
<pre>14	0.001500	10.1.1.102	10.1.3.42
SMB	NT Trans Response, NT NOTIFY
</pre>
<p><strong>5.</strong> We may be inclined to use the option &#8220;-vvv&#8221; (&#8220;even more, even more verbose&#8221;) &#8211; this will give us more in-depth information in the packets i.e. printing telnet options in Hex etc &#8211; the command syntax as below:</p>
<pre>root@SRM-TAC-2010:~# tcpdump -i 1 -s 150 -w outputfile.txt -vvv
</pre>
<p>This should give a very readable, useful packet capture. Finally, we may wish to limit the amount of packets we capture, we can do this using the -c (small c) flag, as such:</p>
<pre>root@SRM-TAC-2010:~# tcpdump -i 1 -s 150 -w outputfile.txt -vvv -c 15000
</pre>
<p>This will limit the # of packets captured to 15000.</p>
<p>Hope this helps!</p>
<p>Sam</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vkernel.co.uk/?feed=rss2&amp;p=126</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Path MTU Discovery</title>
		<link>http://www.vkernel.co.uk/?p=124</link>
		<comments>http://www.vkernel.co.uk/?p=124#comments</comments>
		<pubDate>Thu, 29 Apr 2010 11:00:21 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[ICMP]]></category>
		<category><![CDATA[PMTUD]]></category>

		<guid isPermaLink="false">http://www.vkernel.co.uk/?p=124</guid>
		<description><![CDATA[Path MTU  Discover (PMTUD) from herein is a technique for determining the MTU size on a network path beetween 2 IP addresses; the source IP and the destination IP (reference the previous blog post on TCP flows). The network path is the path in which the packets/datagrams have to traverse in order get from sourceip:port [...]]]></description>
			<content:encoded><![CDATA[<p>Path MTU  Discover (PMTUD) from herein is a technique for determining the MTU size on a network path beetween 2 IP addresses; the source IP and the destination IP (reference the previous blog post on TCP flows).</p>
<p>The network path is the path in which the packets/datagrams have to traverse in order get from sourceip:port to destinationip:port. This path can include router interfaces, firewall interfaces, switch interfaces, etc. All of which will have an MTU value (Maximum Transmission Unit). This MTU value is simply a filter, which if the packet exceed it will be dropped. Say for example, the router interface we are going via has an MTU of 1422 (this is in bytes). If we transmit packets with a size of 1522, the packets will either be dropped if the sending TCP stack has the DF (Dont Fragment) bit set; or the packet will be fragmented which does affect network performance.</p>
<p>Now the problem is you need to either set all MTU&#8217;s to a fixed value on your ethernet LAN (1500, for example) and then ensure all packets transmitted comply with this, accept that fragmentation will happen &#8211; for example when using an MTU of 9000 with jumbo frames, or use PMTUD.</p>
<p>PMTUD is relatively simple in its complexity. If enabled, the packet will be sent out with a size of 1522. When it hits the interface with a MTU 1422, which it cannot pass through, the packet is dropped and a message is sent back to the sender saying &#8220;It was too big, the MTU of the interface was 1422&#8243;. The sender will then update their MTU to 1422, and re-send. It will now pass through the first interface as its size is now =&lt; 1422.</p>
<p>It does this repeatedly until it reaches the destination IP; once it can achieve such a path it can be said the path MTU is 1422 (if no further interfaces with lower MTU&#8217;s are found).</p>
<p>Delving a little more into the details, the way this &#8220;It was too big, the MTU of the interface was 1422&#8243; message is relayed back to the source IP is via ICMP. The router will send an ICMP &#8220;Fragmentation Needed&#8221; message back to the source IP, containing the MTU value in question (1422). The ICMP &#8220;Fragmentation Needed&#8221; message, for reference, is Type 3, Code 4.</p>
<p>The problem with such a feature is the fact that ICMP is often misunderstood and misconfigured. Some security personnel see it as the devil and as such block all ICMP. If this happens, the connections will complete at a TCP level (SYN, SYNACK, ACK) and establish a flow, however the connection will &#8220;hang&#8221; when the data begins transfer. This state is often referred to as a &#8220;black hole connection&#8221;. Therefore i stress that if you are indeed going to use PMTUD, ensure that the ICMP path beetween hosts is also clear and alive.</p>
<p>Sam</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vkernel.co.uk/?feed=rss2&amp;p=124</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TCP: Establishing A Connection</title>
		<link>http://www.vkernel.co.uk/?p=95</link>
		<comments>http://www.vkernel.co.uk/?p=95#comments</comments>
		<pubDate>Sat, 24 Apr 2010 19:58:11 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[General Site]]></category>
		<category><![CDATA[Connection]]></category>
		<category><![CDATA[Flow]]></category>
		<category><![CDATA[Socket]]></category>
		<category><![CDATA[TCP]]></category>

		<guid isPermaLink="false">http://vkernel.co.uk/?p=95</guid>
		<description><![CDATA[Now, In my previous post I talked about TCP&#8217;s &#8220;three way handshake&#8221; while realising i hadnt actually written a basic introductory blog about it for people who arent as in-tune with the way of the packet yet Basically, to establish a TCP connection, you will need 4 things: 1. A Destination IP Address 2. A [...]]]></description>
			<content:encoded><![CDATA[<p>Now, In my previous post I talked about TCP&#8217;s &#8220;three way handshake&#8221; while realising i hadnt actually written a basic introductory blog about it for people who arent as in-tune with the way of the packet yet <img src='http://www.vkernel.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Basically, to establish a TCP connection, you will need 4 things:<br />
1. A Destination IP Address<br />
2. A port on that Destination IP Address<br />
3. A Source IP Address<br />
4. A port on that Source IP Address</p>
<p>As you may be aware, an IP Address with a port listening on it is referred to as a &#8220;Socket&#8221;; for example 192.168.1.1:80 is a socket, listening on port 80 typically means this is a HTTP Server.</p>
<p>To establish a TCP connection, you need 2 sockets to be able to talk to each other in order to initiate what is known as a &#8220;flow&#8221;; think of it as a 100m running track, its a straight line with 2 points, a start and a finish. If you dont have a start you cant send anything, if you dont have a finish it&#8217;ll never get there.</p>
<p>This &#8220;flow&#8221; between the 2 sockets is why TCP is typically referred to as a connection oriented protocol, as opposed to UDP which is referred to as connection less.</p>
<p>Anyway, before I digress too far from the crux of the matter: In order to establish a connection to transmit &#8220;data&#8221; over, you must first complete the three way handshake between the 2 sockets. This 3 way handshake consists of two vital flags used in a TCP conversation:</p>
<p>1. SYN (Synchronise)<br />
2. ACK (Acknowledgement)</p>
<p>In the first stage, the Client (Establisher) sends a TCP SYN control segment to the Server (Recipient). This is the first stage of the handshake.</p>
<p>The Server receives this SYN, and in turn sends a SYN-ACK to the client. This ACK confirms Server has recieved the SYN, and in turn he has sent out his own SYN to synchronise with the client. This is the second stage of the three way handshake.</p>
<p>Finally, the client receives the SYN-ACK, and knows that Server got his SYN so he is good to receive communications. Client responds with an ACK to the Servers SYN, saying that he confirms the SYN packet sent by Server. This is the third and final stage of the handshake. Once this is done, it is said that a TCP Connection is &#8220;Established&#8221;.</p>
<p>To give this a metaphorical twist; Joe wants to communicate with Harry over a two-way radio. To ensure that Harry is listening on his send frequency, Joe shouts &#8220;Hello can you hear me?&#8221; down the radio (Stage 1, SYN).<br />
On hearing this, Harry answers with &#8220;Yes, Can you hear me?&#8221; (ACKnowledges Joes original transmission, and sends a SYN of his own).<br />
Finally, Joe knows Harry is listening as he has confirmed his question (ACK&#8217;d), so Joe answers Harrys question (SYN) with a &#8220;Yes&#8221; (ACK). It can now be said that Joe and Harry in an established communication.</p>
<p>Now, you may ask &#8211; what is being done in this SYN stage? Well, technically they are allocating buffer sizes, synchronising sequence numbers and various other variables. You can think of it using the metaphor as they are tweaking the frequency in which they are going to communicate on.</p>
<p>For further background information, there is a very good introductory page here:</p>
<p><a href="http://www.inetdaemon.com/tutorials/internet/tcp/3-way_handshake.shtml">http://www.inetdaemon.com/tutorials/internet/tcp/3-way_handshake.shtml</a></p>
<p>It has some good graphics, etc which help convey the concept.</p>
<p>Hope this helps!<br />
Sam</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vkernel.co.uk/?feed=rss2&amp;p=95</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TCP Flow Control</title>
		<link>http://www.vkernel.co.uk/?p=93</link>
		<comments>http://www.vkernel.co.uk/?p=93#comments</comments>
		<pubDate>Sat, 24 Apr 2010 19:35:04 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Flow control]]></category>
		<category><![CDATA[RETX]]></category>

		<guid isPermaLink="false">http://vkernel.co.uk/?p=93</guid>
		<description><![CDATA[There is a deep misunderstanding of flow control in the industry amongst people; i liken it to subnetting, most people have a hard time understanding it because they dont have the time to sit down and study it. Flow control is simple in its abstract view: Basically the person sending the packets wont send so [...]]]></description>
			<content:encoded><![CDATA[<p>There is a deep misunderstanding of flow control in the industry amongst people; i liken it to subnetting, most people have a hard time understanding it because they dont have the time to sit down and study it.</p>
<p>Flow control is simple in its abstract view: Basically the person sending the packets wont send so many as to over flow the &#8220;buffers&#8221; of the reciever by sending too many packets / too quickly.</p>
<p>By enabling flow control, the receiving party has a way to control this by *explicitly* telling the sender how much buffer space they have available (Note: This is dynamic i.e. constantly changing so the receiver needs to be in constant communication sending updates). This is known as the &#8220;RcvWindow&#8221; field in the TCP segment. If you look in Wireshark you can see a &#8220;WIN&#8221; field which speaks to this:</p>
<p>578	22.020649	192.168.0.3	69.63.176.179	TCP	36272 &gt; http [SYN] Seq=0 Win=5840 Len=0 MSS=1460 TSV=877827 TSER=0 WS=6</p>
<p>&#8220;WIN&#8221; of 5480 means that my local client 192.168.0.3 is telling the BBC Server during my &#8220;SYN&#8221; packet (1st packet of three during the &#8220;Three way handshake&#8221; (Covered later)) that I can receive 5840 bytes at a time.</p>
<p>Now, the sender, when flow control is enabled, will keep the amount of transmitted, but un ACKnowledged (no ACK response from reciever to confirm receipt of packet) data less than the most recently received RcvWindow from the client. In TCP, there are 2 key fields for this topic; &#8220;RcvWindow&#8221; which is the amount of spare room in the buffer, and &#8220;RcvBuffer&#8221; which is the size of the receive buffer.</p>
<p>Now, Flow control is interesting in performance environments as sometimes users / architects can see negative results when enabling flow control. Key point here, is that flow control MUST be enabled END TO END. That means that from the NIC on the PC, to the switchport attached to the PC, to the switchport attached to the server (for example) to the NIC on the server in use. If end to end flow control is not in use then you will end up with bottle necks and high rates of retransmissions causing congestion on certain LAN segments.</p>
<p>Congestion is typically detected by lost packets (high retransmit / RETX rate), and large delays in the time stamps beetween packets (again, could cause send mechanisms to hit timer and RST and RETX the packets).</p>
<p>There is a really good powerpoint presentation available here:</p>
<p><a href="http://www.cs.fsu.edu/~zzhang/CNT5505_Fall_2008_files/week12_2.ppt">http://www.cs.fsu.edu/~zzhang/CNT5505_Fall_2008_files/week12_2.ppt</a></p>
<p>This talks to the reasons of Congestion and has some great diagrams which talk to how it can occur and how flow control helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vkernel.co.uk/?feed=rss2&amp;p=93</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
