<?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>Software Engineer Training &#187; Higher Layer Network Protocols</title>
	<atom:link href="http://www.software-engineer-training.com/category/higher-layer-network-protocols/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.software-engineer-training.com</link>
	<description>Knowledge, tools, and methods for defining requirements and performing design, implementation, testing and maintenance</description>
	<lastBuildDate>Wed, 21 May 2008 14:17:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Transmission Control Protocol (TCP)</title>
		<link>http://www.software-engineer-training.com/higher-layer-network-protocols/transmission-control-protocol-tcp/</link>
		<comments>http://www.software-engineer-training.com/higher-layer-network-protocols/transmission-control-protocol-tcp/#comments</comments>
		<pubDate>Sun, 09 Dec 2007 16:09:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Higher Layer Network Protocols]]></category>

		<guid isPermaLink="false">http://www.software-engineer-training.com/higher-layer-network-protocols/transmission-control-protocol-tcp/</guid>
		<description><![CDATA[The Transmission Control Protocol (TCP) is used to provide reliable, in-order delivery of messages over a network.
Reasons for TCP 
The Internet Protocol (IP) works by exchanging groups of information called packets. Packets are short sequences of bytes consisting of a header and a body. The header describes the packet&#8217;s destination, which routers on the Internet [...]]]></description>
			<content:encoded><![CDATA[<p>The Transmission Control Protocol (TCP) is used to provide reliable, in-order delivery of messages over a network.</p>
<p><strong>Reasons for TCP </strong></p>
<blockquote><p>The Internet Protocol (IP) works by exchanging groups of information called packets. Packets are short sequences of bytes consisting of a header and a body. The header describes the packet&#8217;s destination, which routers on the Internet use to pass the packet along, in generally the right direction, until it arrives at its final destination. The body contains the application data.</p>
<p>In cases of congestion, the IP can discard packets, and, for efficiency reasons, two consecutive packets on the internet can take different routes to the destination. Then, the packets can arrive at the destination in the wrong order.</p>
<p>The TCP software libraries use the IP and provides a simpler interface to applications by hiding most of the underlying packet structures, rearranging out-of-order packets, minimizing network congestion, and re-transmitting discarded packets. Thus, TCP very significantly simplifies the task of writing network applications.</p>
<p>Source: <a href="http://en.wikipedia.org/wiki/Transmission_Control_Protocol" title="TCP">http://en.wikipedia.org/wiki/Transmission_Control_Protocol</a></p></blockquote>
<p><!-- Begin BidVertiser code --><br />
<script src="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=84388&amp;bid=238068" language="JavaScript1.1" type="text/javascript"></script><br />
<noscript>&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;a href=&#8221;http://www.bidvertiser.com&#8221;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;marketing&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;</noscript><br />
<!-- End BidVertiser code --></p>
<p><strong> Applicability of TCP<br />
</strong></p>
<blockquote><p> TCP is used extensively by many of the Internet&#8217;s most popular application protocols and resulting applications, including the World Wide Web, E-mail, File Transfer Protocol, Secure Shell, and some streaming media applications.However, because TCP is optimized for accurate delivery rather than timely delivery, TCP sometimes incurs long delays while waiting for out-of-order messages or retransmissions of lost messages, and it is not particularly suitable for real-time applications such as Voice over IP. For such applications, protocols like the Real-time Transport Protocol (RTP) running over the User Datagram Protocol (UDP) are usually recommended instead.</p>
<p>Source: <a href="http://en.wikipedia.org/wiki/Transmission_Control_Protocol" title="TCP">http://en.wikipedia.org/wiki/Transmission_Control_Protocol</a></p></blockquote>
<p style="padding: 10px; text-align: center"><!-- Begin BidVertiser code --><br />
<script src="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=84388&amp;bid=237969" language="JavaScript1.1" type="text/javascript"></script><br />
<noscript>&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;a href=&#8221;http://www.bidvertiser.com&#8221;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;marketing&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;</noscript><br />
<!-- End BidVertiser code --></p>
<p><strong>Using TCP </strong></p>
<blockquote><p>Using TCP, applications on networked hosts can create connections to one another, over which they can exchange streams of data using stream sockets. TCP also distinguishes data for multiple connections by concurrent applications (e.g., Web server and e-mail server) running on the same host.</p>
<p>In the Internet protocol suite, TCP is the intermediate layer between the Internet Protocol (IP) below it, and an application above it. Applications often need reliable pipe-like connections to each other, whereas the Internet Protocol does not provide such streams, but rather only best effort delivery (i.e., unreliable packets). TCP does the task of the transport layer in the simplified OSI model of computer networks. The other main transport-level Internet protocols are UDP and SCTP.</p>
<p>Applications send streams of octets (8-bit bytes) to TCP for delivery through the network, and TCP divides the byte stream into appropriately sized segments (usually delineated by the maximum transmission unit (MTU) size of the data link layer of the network to which the computer is attached). TCP then passes the resulting packets to the Internet Protocol, for delivery through a network to the TCP module of the entity at the other end. TCP checks to make sure that no packets are lost by giving each packet a sequence number, which is also used to make sure that the data is delivered to the entity at the other end in the correct order. The TCP module at the far end sends back an acknowledgment for packets which have been successfully received; a timer at the sending TCP will cause a timeout if an acknowledgment is not received within a reasonable round-trip time (or RTT), and the (presumably) lost data will then be re-transmitted. The TCP checks that no bytes are corrupted by using a checksum; one is computed at the sender for each block of data before it is sent, and checked at the receiver.</p>
<p>Source: <a href="http://en.wikipedia.org/wiki/Transmission_Control_Protocol" title="TCP">http://en.wikipedia.org/wiki/Transmission_Control_Protocol</a></p></blockquote>
<p><!-- Begin BidVertiser code --><br />
<script src="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=84388&amp;bid=238068" language="JavaScript1.1" type="text/javascript"></script><br />
<noscript>&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;a href=&#8221;http://www.bidvertiser.com&#8221;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;marketing&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;</noscript><br />
<!-- End BidVertiser code --></p>
<p><strong>Services Provided by TCP</strong></p>
<p>TCP provides more services than UDP because it is connection oriented whereas UDP is not. TCP allows for point-to-point communication, adressing, multiplexing, demultiplexing, reliability, full-duplex communication, flow control and congestion control.</p>
<p>The reason the whole internet can actually even work is in part thanks to the design of TCP which can dynamically adapt to different properties such as bandwidth, delay and packet loss as well as recover from errors.</p>
<p>TCP splits user data into pieces no larger than 64K bytes and then sends each of these pieces as separate IP datagrams. When these IP datagrams are received at the destination, TCP reconstructs the original byte stream. In order to establish the connection between the sender and destination, sockets are used. Sockets are really just the combination of an IP address and a port number.</p>
<p style="padding: 10px; float: right"><!-- Begin BidVertiser code --><br />
<script src="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=84388&amp;bid=237977" language="JavaScript1.1" type="text/javascript"></script><br />
<noscript>&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;a href=&#8221;http://www.bidvertiser.com&#8221;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;marketing&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;</noscript><br />
<!-- End BidVertiser code --></p>
<p>A connection is established between two computers using what is called a &#8220;three-way handshake&#8221;.</p>
<blockquote><p>The originator (you, hopefully)  sends an initial packet called a &#8220;SYN&#8221; to establish communication and &#8220;synchronize&#8221; sequence numbers in counting bytes of data which will be exchanged.  The destination then sends a &#8220;SYN/ACK&#8221; which again &#8220;synchronizes&#8221; his byte count with the originator and acknowledges the initial packet.  The originator then returns an &#8220;ACK&#8221; which acknowledges the packet the destination just sent him.  The connection is now &#8220;OPEN&#8221; and ongoing communication between the originator and the destination are permitted until one of them issues a &#8220;FIN&#8221; packet, or a &#8220;RST&#8221; packet, or the connection times out.  All the protocols of the Internet which need &#8220;connections&#8221; are built on the TCP protocol.  The &#8220;three way handshake&#8221; establishes the communication.  Much like you picking up your phone, getting a dial tone, dialing the number, hearing ringing, and then the other party saying &#8220;hello&#8221; or &#8220;mushi mushi.&#8221;</p>
<p>Source: <a href="http://www.pccitizen.com/threewayhandshake.htm" title="Three Way Handshake">http://www.pccitizen.com/threewayhandshake.htm</a></p></blockquote>
<p>TCP also closes a connection gracefully. Upon closing, the last data segment is followed by a FIN which also has a sequence number associated with it. This way, if the FIN arrives before all segments are received, it will wait for the expected data before closing.</p>
<p>The biggest source of errors in message transmission come from segments damaged in transmission or segments which entirely fail to arrive. The sender obviously does not know if the message sent has been received at the destination or not so it is necessary in TCP for the receiver to acknowledge receipt. In UDP, since reliability is not a concern and since it is a connectionless protocol, this acknowledgment does not occur.</p>
<p>Of course, we need to switch our point of view as soon as the destination sends an acknowledgment because at this point the receiver is acting as a sender. It is therefore entirely possible that the acknowledgment message gets lost or damaged in transmission as well. Therefore, it is necessary to have timers on both the sender and receiver which trigger a re-send after a certain amount of time to make sure the application does not end up in a dead-lock state where both sides are waiting to receive something from the other.</p>
<p style="padding: 10px; float: left"><!-- Begin BidVertiser code --><br />
<script src="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=84388&amp;bid=237963" language="JavaScript1.1" type="text/javascript"></script><br />
<noscript>&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;a href=&#8221;http://www.bidvertiser.com&#8221;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;marketing&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;</noscript><br />
<!-- End BidVertiser code --></p>
<p>What is the value of the timer? It is possible to have a fixed timer or to use an adaptive scheme. Depending on the network, different value will be more appropriate for different situations and even for a given network, the perfect value can change depending on the amount of traffic on the network. If the timer value is set to be too short, re-transmission will clog the network causing further delay and therefore leading to even more ACK&#8217;s being sent!  This can therefore become a rather messy situation.  Of course, if the timer is set too high, performance will suffer because the delay before re-transmission leads to the application sitting and waiting. Therefore, the ideal timer will have some functionality to be aware of network conditions and then use this information in order to dynamically increase or decrease the timer.</p>
<p>Another problem thatmust be dealt with arises from the fact that TCP re-transmits messages as stated above in order to guarantee transmission. Since messages and ACK&#8217;s may be re-transmitted, we suddenly end up in a situation where it is possible for the destination to receive duplicates. For example, imagine that the receiver sends an ACK in order to confirm receipt of a message but high network traffic causes this ACK to travel slowly. Meanwhile the sender is waiting for the ACK when suddenly it&#8217;s timer expires and it therefore decides to re-transmit the message. Right after sending the message the ACK might finally arrive, however the duplicate has already been sent! The sender will now not send the message a third time because the ACK was received but the receiver will need to deal with the duplicate message that will soon be arriving! In order to deal with duplicates, the receiver can use the sequence number to determine if the message has already been received. However, for this to work correctly we are assuming that the sequence number space is large enough that it does not restart within the life-span of a packet. In a nutshell, the sequence space is a fixed number. When a connection is established the first message always starts at the first sequence number and eventually, if the connections has been open long enough and many messages have been sent, eventually the last available sequence number is reached. At this point, the next message sent will start back at the first sequence number.  Therefore, it is possible for two messages with the same sequence number to exist and not be duplicates!</p>
<p style="padding: 10px; float: right"><!-- Begin BidVertiser code --><br />
<script src="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=84388&amp;bid=237977" language="JavaScript1.1" type="text/javascript"></script><br />
<noscript>&amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;a href=&#8221;http://www.bidvertiser.com&#8221;&amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;marketing&amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;</noscript><br />
<!-- End BidVertiser code --></p>
<p>Congestion is caused when too much traffic is flowing through a network that individual messages are delayed because messages are arriving more quickly than can be processed. When this occurs, routers will begin dropping packets, starting with those it feels are of a lower priority. Therefore, as congestion occurs, time-outs start to happen causing messages to be re-transmitted. This of course is done in order to make sure the message does in fact arrive, but for a system experiencing congestion, this reliability feature imply contributes to the congestion. TCP congestion control handles this by estimating the round trip delay by observing patterns of delay and then setting the timer so a value greater than the time estimated. The timer is set higher in order to account for round trip time variance.</p>
<p><strong>RTO &#8211; Re-transmission timeout</strong></p>
<p>As discussed above, a timer is set on both the sender and receiver upon transmitting a message. If an acknowledgment is not received before this timer expires then a time-out occurs which triggers the re-transmission of the message. Using a fixed timer is not a good idea because the main cause for such occurring is congestion. If congestion occurs on your network and you message times-out, if you re-transmit the same message and keep the timer at the same value, chances are the message will time-out yet again if network conditions have not improved. Therefore, if we assume congestion is the culprit, it is important to give the message some extra time upon re-transmission in order to see if this extra time is enough for it to reach the destination and be acknowledged. The act of increasing the timer each time a message is re-transmitted is referred to as re-transmission timeout backoff. The most common type of RTO backoff is binary exponential  backoff which takes the current timer value and multiplies it by two each time a message is re-transmitted.</p>
<p style="padding: 10px; float: left"><!-- Begin BidVertiser code --><br />
<script src="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=84388&amp;bid=237977" language="JavaScript1.1" type="text/javascript"></script><br />
<noscript>&amp;amp;amp;lt;a href=&#8221;http://www.bidvertiser.com&#8221;&amp;amp;amp;gt;marketing&amp;amp;amp;lt;/a&amp;amp;amp;gt;</noscript><br />
<!-- End BidVertiser code --></p>
<p>Another issue that is important to consider is with respect to shrinking the timer back down. Re-transmitted messages should never be used as a guage when measuring RTT (round trip time) because the acknowledgment received could actually be for the first message transmitted and not for the re-transmitted one! Therefore, the RTO backoff should continue to be used until an ACK arrives for a message that has not been re-transmitted. At this point, it is up to the designer to decide how to implement the system. The timer can be left constant for a given amount of time and then upon receiving a certain number of messages without needing to re-transmit, the timer value can be divided by two in order to shrink it back down, meaning that perhaps network conditions have improved.</p>
<p><strong>Window Management</strong></p>
<p>Slow-start is part of the congestion control used in TCP in order to avoid sending more data than the network is able to handle.</p>
<p><strong>Slow-Start Algorithm </strong></p>
<blockquote><p>A slow-start algorithm consists of two distinct phases: the exponential growth phase, and the linear growth phase.</p>
<p>During the exponential growth phase, Slow-start works by increasing the TCP congestion window each time the acknowledgment is received. It increases the window size by number of segments acknowledged. This happens until either an acknowledgment is not received for some segment or a predetermined threshold value is reached. If a loss event occurs, TCP assumes this it is due to network congestion and takes steps to reduce the offered load on the network. Once a loss event has occurred or the threshold has been reached, TCP enters the linear growth (congestion avoidance) phase. At this point, the window is increased by 1 segment for each RTT. This happens until a loss event occurs.</p>
<p>Although the strategy is referred to as &#8220;slow-start&#8221;, its congestion window growth is quite aggressive.</p>
<p>The algorithm begins in the exponential growth phase initially with a congestion window size (cwnd) of 1 or 2 segments and increases it by 1 Segment Size (SS) for each ACK received. This behavior effectively doubles the window size each round trip of the network. This behavior continues until the cwnd reaches the size of the receivers advertised window or until a loss occurs.</p>
<p>When a loss occurs half of the current cwnd is saved as a Slow Start Threshold (SSThresh) and slow start begins again from its initial cwnd. Once the cwnd reaches the SSThresh TCP goes into congestion avoidance mode where each ACK increases the cwnd by SS*SS/cwnd. This results in a linear increase of the cwnd.</p>
<p>Source: <a href="http://en.wikipedia.org/wiki/Slow-start" title="TCP Slow-start">http://en.wikipedia.org/wiki/Slow-start</a></p></blockquote>
<p><strong>TCP Data Transfer</strong></p>
<p>When a TCP connection is established, a stream of bytes is what will actually be sent between communicating entities, not messages. Messages themselves can be sent by any combination of pieces which give a total of 2048 bytes.  Therefore, is you wish to send 4 messages each of which are 512 bytes, TCP might not actually send your message right away if it is set to wait for a total of 2048 bytes before transmitting. If this is the case, it will not send your 512 byte messages until 4 of these such messages are ready to be sent. TCP could also instead be set to send 2 pieces each of size 1024 bytes, and therefore only 2 messages need be ready in order to be transmitted. The important thing to understand is that a message being ready to be sent does not mean that this message itself is sent, but rather pieces of bytes which are then re-combined in order to re-create the message. Also, its important to note that TCP may decide to wait with your message and collect more data before transmitting. Certain flags can be used in order to request no delay.</p>
<p><strong>TCP Header</strong></p>
<p><a href="http://www.software-engineer-training.com/higher-layer-network-protocols/transmission-control-protocol-tcp/tcp-header/" rel="attachment wp-att-96" title="TCP Header"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/12/tcp_header.png" title="TCP Header" alt="TCP Header" height="80%" width="80%" /></a></p>
<p>Source: <a href="http://www.visi.com/~mjb/Drawings/" title="TCP Header">http://www.visi.com/~mjb/Drawings/</a></p>
<p><strong>TCP Header Fields </strong></p>
<p>Source and destination port &#8211; 16 bit address corresponding to the port which is associated with the value defined in the socket used to establish the connection.</p>
<p>Sequence and acknowledgment numbers &#8211;  These are both 32 bit numbers which are used to help ensure reliable delivery of messages. Every TCP packet send has a sequence number associated with it and the acknowledgment is used to communicate to the other entity which sequence number is expected next.</p>
<p>URG &#8211; this will be set to 1 if the urgent pointer is used. The pointer will indicate an offset from the current sequence number which informs the receiver at which point the urgent data ends.</p>
<p>ACK &#8211; set to 1 to indicate the acknowledgment is valid.</p>
<p>PSH &#8211; set to 1 to indicate pushed data. Pushed data is data that the sender force-delivered without waiting for the buffer to fill.</p>
<p>RST &#8211; set to 1 to indicate a reset. This can be used to reject a connection or to refuse an invalid segment. It can also be used if the host has become confused for whatever reason and therefore would like to re-establish the connection.</p>
<p>SYN &#8211; used in order to establish a connection. If SYN = 1 an ACK = 0 then a connection request is in progress. If SYN = 1 and ACK = 1 then a connection acceptance is in progress.</p>
<p>FIN &#8211; this is set to 1 in order to indicate the end of user data and to therefore close the connection. As discussed earlier, data may still be received after the FIN because the FIN also has a sequence number associated with it and it is possible that messages with an earlier sequence number arrive after the FIN which should actually be processed and which are.</p>
<p><strong>TCP Error Checking</strong></p>
<p>Error checking is accomplished by using the checksum field available in the TCP header. The receiver performs a calculation on the checksum field and the user data and if the result is not 0, this indicates that there is an error somewhere.</p>
<p style="padding: 10px; float: right"><!-- Begin BidVertiser code --><br />
<script src="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=84388&amp;bid=237963" language="JavaScript1.1" type="text/javascript"></script><br />
<noscript>&amp;amp;amp;lt;a href=&#8221;http://www.bidvertiser.com&#8221;&amp;amp;amp;gt;marketing&amp;amp;amp;lt;/a&amp;amp;amp;gt;</noscript><br />
<!-- End BidVertiser code --></p>
<p><strong>TCP Options</strong></p>
<p>The options field available in the TCP header allows for extra features to be used or certain settings to be set. Below are some example:</p>
<p>- During connection, this field is used for connecting entities to negotiate an acceptable maximum segment size.</p>
<p>- Since network speeds have increased dramatically since TCP was first introduced, 16 bits used for sequence numbers is actually no longer enough and the problem of incorrect duplicate detection becomes a major concern. It is therefor possible to also use the options field to allow for an increase in the number of available sequence numbers from 2^16 to 2^32.</p>
<p>- The options field can also be used to include a time-stamp which can then be used in order to determine round trip time, information that can then be used for congestion control.</p>
<p><strong>Additional Time Issues</strong></p>
<p>Given all of the information presented above, there are some other issues to consider with respect to the timer.  As mentioned a persistence timer is essential in order to avoid deadlock situations. This timer will expire and cause the last message to be re-transmitted if no acknowledgment is received in a timely fashion. When using congestion control, it is possible for the available window size to go down to 0, which causes the sender to stop sending messages temporarily until it is notified that there is space again in the window. Therefore, even in this situation it is still important to occasionally have a timer expire causing the sender to ask the receiver if it has space in its window. This is necessary because imagine if an acknowledgment sent increasing the window size is lost, the system would be stuck waiting forever!</p>
<p>Of course, the above assumes that the problem is due to congestion. It is possible that there is no connection but that the entity you are communicating with is no longer available or has gone offline.  Is is therefore also important not to continue trying to send messages to this user forever, but to instead also maintain a keep-alive timer which will occasionally cause a message to be sent to the receiver asking, &#8220;are you still there?&#8221;. If no response is received, the connection should be terminated so resources are not wasted sending messages to an entity which is no longer available to receive these messages.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.software-engineer-training.com/higher-layer-network-protocols/transmission-control-protocol-tcp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Transport Layer and UDP</title>
		<link>http://www.software-engineer-training.com/higher-layer-network-protocols/the-transport-layer-and-udp/</link>
		<comments>http://www.software-engineer-training.com/higher-layer-network-protocols/the-transport-layer-and-udp/#comments</comments>
		<pubDate>Sat, 08 Dec 2007 22:12:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Higher Layer Network Protocols]]></category>

		<guid isPermaLink="false">http://www.software-engineer-training.com/higher-layer-network-protocols/the-transport-layer-and-udp/</guid>
		<description><![CDATA[Transport Layer 
The transport layer is one of the 7 layers of the OSI model.  It&#8217;s purpose is to provide robust end-to-end service to to the upper layers and is responsible for end-to-end delivery of the message. Therefore, the transport layer must consider addressing, reliability, flow control and multiplexing in order to accomplish it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Transport Layer </strong></p>
<p>The transport layer is one of the 7 layers of the OSI model.  It&#8217;s purpose is to provide robust end-to-end service to to the upper layers and is responsible for end-to-end delivery of the message. Therefore, the transport layer must consider addressing, reliability, flow control and multiplexing in order to accomplish it&#8217;s main goals.</p>
<p>Reliable delivery is not a compulsory service for the transport layer, however since this layer is expected to be responsible for delivering the messages from end-to-end, it only makes sense to implement reliable delivery at this layer. Reliable delivery is provided by using error control, sequence control,  loss control and duplication control.</p>
<p style="padding: 10px; float: right"><!-- Begin BidVertiser code --><br />
<script src="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=84388&amp;bid=237977" language="JavaScript1.1" type="text/javascript"></script><br />
<noscript>&amp;lt;a href=&#8221;http://www.bidvertiser.com&#8221;&amp;gt;marketing&amp;lt;/a&amp;gt;</noscript><br />
<!-- End BidVertiser code --></p>
<p>Sequence control is very important because messages not arriving in order can cause very important information to be lost or even overwritten. For example, when one process relies on another, the order in which messages arrive will influence the final result meaning that sequence errors will lead to errors in the application. This is similar to the complexities encountered when working with databases or other applications that are multi-threaded. Consider performing a mathematical calculation. If one process retrieves the stored value to be used in the calculation just before the second process updates that value, then even if that value is updated, the first process is unfortunately using the incorrect value for its calculation.</p>
<p>Of course, if sequence control is an important issue, obviously so it loss control! If messages are not even received, the complexity in dealing with such is far more complex than worrying about putting messages back in order which can be accomplished by the use of sequence numbers. If messages are being lost after transmission over a network, it is not necessary to somehow make sure the lost messages are re-sent in a timely fashion. All this must be accomplished in a way such that performance of the system and entire network is not compromised.</p>
<p style="padding: 10px; float: left"><!-- Begin BidVertiser code --><br />
<script src="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=84388&amp;bid=237963" language="JavaScript1.1" type="text/javascript"></script><br />
<noscript>&amp;amp;amp;lt;a href=&#8221;http://www.bidvertiser.com&#8221;&amp;amp;amp;gt;marketing&amp;amp;amp;lt;/a&amp;amp;amp;gt;</noscript><br />
<!-- End BidVertiser code --></p>
<p>Duplication control is important to consider as well because as the speed of networks continue to increase, it becomes possible for different messages to be identified as duplicated and discarded. Similarly, if a packet can become corrupted or erroneous, it is possible then for the sequence number of a real message to be incorrect and cause a duplicate. Also it is entirely possible for a duplicate message to be sent by the sender itself, and therefore this duplicate should be detected to avoid errors.</p>
<p>Flow control is yet another important component of transport to consider. Imagine all these messages that are being delivered over a network, some coming from very high-speed users, others from slower users possibly still using a dial-up connection. Without flow control, a slower user could quickly become completely flooded with messages and suddenly be unable to do anything. Flow control therefore establishes window sizes to try and make sure the network or users do not run into this problem.</p>
<p>Multiplexing refers to the process where multiple messages are combined into a single signal. Demultiplexing is the reverse process of taking a single signal and splitting it into multiple messages. The transport layer performs a multiplexing (to data link layer)/demultiplexing(from data link layer) function with respect to the interface between itself and the layers below it.</p>
<p>With regard to the transport layer, a connection is not necessarily required since messages can be sent by UDP which is connectionless. Therefore, a connection is only required when a connection-oriented transport protocol is being used. If using a connection-oriented transport protocol, then it is important to consider the complexities involved with connection establishment and connection release. Establishing a connection is a rather straight-forward concept. A connection request is sent, and then the sender waits for an acknowledgment confirming the connection. However, problems can occur when duplicate or expired connection requests or acknowledgments show up!</p>
<p><strong>UDP &#8211; User Datagram Protocol</strong></p>
<p style="padding: 10px; float: right"><!-- Begin BidVertiser code --><br />
<script src="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=84388&amp;bid=237977" language="JavaScript1.1" type="text/javascript"></script><br />
<noscript>&amp;lt;a href=&#8221;http://www.bidvertiser.com&#8221;&amp;gt;marketing&amp;lt;/a&amp;gt;</noscript><br />
<!-- End BidVertiser code --></p>
<p>UDP is a way of sending data over a network, however unlike TCP, ordering and reliability is not part of the protocol. Because this reduces a significant amount of overhead, UDP is actually faster and more efficient than TCP. However, for applications that require reliable or guaranteed delivery, UDP will not be acceptable.  There is also no flow control or congestion control. UDP can have optional error detection, but does not have any method for recovery. Unlike TCP, UDP is compatible with packet broadcasting which is the sending of a message to everyone on a network</p>
]]></content:encoded>
			<wfw:commentRss>http://www.software-engineer-training.com/higher-layer-network-protocols/the-transport-layer-and-udp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Internetworking and the Internet Protocol</title>
		<link>http://www.software-engineer-training.com/higher-layer-network-protocols/internetworking-and-the-internet-protocol/</link>
		<comments>http://www.software-engineer-training.com/higher-layer-network-protocols/internetworking-and-the-internet-protocol/#comments</comments>
		<pubDate>Fri, 28 Sep 2007 23:30:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Higher Layer Network Protocols]]></category>

		<guid isPermaLink="false">http://www.software-engineer-training.com/higher-layer-network-protocols/internetworking-and-the-internet-protocol/</guid>
		<description><![CDATA[Network Layer [1]


Provides the upper layers with independence from data transmission and physical networking technologies
Responsible for sending data from source to destination (this includes the nodes in between and is therefore not end-to-end)
Responsible for requesting network facilities such as priority, bit-rate, etc&#8230;
Responsible for routing

Routing [1]


Autonomous System (AS) &#8211; set of networks and routers operated by [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Network Layer [1]<br />
</strong></p>
<ul>
<li>Provides the upper layers with independence from data transmission and physical networking technologies</li>
<li>Responsible for sending data from source to destination (this includes the nodes in between and is therefore not end-to-end)</li>
<li>Responsible for requesting network facilities such as priority, bit-rate, etc&#8230;</li>
<li>Responsible for routing</li>
</ul>
<p><strong>Routing [1]<br />
</strong></p>
<ul>
<li>Autonomous System (AS) &#8211; set of networks and routers operated by a single organization</li>
<li>Interior Router Protocol (IRP) &#8211; passing routing information within an autonomous system</li>
<li>Exterior Router Protocol (ERP) &#8211; passing routing information between different autonomous systems</li>
</ul>
<p><strong>Routing Approaches [1]<br />
</strong></p>
<ul>
<li>Distance Vector Routing &#8211; each node exchanges information with its neighboring nodes (ex: Routing Information Protocol, RIP)</li>
<li>Link-state Routing &#8211; sends link costs of each of its network interfaces to all routers (not just neighboring). Typically used with a Dijkstra-based algorithm (ex: Open Shortest Path First, OSPF)</li>
<li>Path-vector Routing &#8211; router provides information about which networks can be reached by a given router and the autonomous systems that must be crossed (ex: Border Gateway Protocol, BGP)</li>
</ul>
<p align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/tcpipprotocolsuitevsosi.jpg" alt="TCP/IP Protocol Suite vs OSI" />[1]</p>
<p><strong>Internet Architecture</strong></p>
<p>In a TCP/IP internet, IP Routers provide interconnection among physical networks.[1]</p>
<p><strong>Internet Protocol (IP)</strong></p>
<ul>
<li>The most-widely used internetworking protocol</li>
</ul>
<p><strong>Internetworking Requirements</strong> [1] &#8211; accommodate the differences among the networks which form the intenetwork.</p>
<ol>
<li>different addressing schemes</li>
<li>different maximum packet size</li>
<li>different network access mechanism</li>
<li>different timeouts</li>
<li>different transmission modes (connection oriented, connectionless)</li>
<li>error control</li>
<li>flow control</li>
</ol>
<p align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/ipheader.jpg" alt="IP Header" />[1]</p>
<p><strong>1. Different Addressing Scheme</strong> [1]</p>
<ul>
<li>Introduce IP Address as a global address</li>
<li>All hosts on the internet must have a unique IP address
<ul>
<li>NOTE: Techniques such as IP-forwarding allow private IP addresses that might be duplicated somewhere else.</li>
</ul>
</li>
</ul>
<p align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/ipaddressclasses.jpg" alt="IP Address Classes" />[1]</p>
<p align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/addressrange.jpg" alt="IP address range" />[1]</p>
<p>Subnet and Subnet Masks [1]</p>
<ul>
<li>Allow arbitrary complexity of internetworked LANs within an organization</li>
<li>Insulate overall internet from growth of network numbers and routing complexity</li>
<li>To rest of internet, site looks like single network</li>
<li>Each LAN is assigned a subnet number</li>
<li>Host portion of address is partitioned further into subnet number and host number</li>
<li>Local routers route within subnetted network</li>
<li>Subnet mask indicates which bits are subnet number and which are host number by doing a bitwise  AND</li>
</ul>
<p><strong>2. Different Maximum Size [1]<br />
</strong></p>
<p>Different networks have different Maximum Transmission Unit (MTU) sizes. What if a packet reaches a network and it exceeds the networks MTU? This can be solved with the following solution:</p>
<ul>
<li>Use fragmentation to split large packets into smaller ones</li>
<li>Use reassembly at the destination only to put the fragments together and build the original packet</li>
</ul>
<p><strong>Fragmentation and Reassembly [1]<br />
</strong></p>
<p>When to re-assemble</p>
<ul>
<li>At destination &#8211; results in packets getting smaller as data traverses internet</li>
<li>Intermediate re-assembly
<ul>
<li>Need large buffers at routers</li>
<li>Buffers may fill with fragments</li>
<li>All fragments must go through same router
<ul>
<li>Inhibits dynamic routing</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>IP Fragmentation [1]</p>
<ul>
<li>IP re-assembles at destination only</li>
<li>Uses fields in header
<ul>
<li>Data Unit Identifier (ID)
<ul>
<li>Identifies end system originated diagram
<ul>
<li>Source and destination address</li>
<li>Protocol layer generating data (ex: TCP)</li>
<li>Identification supplied by that layer</li>
</ul>
</li>
</ul>
</li>
<li>Data Length
<ul>
<li>Length of user data in octets</li>
</ul>
</li>
<li>Offset
<ul>
<li>Position of fragment of user data in original datagram</li>
<li>In multiples of 64 bits (8 octets)</li>
</ul>
</li>
<li>More flag
<ul>
<li>Indicates that this is not the last fragment</li>
</ul>
</li>
</ul>
</li>
</ul>
<p><strong>Dealing with Failure [1]<br />
</strong></p>
<ul>
<li>Re-assembly may fail if some fragments get lost</li>
<li>Re-assembly time out
<ul>
<li>Assigned to first fragment to arrive</li>
<li>If timeout expires before all fragments arrive, discard partial data</li>
</ul>
</li>
</ul>
<p><strong>3. Different Network Access [1]<br />
</strong></p>
<ul>
<li>Solved by abstracting networking functions in the networking layer, and relying on Data Link Layer for networking access</li>
<li>Routers handle the difference in network access mechanism.</li>
</ul>
<p><strong>Address Mapping [1]<br />
</strong></p>
<ul>
<li>Sometimes, in order to reach a destination, there is no need to go through an IP router.</li>
<li>In such a case, the physical address can be used directly</li>
</ul>
<p>ARP &#8211; Address Resolution Protocol</p>
<p>Reverse ARP</p>
<p><strong>4. Different Timeout [1]<br />
</strong></p>
<ul>
<li>Problem: different networks use different timeout mechanisms.</li>
<li>Solution: Introduce the concept of Datagram Lifetime.</li>
<li>Datagrams could loop indefinitely
<ul>
<li>Consumes resources</li>
<li>Transport protocol may need upper bound on datagram life</li>
</ul>
</li>
<li>Datagram marked with lifetime
<ul>
<li>Time to Live (TTL) field in IP</li>
<li>Once lifetime expires, datagram discarded (not forwarded)</li>
<li>Hop count
<ul>
<li>Decrement time to live on passing through each router</li>
</ul>
</li>
</ul>
</li>
</ul>
<p><strong>5. Different Transmission Modes [1]<br />
</strong></p>
<ul>
<li>Use a connectionless architecture</li>
<li>Advantage:
<ul>
<li>Flexibility</li>
<li>Robust</li>
<li>No unnecessary overhead</li>
</ul>
</li>
<li>Disadvantages
<ul>
<li>Not guaranteed delivery</li>
<li>Not guaranteed order of delivery</li>
<li>Reliability is responsibility of upper layers (ex: TCP)</li>
</ul>
</li>
</ul>
<p><strong>6. Error Control [1]<br />
</strong></p>
<ul>
<li>Minimal error control, done only for the header</li>
<li>Router should attempt to inform source if packet discarded (using ICMP)</li>
<li>Not guaranteed delivery</li>
<li>May inform higher layer protocol</li>
</ul>
<p><strong>7. Flow Control [1]<br />
</strong></p>
<ul>
<li>Â Allows routers and/or stations to limit rate of incoming data</li>
<li>Limited in connectionless systems</li>
<li>Send flow control packets
<ul>
<li>Requesting reduced flow</li>
</ul>
</li>
<li>ex: ICMP</li>
</ul>
<p>&#8212;<em>[1] <em>Prof. Shervin Shirmohammadi, University of Ottawa CEG4183 Course Notes, Lecture 2</em> </em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.software-engineer-training.com/higher-layer-network-protocols/internetworking-and-the-internet-protocol/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Computer Networks and Protocols</title>
		<link>http://www.software-engineer-training.com/higher-layer-network-protocols/computer-networks-and-protocols/</link>
		<comments>http://www.software-engineer-training.com/higher-layer-network-protocols/computer-networks-and-protocols/#comments</comments>
		<pubDate>Sun, 23 Sep 2007 19:29:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Higher Layer Network Protocols]]></category>

		<guid isPermaLink="false">http://www.software-engineer-training.com/higher-layer-network-protocols/computer-networks-and-protocols/</guid>
		<description><![CDATA[Computer networks are any set of computers or devices connected together in order to share information or resources. A network can be very small (ex: a home network connecting 2 or more computers) or very large (ex: the internet). The actual physical medium of communication and the software controlling the communication are the two factors [...]]]></description>
			<content:encoded><![CDATA[<p>Computer networks are any set of computers or devices connected together in order to share information or resources. A network can be very small (ex: a home network connecting 2 or more computers) or very large (ex: the internet). The actual physical medium of communication and the software controlling the communication are the two factors which limit the size and scalability of a network.</p>
<p>The set or rules which must be implemented in order to control communication is referred to as the <strong>protocols</strong>. The protocol defines the syntax, the semantics and the synchronization of communication.  The protocols govern all aspects of the communication in such a way that two different computers can understand each other.</p>
<p>The protocols which enable communication between computers are human-made. There are several organizations responsible for creating standards such as:</p>
<ul>
<li><a href="http://www.iso.org" title="ISO">ISO</a></li>
<li><a href="http://www.itu.int" title="ITU">ITU</a></li>
<li><a href="http://www.ansi.org" title="ANSI">ANSI</a></li>
<li><a href="http://www.ieee.org" title="IEEE">IEEE</a></li>
<li><a href="http://www.ietf.org" title="IETF">IETF</a> / <a href="http://www.irtf.org" title="IRTF">IRTF</a></li>
<li><a href="http://www.eia.org" title="EIA">EIA</a></li>
</ul>
<p>When creating protocols for network communication, there are many issues which must be considered.</p>
<p><strong>Generic Protocol Issues [1]</strong></p>
<blockquote><p>Error control &#8211; making a channel more reliable and handling lost or out of sequence messages</p>
<p>Flow control &#8211; avoid flooding a slower peer entity</p>
<p>Resource allocation &#8211; mediating contention for physical (ex: buffers) or logical (ex: data structures) resources</p>
<p>Fragmentation &#8211; dividing chunks of data into smaller pieces and subsequent re-assembly</p>
<p>Multiplexing &#8211; combining several higher layer sessions</p>
<p>Connection setup &#8211; initiating logical communication with peer entity</p>
<p>Addressing / naming &#8211; managing identifiers</p>
<p>Compression &#8211; reducing data rate</p>
<p>Encryption &#8211; provide data security</p>
<p>Timer management &#8211; bookkeeping and error recovery</p></blockquote>
<p>&#8220;Virtually all networks in use today are based in some fashion on the <strong>Open Systems Interconnection</strong> (OSI) standard. <strong>OSI</strong> was developed in 1984 by the <a href="http://www.iso.org" title="ISO">International Organization for Standardization</a> (ISO), a global federation of national standards organizations representing approximately 130 countries.  The core of this standard is the <strong>OSI Reference Model</strong>, a set of seven layers that define the different stages that data must go through to travel from one device to another over a network.&#8221; [2]<br />
<a href="http://www.tutorial5.com/content/view/26/79/" title="OSI Model"></a></p>
<p style="text-align: center"><a href="http://www.tutorial5.com/content/view/26/79/" title="OSI Model"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/osi-model-7-layers.png" title="OSI Model" alt="OSI Model" border="0" /></a></p>
<p><strong> Functions of the OSI Layers [1]<br />
</strong></p>
<blockquote><p>Physical</p>
<ul>
<li>The bits that are transmitted over the communication media</li>
<li>Deals with network hardware, bit encoding</li>
<li>Ex: copper, fiber, radio, satellite</li>
</ul>
<p>Data Link</p>
<ul>
<li>Activates, maintains, and deactivates the physical link between two adjacent nodes (node-to-node delivery)</li>
<li>Deals with framing, windowing, flow control, error detection and recovery</li>
</ul>
<p>Network</p>
<ul>
<li>Determines how best to route packets of data from source to destination via intermediate network nodes</li>
<li>Deals with addressing, routing, fragmentation, and congestion</li>
</ul>
<p>Transport</p>
<ul>
<li>Provides end-to-end message delivery and error recovery</li>
<li>Deals with end-to-end integrity and quality of service</li>
</ul>
<p>Session</p>
<ul>
<li>To establish, manage and terminate sessions</li>
<li>Controls the dialogue between two host applications</li>
<li>Reports exceptions to upper layers</li>
</ul>
<p>Presentation</p>
<ul>
<li>Resolves data representation differences</li>
<li>To translate, encrypt and compress data</li>
</ul>
<p>Application</p>
<ul>
<li>Perform functions to implement network applications</li>
<li>Ex: email, <a href="http://www.corporateconferencecalls.com/">teleconferencing</a></li>
</ul>
</blockquote>
<p>The OSI model also has different Protocol Data Units (PDUs) associated with the different layers. The OSI diagram shown above defines these as follows:</p>
<ul>
<li>Layer 1 &#8211; bit streams</li>
<li>Layer 2 &#8211; frames</li>
<li>Layer 3 &#8211; packets</li>
<li>Layer 4 &#8211; segments</li>
<li>Layer 5,6,7 &#8211; data</li>
</ul>
<p>The ideas introduced above are essential in order to properly understand basic network principles such as line configuration, topology, transmission mode, categories of networks and internetworks.</p>
<p><strong>Line Configuration </strong></p>
<p style="text-align: center" align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/pointtopointconfiguration.JPG" alt="Point to Point Configuration" />[1]</p>
<p style="text-align: center">&nbsp;</p>
<p style="text-align: center" align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/multipointconfiguration.JPG" alt="Multipoint Configuration" />[1]</p>
<p style="text-align: center">&nbsp;</p>
<p align="left"><strong>Topology</strong></p>
<p align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/topology1.JPG" alt="Mesh and Star Topology" />[1]</p>
<p align="left">&nbsp;</p>
<p align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/topology2.JPG" alt="Tree and Bus Topology" />[1]</p>
<p align="left">&nbsp;</p>
<p align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/topology3.JPG" alt="Ring and Hybrid Topology" />[1]</p>
<p align="left"><strong>Transmission Mode</strong></p>
<p align="left">&nbsp;</p>
<p align="center">&nbsp;</p>
<p align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/simplexhalfduplexfullduplex.JPG" alt="Simplex, Half Duplex and Full Duplex Transmission Modes" />[1]</p>
<p align="left"><strong>Network Categories</strong></p>
<p align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/lan.JPG" alt="Local Area Networks" />[1]</p>
<p align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/man.JPG" alt="Metropolitain Area Network" />[1]</p>
<p align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/wan.JPG" alt="Wide Area Network" />[1]</p>
<p align="left">An internetwork, the most famous of which is the Internet, is a connection of all of these different types networks together! Of course, knowing the different types of networks is only part of understanding how they communicate together. At the physical layer we have all of the physical components of these different networks, such as the hardware and communication media. At the next layer, we have the <strong>data link layer</strong> which responds to service requests from the network layer above it and and issues service requests to the physical layer below it.</p>
<blockquote>
<p align="left">The data link layer provides the functional and procedural means to transfer data between network entities and might provide the means to detect and possibly correct errors that may occur in the Physical layer. Examples of data link protocols are <a href="http://en.wikipedia.org/wiki/Ethernet" title="Ethernet">Ethernet</a> for local area networks and <a href="http://en.wikipedia.org/wiki/Point-to-Point_Protocol" title="Point-to-Point Protocol">PPP</a>, <a href="http://en.wikipedia.org/wiki/HDLC" title="HDLC">HDLC</a> and <a href="http://en.wikipedia.org/wiki/ADCCP" title="ADCCP">ADCCP</a> for point-to-point connections. [3]</p>
</blockquote>
<p align="left">The three main services provided by the data link layer are:</p>
<ul>
<li>line discipline &#8211; who should send now?</li>
<li>flow control &#8211; how much data should be sent?</li>
<li>error control &#8211; how can erros be corrected?</li>
</ul>
<p align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/linediscipline0.jpg" alt="Line Discipline 0" />[1]</p>
<p align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/linediscipline1.jpg" alt="Line Discipline" />[1]</p>
<p align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/linediscipline2.jpg" alt="Line Discipline 2" />[1]</p>
<p align="center"> <img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/linediscipline3.jpg" alt="Line Discipline 3" />[1]</p>
<p align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/linediscipline4.jpg" alt="Line Discipline 4" />[1]</p>
<p align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/flowcontrol1.jpg" alt="Flow Control 1" />[1]</p>
<p align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/flowcontrol2.jpg" alt="Flow Control 2" />[1]</p>
<p align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/errorcontrol1.jpg" alt="Error Control 1" />[1]</p>
<p align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/errorcontrol2.jpg" alt="Error Control 2" />[1]</p>
<p align="center"> <img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/errorcontrol3.jpg" alt="Error Control 3" />[1]</p>
<p align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/errorcontrol4.jpg" alt="Error Control 4" />[1]</p>
<p align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/errorcontrol5.jpg" alt="Error Control 5" />[1]</p>
<p align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/errorcontrol6.jpg" alt="Error Control 6" />[1]</p>
<p align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/errorcontrol7.jpg" alt="Error Control 7" />[1]</p>
<p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>
<p><strong>Connection Devices</strong></p>
<p>Networking Devices</p>
<ul>
<li>Repeaters</li>
<li>Bridges</li>
</ul>
<p>Internetworking Devices</p>
<ul>
<li>Routers</li>
<li>Gateways</li>
</ul>
<p align="center"><img src="http://www.software-engineer-training.com/wp-content/uploads/2007/09/connectingdevices.jpg" alt="Connecting Devices" />[1]</p>
<p><strong>Routers [4]<br />
</strong></p>
<p>Routers are specialized computers that send the messages of every Internet user speeding to their destinations along thousands of pathways. Much of the work to get a message from one computer to another is done by routers, because they&#8217;re the crucial devices that let messages flow between networks, rather than within networks.</p>
<p>One of the tools a router uses to decide where a packet should go is a <strong>configuration table</strong>. A configuration table is a collection of information, including:</p>
<ul>
<li>Information on which connections lead to particular groups of addresses</li>
<li>Priorities for connections to be used</li>
<li>Rules for handling both routine and special cases of traffic</li>
</ul>
<p>A configuration table can be as simple as a half-dozen lines in the smallest routers, but can grow to massive size and complexity in the very large routers that handle the bulk of Internet messages. A router, then, has two separate but related jobs:</p>
<ul>
<li>The router ensures that information doesn&#8217;t go where it&#8217;s not needed. This is crucial for keeping large volumes of data from clogging the connections of &#8220;innocent bystanders.&#8221;</li>
<li>The router makes sure that information does make it to the intended destination.</li>
</ul>
<p><strong>Gateway</strong> [5]</p>
<p>In a communications network, a network node equipped for interfacing with another network that uses different protocols.</p>
<ul>
<li>A gateway may contain devices such as <a href="http://en.wikipedia.org/wiki/Communications_protocol" title="Communications protocol">protocol</a> translators, <a href="http://en.wikipedia.org/wiki/Impedance_matching" title="Impedance matching">impedance matching</a> devices, rate converters, fault isolators, or signal translators as necessary to provide system interoperability. It also requires the establishment of mutually acceptable administrative procedures between the two networks.</li>
<li>A protocol translation/mapping gateway interconnects networks with different network protocol technologies by performing the required protocol conversions.</li>
</ul>
<p><strong>Repeater</strong> [6]</p>
<p>A <strong>repeater</strong> is an electronic device that receives a signal and retransmits it at a higher level or higher power, or onto the other side of an obstruction, so that the signal can cover longer distances without degradation.</p>
<p>Because repeaters work with the actual physical signal, and do not attempt to interpret the data being transmitted, they operate on the Physical layer, the first layer of the OSI model.</p>
<p>Bridge [7]</p>
<p>A <strong>network bridge</strong> connects multiple network segments at the data link layer (layer 2) of the OSI model. Bridges are similar to repeaters or <a href="http://en.wikipedia.org/wiki/Ethernet_hub" title="Ethernet hub">network hubs</a>, devices that connect network segments at the physical layer, however a bridge works by using bridging where traffic from one network is managed rather than simply rebroadcast to adjacent network segments.</p>
<p>&#8212;</p>
<p><em>[1] Prof. Shervin Shirmohammadi, University of Ottawa CEG4183 Course Notes, Lecture 1<br />
[2] HowStuffWorks.com &#8211; <a href="http://computer.howstuffworks.com/osi.htm" title="How OSI Works">How OSI Works</a><br />
[3] Wikipedia &#8211; <a href="http://en.wikipedia.org/wiki/Data_link_layer" title="Data Link Layer">Data Link Layer</a><br />
[4] HowStuffWorks.com &#8211; <a href="http://computer.howstuffworks.com/router.htm/printable" title="How Routers Work">How Routers Work</a><br />
[5] Wikipedia &#8211; <a href="http://en.wikipedia.org/wiki/Gateway_%28telecommunications%29" title="Gateway">Gateway (telecommunications)</a><br />
[6] Wikipedia &#8211; <a href="http://en.wikipedia.org/wiki/Repeater" title="Repeater">Repeater</a><br />
[7] Wikipedia &#8211; <a href="http://en.wikipedia.org/wiki/Network_bridge" title="Network Bridge">Network Bridge</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.software-engineer-training.com/higher-layer-network-protocols/computer-networks-and-protocols/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
