<?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>Network Protocols Blog</title>
	<atom:link href="http://networkprotocolsblog.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://networkprotocolsblog.com</link>
	<description>Personal Blogging about Network Protocols</description>
	<lastBuildDate>Thu, 03 Apr 2014 18:32:12 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1-alpha-20141021</generator>
	<item>
		<title>OSPF Packet Formats</title>
		<link>http://networkprotocolsblog.com/routing/ospf/ospf-packet-formats/</link>
		<comments>http://networkprotocolsblog.com/routing/ospf/ospf-packet-formats/#comments</comments>
		<pubDate>Wed, 23 Mar 2011 15:33:04 +0000</pubDate>
		<dc:creator><![CDATA[Shubhojyoti Bhattacharya]]></dc:creator>
				<category><![CDATA[OSPF]]></category>

		<guid isPermaLink="false">http://networkprotocolsblog.com/?p=435</guid>
		<description><![CDATA[I briefly wrote about OSPF previously. As we saw OSPF packets are encapsulated in the IP Packets with protocol number 89. But how does OSPF establishes adjacency and how does <a href="http://networkprotocolsblog.com/routing/ospf/ospf-packet-formats/" class="more-link">[&#8230;]</a>]]></description>
				<content:encoded><![CDATA[<p>I briefly <a title="Stepping into OSPF" href="http://networkprotocolsblog.com/2011/routing/ospf/stepping-into-ospf/">wrote about OSPF</a> previously. As we saw OSPF packets are encapsulated in the IP Packets with protocol number 89. But how does OSPF establishes adjacency and how does it exchanges the Database? The process is part of another post. But before we go into those details, we must first know how the OSPF packets look like. This will give us an insight of what information they carry and later we can put all these pieces together and get to know when and why each of these packet contents are used?</p>
<p>So first what are the various types of packets:</p>
<ul>
<li>Hello Packets</li>
<li>Database Description (DBD) Packets</li>
<li>Link State Request (LSR) Packets</li>
<li>Link State Update (LSU) Packets</li>
<li>Link State Acknowledgement (LSAck) Packets</li>
</ul>
<p>Each OSPF packets have a common OSPF Header. Other than Hello Packets, all other packets are LSA related. Each such LSA packet typehas a common LSA header. The DBD, LSR and LSA packets carry only this header, while the LSU packets carry the entire LSA. There are various types of LSAs which will be covered in a later post in detail.</p>
<h3>OSPF Packet Header</h3>
<p>The OSPF Packet Header is of 24 bytes length. Each OSPF packet carries this. The header gives all information necessary that enables routers to know whether the packet should be processed further or not.</p>
<p><img class="aligncenter size-full wp-image-445" title="OSPF Packet Header" src="http://networkprotocolsblog.com/wp-content/uploads/2011/03/Ospf_Packet_Header.png" alt="OSPF Packet Header" width="450" height="269" /></p>
<p><strong>Version No &#8211; </strong>This field specifies the version number of OSPF. Currently what we are discussing here and is used everywhere is OSPFv2. For IPv6, it is OSPFv3.</p>
<p><strong>Type &#8211; </strong>This states the type of OSPF Packet. We have 1 (Hello), 2 (DBD), 3 (LSR), 4 (LSU) and 5 (LSAck).</p>
<p><strong>Packet Length </strong>- This is the length of the complete OSPF Packet including the header.</p>
<p><strong>Router ID </strong>- The Router ID of the source. Each router in an OSPF Domain must have a unique Router ID as described <a title="Stepping into OSPF" href="http://networkprotocolsblog.com/2011/routing/ospf/stepping-into-ospf/">here</a>. It is denoted as a 4 byte IP Address format.</p>
<p><strong>Area ID </strong>- The area to which the packet belongs too. Each OSPF packet belongs to 1 area. This is denoted as a 4 byte IP Address format. For backbone area packet, the area ID is 0.0.0.0 For other areas like area 1 it contains the value as 0.0.0.1 etc.</p>
<p><strong>Checksum </strong>- This is the standard IP checksum of the entire OSPF packet excluding the Authentication field. It is calculated as 16-bit one&#8217;s complement of one&#8217;s complement of all 16 bit words present. The packet needs to be padded with extra 0s at the end if the packet is not a multiple of 16 bit words.</p>
<p><strong>Auth Type </strong> &#8211; The type of authentication done between the neighbors. Current values are 0 (null or no authentication), 1 (Plain text password) and 2 (cryptographic or MD5 hashing based password). All other values are reserved by IANA.</p>
<p><strong>Authentication &#8211; </strong>This is a 64 bit (8 bytes) field. This contains the actual authentication information if enabled.</p>
<p><strong><em>For all the OSPF Packets described below, the above OSPF Header is always present. Only the extra distinct fields of the specific packet types are being mentioned below.</em></strong></p>
<h3>Hello Packets</h3>
<p>Hello Packets are notified in the header by type 1. They are sent at periodic intervals (default 30 secs) over all the OSPF enabled interfaces. The purpose of these packets are for dynamic discovery of neighbors, establishing and maintaining neighbor ship. Routers in a common network negotiate few common parameters. These parameter values are carried in the Hello Packets. The parameters are Network Mask, Hello interval and Dead Interval.</p>
<p><img class="aligncenter size-full wp-image-452" title="Hello Packet Format" src="http://networkprotocolsblog.com/wp-content/uploads/2011/03/Hello_Packet.png" alt="Hello Packet Format" width="450" height="299" /><strong>Network Mask </strong>- The network mask that is associated with the interface. This should match on both sides of a link in order for adjacency to come up.</p>
<p><strong>Hello Interval</strong> &#8211; The time interval between successive hello packets sent by a router.</p>
<p><strong>Options </strong> &#8211; The optional capabilities supported by the router. These are described at the end of this post.</p>
<p><strong>Rtr Priority </strong>- This is the priority value of the router. This is used in case of DR-BDR election. If priority value is 0, then the router doesn&#8217;t take part in DR-BDR election.</p>
<p><strong>Dead Interval </strong>- The number of seconds to wait before declaring a router as down. This starts when a router misses a Hello Message from its neighbor. By default it is 3 times the Hello Interval.</p>
<p><strong>Designated Router </strong>- The router ID of the DR as seen by the router. Initially this is set to 0.0.0.0 and once it is elected it changes this value.</p>
<p><strong>Backup Designated Router </strong>- Same as above, this field specifies the router ID of the BDR.</p>
<p><strong>Neighbor (s) </strong> &#8211; The router IDs of all the neighbors from whom a Hello Message has been received within the last <em>Dead Interval </em>seconds. This is a variable field and initially it contains no router IDs.</p>
<h3>Database Description (DBD) Packets</h3>
<p>The DBD packets are exchanged during the initialization of the adjacency. They are OSPF Packet Type 2. The master/slave mechanism is used for exchanging the DBD Packets. During the Exstart state of OSPF, an empty DBD packet is exchanged where the Master/Slave is elected per link and the initial sequence number to be used by the master is decided. During the Exchange state, the DBD packets contain the LSA headers and using these the routers make a list of LSAs that they are going to request from their neighbors.</p>
<p><img class="aligncenter size-full wp-image-451" title="Database Description Packet" src="http://networkprotocolsblog.com/wp-content/uploads/2011/03/DBD_Packet.png" alt="Database Description Packet" width="450" height="294" /></p>
<p><strong>Interface MTU </strong>- The maximum size of IP packets that can be sent over the link. This value should match on both the routers in order for the adjacency to come up.</p>
<p><strong>Options </strong>- The optional capabilities that are explained below.</p>
<p><strong>I Bit &#8211; </strong>The init bit which states that this is the first of the DBD packets.</p>
<p><strong>M Bit </strong>- The more bit which states that there are more DBD packets after the current packet.</p>
<p><strong>MS Bit &#8211; </strong>The Master/Slave Bit. If it is set to 1, it implies that the router is a Master else the router is a slave.</p>
<p><strong>DD Sequence Number </strong>- This is the sequence number for the DBD packets. This can only be incremented by the Master and the initial value is set when the I bit is set.</p>
<p><strong>LSA Headers </strong>- The remaining field contains the list of LSA headers. This can be a partial list too and hence multiple DBD packets are needed.</p>
<h3>Link State Request (LSR) Packets</h3>
<p>The LSR Packets are of OSPF Packet Type 3. Once the DBD packets are exchanged, each router checks the LSA Headers against its own database and if it finds it doesn&#8217;t have up to date information for any LSA, it creates the LSR packets and sends it to its neighbor asking for the updated LSAs. The LSA instance is defined by the LS sequence number, Checksum and LS Age. But the response to the LSR can be a more updated instance of the LSA.</p>
<p><img class="aligncenter size-full wp-image-453" title="LSR Packet Format" src="http://networkprotocolsblog.com/wp-content/uploads/2011/03/LSR_Packet.png" alt="LSR Packet Format" width="450" height="295" /></p>
<p>The LSR packets however do not contain the LSA instance related fields but the LSA identification fields.</p>
<p><strong>LS Type </strong>- The type of Link State being asked for.</p>
<p><strong>Link State ID </strong>- Each LSA has a ID. This is mentioned in this field.</p>
<p><strong>Advertising Router </strong>- The router that has originated the LSA.</p>
<p>There can be 1 or more LSA request fields in each LSR packet.</p>
<h3>Link State Update (LSU) Packets</h3>
<p>Link State Update (LSU) packets contain the actual complete LSAs. The various types of LSAs and their formats will be described in a later post. Each LSU packet contains a field that mentions the total number of LSAs contained in that packet. The LSU packets are OSPF Packet Type 4.</p>
<h3>Link State Acknowledgement (LSAck) Packets</h3>
<p>The LSAck packets help in reliable transmission of the LSAs. Each LSAs are explicitly acknowledged. The LSAck packets are OSPF Type 5 and they can contain acknowledgements for multiple LSAs. The LSA header is contained in the LSAck packet and this suffices for the acknowledgement for the corresponding LSA.</p>
<h3>The Options Field</h3>
<p>The Options field is present in the Hello Packets, Database Description Packets and in each individual LSAs. Each router uses the options field to advertise the capabilities it supports to all its neighbors. The options field in Hello Packets enables each router to reject adjacency request due to the capabilities mismatch. When used in the DBD packets, the Options field lets a router decide whether it has to forward an LSA or not due to its reduced capability. In LSAs, the Options helps routers by enabling it to take proper forwarding decisions by bypassing the LSAs with reduced capabilities.</p>
<p>Out of the 8 bits in the options field, the first, second and eight bits are reserved and not used. The other bits from 3rd to 7th bit in sequence are:</p>
<ol>
<li><strong>DC Bit </strong>- This specifies the handling mechanisms for Demand Circuits.</li>
<li><strong>EA Bit </strong>- This specifies that the routers can handle External Attributes LSAs.</li>
<li><strong>N/P Bit </strong>- This is used for handling Type-7 LSAs which are used in case of NSSA areas.</li>
<li><strong>MC Bit </strong>- This bit is used for handling Multicast Packets.</li>
<li><strong>E Bit </strong>- This bit specifies how the AS External LSAs are flooded in the OSPF domain.</li>
</ol>
<p>In later posts, we will see how some of the options are implemented and used. As I have mentioned before, a major part of the packet formats are the LSA types. I will discuss these in detail in a later post. Also the way these OSPF packets are used will also be discussed by me in a later post. Hope you had a nice refresh of the various packet types.</p>
]]></content:encoded>
			<wfw:commentRss>http://networkprotocolsblog.com/routing/ospf/ospf-packet-formats/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convergence Time for RIP</title>
		<link>http://networkprotocolsblog.com/routing/rip/convergence-time-for-rip/</link>
		<comments>http://networkprotocolsblog.com/routing/rip/convergence-time-for-rip/#comments</comments>
		<pubDate>Mon, 21 Mar 2011 18:48:46 +0000</pubDate>
		<dc:creator><![CDATA[Shubhojyoti Bhattacharya]]></dc:creator>
				<category><![CDATA[RIP]]></category>

		<guid isPermaLink="false">http://networkprotocolsblog.com/?p=426</guid>
		<description><![CDATA[You will usually read everywhere that RIP takes considerably a large time to converge. But have you ever wondered why or did you try to find out what processes are <a href="http://networkprotocolsblog.com/routing/rip/convergence-time-for-rip/" class="more-link">[&#8230;]</a>]]></description>
				<content:encoded><![CDATA[<p>You will usually read everywhere that RIP takes considerably a large time to converge. But have you ever wondered why or did you try to find out what processes are involved due to which this delay occurs? I am sure quite a few of you have done it, but it always helps to refresh your memory <img src="http://networkprotocolsblog.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> Today we will see 2 scenarios and check the approximate convergence time it takes for RIP. The 2 scenarios are:</p>
<ul>
<li>When a link goes down, an update is triggered with a poisoned route.</li>
<li>When the routing updates stops (like in case of &#8220;<em>passive-interface default</em>&#8220;)</li>
</ul>
<p>In both the cases we will use the topology as used in <a title="Understanding RIP Timers" href="http://networkprotocolsblog.com/2011/tutorials/understanding-rip-timers/">RIP Timers</a> article. The topology diagram is presented here again for your reference.</p>
<p><img class="aligncenter size-full wp-image-389" title="RIP Timer Topology" src="http://networkprotocolsblog.com/wp-content/uploads/2011/03/riptimer-Topology.png" alt="RIP Timer Topology" width="452" height="189" /></p>
<h3>Triggered Update when a link goes down</h3>
<p>To start with let us assume the timer values. Lets take the default values viz. Update Timer of 30secs, Invalid Timer of 180 secs, Hold Down Timer of 180secs and Flush Timer of 240secs. Let us also assume that all the 4 routers are synchronized meaning that their Update Timers have started at the same time (obviously this is an assumption :)). Now the subnet 172.1.4.0 has been advertised to R2 by R1 which has the minimum metric of 2 for R2. Now at time t, R1 sends an update for the subnet 172.1.4.0 to R2. Now let us shutdown the interface Fa1/0 on R1. This will make R1 send a triggered update to R2 for 172.1.4.0 as a poisoned route with metric 16 (unreachable). In response R2 will use poison reverse and send the same subnet with metric 16 back to R1. All these will take place within t+2 seconds. R2 now removes the subnet from its routing table.  Now note that this time the subnet 172.1.4.0 is <strong>reachable via R4.</strong> This is used by R3 but not R2. R2 will have to wait for R3 to send an update for the subnet. This will come only around t+30 seconds. Now R2 installs this route for subnet 172.1.4.0 via R3. Since we have assumed that the timers are synchronized in all the routers, it takes around 30 seconds for R2 to learn the new path to the subnet. In reality this is never the case so the convergence time will vary between 20 to 50 seconds.</p>
<h3>Updates do not arrive anymore</h3>
<p>Let us assume the same timer values in this case too. We are not assuming any synchronization timer here. Let us bring down the Fa0/0 interface on R1. Now in this case there is <strong>no triggered update </strong>from R1 towards R2 as it is not possible for R1 to send that to R2. After the interface is brought down on R1, R2 doesn&#8217;t receive any update for the subnet 172.1.4.0 from R1. So it waits till its Invalid Timer (180 secs) expires. After this the Hold Down Timer is set to 180 secs and the count down begins for it to become 0. Please note during this time an update for the subnet 172.1.4.0 might be sent by R3 towards R2. But this will only be of a higher metric than what R2 had, so during the hold down period R2 will not use this route. The new route can be used when either the Hold Down Timer or Flush Timer (240 seconds) expires whichever comes first. Now since flush timers start along with the Invalid Timer, it needs to run for 60 more seconds for the route to flush. When this happens even the Hold Down Timer is removed. This makes R2 wait for 120+60=240 secs for the route to flush. Now R2 needs to wait for the next update from R3. This can take from 1 to 30 seconds time. So during this scenario the convergence will take a total from 240 to 270 seconds which is a very high time period for routes to converge.</p>
<p><strong>Summary </strong>- So from the above 2 scenarios we can see that the convergence time is quite high in case of RIP. Other IGP like OSPF and ISIS solves this issue quite well and hence they are mostly used nowadays for large network installations. We will discuss these protocols in detail during later posts.</p>
]]></content:encoded>
			<wfw:commentRss>http://networkprotocolsblog.com/routing/rip/convergence-time-for-rip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Understanding RIP Timers</title>
		<link>http://networkprotocolsblog.com/tutorials/understanding-rip-timers/</link>
		<comments>http://networkprotocolsblog.com/tutorials/understanding-rip-timers/#comments</comments>
		<pubDate>Sat, 19 Mar 2011 18:29:37 +0000</pubDate>
		<dc:creator><![CDATA[Shubhojyoti Bhattacharya]]></dc:creator>
				<category><![CDATA[RIP]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://networkprotocolsblog.com/?p=379</guid>
		<description><![CDATA[In my introductory post on RIP, I briefly talked about RIP Timers. It is quite easy to understand the timers but I do get confused sometimes when I have to <a href="http://networkprotocolsblog.com/tutorials/understanding-rip-timers/" class="more-link">[&#8230;]</a>]]></description>
				<content:encoded><![CDATA[<p>In my introductory post on <a title="Introduction to RIP" href="http://networkprotocolsblog.com/2011/routing/rip/rip-intro/">RIP</a>, I briefly talked about RIP Timers. It is quite easy to understand the timers but I do get confused sometimes when I have to debug some error quickly in a RIP network. I get confused easily between Invalid and Update timer. So today I am going to discuss briefly about how the timers work in RIP.</p>
<p>We will use the following topology for the explanation.</p>
<p><img class="aligncenter size-full wp-image-389" title="RIP Timer Topology" src="http://networkprotocolsblog.com/wp-content/uploads/2011/03/riptimer-Topology.png" alt="RIP Timer Topology" width="452" height="189" /></p>
<p>We will be using 4 routers connected as above. The interfaces connected and the their IP addresses are mentioned in the figure. Configuring RIP is very simple. We will be using the sample configurations from a 7200 Router.</p>
<p>Below are the RIP configurations for R1.</p>
<div class="configblock">router rip<br />
version 2<br />
timers basic 30 40 90 180<br />
network 172.1.0.0<br />
no auto-summary</div>
<p>The timers command is used to configure the timers. The update timer has been set to 30secs, the invalid timer is 40secs, the hold down timer is 90secs and the flush timer is 180 secs. Also the command <em>&#8220;no auto-summary&#8221; </em>is not compulsory. I configured it in order to check the actual prefixes that were updated instead of the summarized routes.</p>
<p>Now lets have a look at the current routing table on R2.</p>
<div class="configblock"><code>R2#show ip route<br />
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP<br />
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area<br />
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2<br />
E1 - OSPF external type 1, E2 - OSPF external type 2<br />
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area<br />
* - candidate default, U - per-user static route, o - ODR<br />
P - periodic downloaded static route</code><br /><code></code><br /><code>Gateway of last resort is not set</code><br /><code></code><br /><code> 172.1.0.0/24 is subnetted, 2 subnets<br />
R       172.1.4.0 [120/1] via 172.1.2.111, 00:00:08, FastEthernet0/0<br />
C       172.1.2.0 is directly connected, FastEthernet0/0<br />
172.2.0.0/24 is subnetted, 1 subnets<br />
C       172.2.3.0 is directly connected, FastEthernet1/0<br />
172.3.0.0/24 is subnetted, 1 subnets<br />
R       172.3.4.0 [120/1] via 172.2.3.113, 00:00:17, FastEthernet1/0<br />
10.0.0.0/24 is subnetted, 1 subnets<br />
S       10.10.10.0 [1/0] via 172.2.3.0<br />
11.0.0.0/24 is subnetted, 1 subnets<br />
R       11.11.11.0 [120/1] via 172.2.3.113, 00:00:2, FastEthernet1/0<br />
R2#</code></div>
<p>11.11.11.0 subnet is a redistributed route from R3. The <strong>Update Timer </strong>at this time is 2 seconds as can be seen from our configuration. Every 30 seconds a fresh update for this route will come from R2.</p>
<p>We have disabled the interface fa0/0 on R4 for the time being so that we do not get the 11.11.11.0 update from R4. Now we immediately disable updates from R3 using <em>passive-interface default </em>command. We keep observing R2. After the <strong>Invalid Timer </strong>expires in 40 seconds, R2 advertises 11.11.11.0 subnet to its neighbor with metric 16 (inaccessible). During this time R2&#8217;s routing table shows 11.11.11.0 as <em>possibly down</em>.</p>
<div class="configblock"><code>*Mar 20 01:32:33.395: RIP: sending v2 update to 224.0.0.9 via FastEthernet1/0 (172.2.3.112)<br />
*Mar 20 01:32:33.395: RIP: build update entries<br />
*Mar 20 01:32:33.395:   11.11.11.0/24 via 0.0.0.0, metric 16, tag 0<br />
*Mar 20 01:32:33.395:   172.1.2.0/24 via 0.0.0.0, metric 1, tag 0<br />
R2#<br />
*Mar 20 01:32:33.399:   172.1.4.0/24 via 0.0.0.0, metric 2, tag 0<br />
*Mar 20 01:32:33.399:   172.3.4.0/24 via 0.0.0.0, metric 16, tag 0<br />
R2#<br />
*Mar 20 01:32:35.387: RIP: sending v2 flash update to 224.0.0.9 via FastEthernet0/0 (172.1.2.112)<br />
*Mar 20 01:32:35.387: RIP: build flash update entries<br />
*Mar 20 01:32:35.387:   11.11.11.0/24 via 0.0.0.0, metric 16, tag 0<br />
*Mar 20 01:32:35.387:   172.3.4.0/24 via 0.0.0.0, metric 16, tag 0<br />
*Mar 20 01:32:35.391: RIP: sending v2 flash update to 224.0.0.9 via FastEthernet1/0 (172.2.3.112)<br />
*Mar 20 01:32:35.391: RIP: build flash update entries<br />
*Mar 20 01:32:35.391:   11.11.11.0/24 via 0.0.0.0, metric 16, tag 0<br />
*Mar 20 01:32:35.391:   172.3.4.0/24 via 0.0.0.0, metric 16, tag 0<br />
*Mar 20 01:32:35.435: RIP: received v2 update from 172.1.2.111 on FastEthernet0/0<br />
R2#<br />
*Mar 20 01:32:35.435:      11.11.11.0/24 via 0.0.0.0 in 16 hops  (inaccessible)<br />
*Mar 20 01:32:35.435:      172.3.4.0/24 via 0.0.0.0 in 16 hops  (inaccessible)<br />
R2#<br />
R2#</code><br /><code>R2#show ip route<br />
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP<br />
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area<br />
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2<br />
       E1 - OSPF external type 1, E2 - OSPF external type 2<br />
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area<br />
       * - candidate default, U - per-user static route, o - ODR<br />
       P - periodic downloaded static route</code><br /><code></code><br /><code>Gateway of last resort is not set</code><br /><code></code><br /><code>     172.1.0.0/24 is subnetted, 2 subnets<br />
R       172.1.4.0 [120/1] via 172.1.2.111, 00:00:22, FastEthernet0/0<br />
C       172.1.2.0 is directly connected, FastEthernet0/0<br />
     172.2.0.0/24 is subnetted, 1 subnets<br />
C       172.2.3.0 is directly connected, FastEthernet1/0<br />
     172.3.0.0/24 is subnetted, 1 subnets<br />
R       172.3.4.0/24 is possibly down,<br />
          routing via 172.2.3.113, FastEthernet1/0<br />
     10.0.0.0/24 is subnetted, 1 subnets<br />
S       10.10.10.0 [1/0] via 172.2.3.0<br />
     11.0.0.0/24 is subnetted, 1 subnets<br />
R       11.11.11.0/24 is possibly down,<br />
          routing via 172.2.3.113, FastEthernet1/0<br />
R2#</code></div>
<p>Once invalid timer expires, R2 enters <strong>Hold Down Timer</strong> which will expire in 90 seconds. During this time R2 will accept other routes for 11.11.11.0 only if its metric is 1 or less. We now add a static route on R4 with subnet 11.11.11.0 and redistribute it into RIP. This update now will reach R2 by traversing through R1. The metric will be 3 at R2 and since it is greater than 1 and R2 is still running the hold down timer, this route is not accepted. We will still see the 11.11.11.0 subnet as possibly down.</p>
<div class="configblock"><code>*Mar 20 01:41:53.447: RIP: received v2 update from 172.1.2.111 on FastEthernet0/0<br />
*Mar 20 01:41:53.447:      11.11.11.0/24 via 0.0.0.0 in 2 hops</code></div>
<p>We immediately disable the 11.11.11.0 subnet at R4. Now when the Hold Down timer expires, R2 waits till the <strong>Flush Timer</strong> expires before it purges the subnet from its routing table.</p>
<p>So I think now we can clearly describe how the RIP Timers run. It is quite simple actually but it tends to get confusing.</p>
]]></content:encoded>
			<wfw:commentRss>http://networkprotocolsblog.com/tutorials/understanding-rip-timers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stepping into OSPF</title>
		<link>http://networkprotocolsblog.com/routing/ospf/stepping-into-ospf/</link>
		<comments>http://networkprotocolsblog.com/routing/ospf/stepping-into-ospf/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 16:28:12 +0000</pubDate>
		<dc:creator><![CDATA[Shubhojyoti Bhattacharya]]></dc:creator>
				<category><![CDATA[OSPF]]></category>

		<guid isPermaLink="false">http://networkprotocolsblog.com/?p=353</guid>
		<description><![CDATA[Lets jump into OSPF today and get to know few basics. OSPF stands for <strong>Open Shortest Path First</strong>. It is classified under IGP group of protocols. It is an example of a <strong>link-state routing protocol</strong>. Specifically the name of the algorithm used in OSPF is <strong>Dijkstra's Algorithm</strong>. We will talk about it in a later post. The major way of functioning of a Link State Protocol (and hence OSPF), is exchanging the topology information using the "link states". The <em>link state </em>implies that we include information about the link as well as the current state of the link. All the <em>link states</em> together form the Link State Database (LSDB). 
 
Let me point out the steps into enabling and running OSPF in a network: 
]]></description>
				<content:encoded><![CDATA[<p>Lets jump into OSPF today and get to know few basics. OSPF stands for <strong>Open Shortest Path First</strong>. It is classified under IGP group of protocols. It is an example of a <strong>link-state routing protocol</strong>. Specifically the name of the algorithm used in OSPF is <strong>Dijkstra&#8217;s Algorithm</strong>. We will talk about it in a later post. The major way of functioning of a Link State Protocol (and hence OSPF), is exchanging the topology information using the &#8220;link states&#8221;. The <em>link state </em>implies that we include information about the link as well as the current state of the link. All the <em>link states</em> together form the Link State Database (LSDB).</p>
<p>Let me point out the steps into enabling and running OSPF in a network:</p>
<ul>
<li>Identify the OSPF routers by marking each of them with a <em>unique <strong>router id</strong></em>.</li>
<li>Establish adjacency and neighbor relations between the router in the network.</li>
<li>Exchange the link state database so that each router can calculate the shortest path to each link using the SPF algorithm.</li>
<li>Whenever a new link is added or there is a change in topology, then an update is triggered to the entire network. If no changes occur then the link information are refreshed after 30 mins to ensure that the database state is accurate and current.</li>
</ul>
<h3>Assigning the Router ID</h3>
<p>Router ID is used to simply identify the router. It is of the 4 byte IP address format A.B.C.D. It is not an address that need to be reachable using the routing table. The ID can be explicitly mentioned or can be derived from the existing IP addresses on the router. The sequence to be used is &#8211;</p>
<ol>
<li>If an explicit router id is mentioned, then this id is preferred. Usually the command is <strong>router-id &lt;A.B.C.D&gt;</strong>.</li>
<li>If no router id is mentioned explicitly, then use the highest IP address from the available up and running loopback interfaces.</li>
<li>If no loopback interfaces are present, then use the highest IP address from the available up and running physical interfaces.</li>
</ol>
<p>A router ID once configured (or derived), doesnt change till the OSPF process is refreshed in the router. If a router ID changes, then all routers in the network need to rerun their SPF calculations.</p>
<p>Router IDs are used to identify the routers and they are also used in many other steps during the setting up of OSPF adjacency as will be described later.</p>
<h3>OSPF Messages</h3>
<p>OSPF is a pure Layer 3 routing protocol and the messages are encapsulated directly into IP packets. The IP protocol number for OSPF is 89.</p>
<p>Each and every step in OSPF be it the establishment of neighbor relationships, exchanging of the link state database and establishing the complete adjacency, is done with the help of OSPF messages (or packets). We will establish here a term that is used to describe all link state packets &#8211; Link State Advertisements (LSA). There are 5 different types of OSPF messages &#8211;</p>
<ol>
<li><strong>Hello Packets</strong> &#8211; This is used for finding neighbors, establishing neighbor relationships and checking the liveliness and availability of the neighbor.</li>
<li><strong>Database Description (DBD) Packets</strong> &#8211; These are used to exchange the LSA headers, so that a router create a list of LSAs that it will need from a neighbor.</li>
<li><strong>Link-State Request (LSR) Packets</strong> &#8211; These packets contains a list of one or more LSAs which the router wants its neighbor to send complete details about.</li>
<li><strong>Link-State Update (LSU)</strong> &#8211; These packets the complete LSAs. These are sent usually in response to an LSR message.</li>
<li><strong>Link-State Acknowledgement (LSAck)</strong> &#8211; These packets are sent to confirm receipt of an LSU message.</li>
</ol>
<h3>States of an OSPF Router</h3>
<p>Lets briefly list here the various OSPF states. I will talk about them in greater detail in a future post.</p>
<ol>
<li>Init &#8211; As soon as OSPF is enabled in a router, the Init state is achieved.</li>
<li>2-Way &#8211; An OSPF router transitions to 2-Way state once bi-directional hello exchange has been done per router. As we will see later, DR and BDR election is done during this state if required.</li>
<li>ExStart &#8211; During this state, a Master-Slave relationship is achieved between each neighbor. This is based on the Router IDs of the neighbors.</li>
<li>Exchange &#8211; During this state, DBD packets are exchanged between the neighbors and the routers create LSRs.</li>
<li>Loading &#8211; The actual exchange of the LSAs occur during this state using LSRs, LSUs and LSAcks.</li>
<li>Full &#8211; Once all LSAs have been exchanged, the router transitions to Full State.</li>
</ol>
<p>This was a brief introduction to OSPF. I will keep discussing all the above concepts and many more in detail in later posts.</p>
]]></content:encoded>
			<wfw:commentRss>http://networkprotocolsblog.com/routing/ospf/stepping-into-ospf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to RIP</title>
		<link>http://networkprotocolsblog.com/routing/rip/rip-intro/</link>
		<comments>http://networkprotocolsblog.com/routing/rip/rip-intro/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 11:23:23 +0000</pubDate>
		<dc:creator><![CDATA[Shubhojyoti Bhattacharya]]></dc:creator>
				<category><![CDATA[RIP]]></category>

		<guid isPermaLink="false">http://networkprotocolsblog.com/?p=317</guid>
		<description><![CDATA[One of the simplest routing protocol is Routing Information Protocol (RIP). It is classified as an IGP and it uses the <strong>distance-vector algorithm</strong>. Specifically the algorithm is called <strong>Bellman-Ford Algorithm</strong>. I will discuss the algorithm in a later post. Today I will describe briefly about the protocol and how it works. The protocol has 2 versions RIPv1 and RIPv2. Both are in use today and have significant differences. RIP has also been adapted for IPv6. This is called RIPng. RIP uses UDP to transmit its updates. The UDP port used is 520. RIP neighbors exchange their complete routing table at regular interval of 30 seconds (default). This is called the update timer. There is no session formation between RIP neighbors. Once RIP is enabled on a network subnet, it immediately starts]]></description>
				<content:encoded><![CDATA[<p>One of the simplest routing protocol is Routing Information Protocol (RIP). It is classified as an IGP and it uses the <strong>distance-vector algorithm</strong>. Specifically the algorithm is called <strong>Bellman-Ford Algorithm</strong>. I will discuss the algorithm in a later post. Today I will describe briefly about the protocol and how it works. The protocol has 2 versions RIPv1 and RIPv2. Both are in use today and have significant differences. RIP has also been adapted for IPv6. This is called RIPng. RIP uses UDP to transmit its updates. The UDP port used is 520. RIP neighbors exchange their complete routing table at regular interval of 30 seconds (default). This is called the update timer. There is no session formation between RIP neighbors. Once RIP is enabled on a network subnet, it immediately starts sending the RIP updates.</p>
<h3>Differences between RIPv1 and RIPv2</h3>
<table class="posttable">
<tbody>
<tr>
<th>RIP Version 1</th>
<th>RIP Version 2</th>
</tr>
<tr>
<td>Update Message is sent to local subnet broadcast address viz. 255.255.255.0</td>
<td>Update Message is sent to multicast address 224.0.0.9</td>
</tr>
<tr>
<td>No authentication support is available</td>
<td>Support available for both plain text and MD5 authentication.</td>
</tr>
<tr>
<td>VLSM support not present. Hence RIPv1 is classful. Only the default subnet masks of Class A (/8), Class B (/16) and Class C (/24) addresses are used. These subnet masks are not sent in the updates. When the routes are received, the masks are derived from the addresses.</td>
<td>Supports VLSM. The subnet mask is carried in the updates and hence RIPv2 is classless. Also RIPv2 can still come up when a network is discontiguous due to this feature.</td>
</tr>
<tr>
<td>Doesn&#8217;t allow a router to advertise a different next-hop router than itself.</td>
<td>Supports Next Hop field in the Update message. Hence a router can specify another router as a next-hop.</td>
</tr>
</tbody>
</table>
<h3>RIP Timers</h3>
<p>RIP uses 4 different timers which help in maintaining the routing table and helps in avoiding loops. All these timers are per route. These are:</p>
<ol>
<li><strong>Update timer</strong> (30 secs) &#8211; This is the interval which states how often the update for a specific route must be sent.</li>
<li><strong>Invalid timer</strong> (180 secs) &#8211; This is the interval which states that once an update is received for a route how long to wait till the route is considered invalid or non-reachable.</li>
<li><strong>Hold down timer</strong> (180 secs) &#8211; If a route gets a worse metric and is updated, the hold down timer is started. During this time no other metric for the route is accepted which is equal or worse than the current metric.</li>
<li><strong>Flush or Garbage timer</strong> (240 secs) &#8211; This is the interval which states how long to wait since the last valid update before removing the route from the routing table.</li>
</ol>
<p>Whenever a valid update is received from a neighbor, the update, invalid and flush timer resets to 0. The hold down timer resets to 0 whenever a metric gets worse.</p>
<p>RIP uses hop count as the metric. So in case a prefix is received from multiple path, the prefix with a smaller no of hops will be preferred. RIP allows up to 15 hops. 16 hops and above are considered to be infinite and those routes are deemed to be unreachable. This limit in the number of hops prevents loops. Unlike other protocols like OSPF and ISIS, which are link state protocols and whose implementation itself ensures loop free network, RIP uses some specific concepts which help in loop prevention. This makes RIP a great protocol in terms of implementation but this also introduces a larger convergence time.</p>
<h3>Loop Prevention Concepts in RIP</h3>
<ol>
<li><strong>Split Horizon</strong> &#8211; Even though in RIP the entire routing table is sent to the neighbors, RIP omits the routes which has been advertised by the neighbor to whom the update is being sent. In other words, if the outgoing interface of a route matches the interface out of which the new update is to be sent, then that route is omitted.</li>
<li><strong>Route Poisoning</strong> &#8211; When a route&#8217;s reachability fails, the update is sent with the metric of that route as 16 (infinite) thereby specifying to the neighbors that the route is unreachable.</li>
<li><strong>Poison Reverse</strong> &#8211; In this case, the route with an infinite metric is advertised out the same interface through which it is received with the same infinite metric. Split Horizon with Poison Reverse is used together in most of the cases.</li>
</ol>
<p>These are mostly the basics of RIP. I will discuss few convergence examples in a later post.</p>
]]></content:encoded>
			<wfw:commentRss>http://networkprotocolsblog.com/routing/rip/rip-intro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning new concepts</title>
		<link>http://networkprotocolsblog.com/personal/learning-new-concepts/</link>
		<comments>http://networkprotocolsblog.com/personal/learning-new-concepts/#comments</comments>
		<pubDate>Sat, 12 Mar 2011 12:03:39 +0000</pubDate>
		<dc:creator><![CDATA[Shubhojyoti Bhattacharya]]></dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://networkprotocolsblog.com/?p=10</guid>
		<description><![CDATA[Networking as a domain doesnt always evolve as rapidly as some other technologies - the main reason being the base concepts over which everything is build up has remained the same for quite some time. However the sheer magnitude of the domain is plain daunting. It is very vast. Though I am no veteran in this field but still working on quite a few protocols for the past 6 yrs I should consider myself an intermediate level person in this domain. But alas its not true. Because there are lots and lots of topics that I am either not aware of or not comfortable with. So I always wonder how everyone approaches a new protocol or concept. 
 
  
I usually use a mixture of various steps. It all depends]]></description>
				<content:encoded><![CDATA[<p>Networking as a domain doesnt always evolve as rapidly as some other technologies &#8211; the main reason being the base concepts over which everything is build up has remained the same for quite some time. However the sheer magnitude of the domain is plain daunting. It is very vast. Though I am no veteran in this field but still working on quite a few protocols for the past 6 yrs I should consider myself an intermediate level person in this domain. But alas its not true. Because there are lots and lots of topics that I am either not aware of or not comfortable with. So I always wonder how everyone approaches a new protocol or concept.</p>
<p>&nbsp;<br />
I usually use a mixture of various steps. It all depends on the comfort factor. One way of learning is reading up on the topic quite extensively and then trying to implement it practically. I followed this path while learning about BGP. The first ever I had to work on for BGP was when the protocol stack was upgrading the BGP RFC implementation along with the introduction of 4 byte AS numbers. Till that time I absolutely had no clue about BGP. So it was a golden opportunity for me to learn it. Because its rare nowadays to get an opportunity to test protocols like BGP and OSPF from the scratch. How I approached here was I read through some online PDFs about BGP. Once I got comfortable with the basic terms in BGP, I directly jumped on the RFC. I always find reading a RFC very difficult. The main reason for this is I feel them quite dry. You just read and read and go on <img src="http://networkprotocolsblog.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> But in this case I was quite pumped up about learning BGP. So I actually went through each and every section 2 to 3 times. After all the extensive reading, I tried my hand on configuring it on my box and then went from there.</p>
<p>&nbsp;<br />
However for me the first way doesnt work always. The first protocol I ever learnt was RIP <img src="http://networkprotocolsblog.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> Now I was quite naive at that time, so reading docs and RFCs at that time was just plain not possible for me. I wouldnt have understood anything at that point. So I used the reverse way here. I directly used the configuration guides and jumped on the routers and configured RIP. Now I tried to make sense of what was going on. I got very excited when I was able to redistribute static routes and it appeared in the other router <img src="http://networkprotocolsblog.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> Following the implementation and config guides once I ran through the entire protocol I then went back to the books to learn in detail. And guess what I was able to understand everything now.</p>
<p>&nbsp;<br />
The third way, which I think I am most comfortable in, is a combination of the above. Start with the reading, get little knowledge, jump to configuring the protocol, come back to reading and go back to configuration. Or it can be the reverse, start with configs, then read then again configure. I use this method the maximum amount of time. I have been able to learn most of the switching protocols, BGP route reflectors and various other concepts using this step.<br />
There can be various other ways for learning too. All articles, concepts and learnings I will jot down in this blog, I have learnt using one of the above ways. Hope you find them useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://networkprotocolsblog.com/personal/learning-new-concepts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Beginning</title>
		<link>http://networkprotocolsblog.com/personal/the-beginning/</link>
		<comments>http://networkprotocolsblog.com/personal/the-beginning/#comments</comments>
		<pubDate>Wed, 09 Mar 2011 18:50:05 +0000</pubDate>
		<dc:creator><![CDATA[Shubhojyoti Bhattacharya]]></dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://networkprotocolsblog.com/?p=4</guid>
		<description><![CDATA[Okay the title might sound cheesy but I feel its apt for this post. This is kind of me welcoming myself to the blog. I havent yet decided about what I will start my writing. Though I do have 3-4 tutorials planned. The planning stage was simple enough but now that I am putting this blog live I am a bit nervous. Hopefully things will settle down as time passes by :)]]></description>
				<content:encoded><![CDATA[<p>Okay the title might sound cheesy but I feel its apt for this post. This is kind of me welcoming myself to the blog. I havent yet decided about what I will start my writing. Though I do have 3-4 tutorials planned. The planning stage was simple enough but now that I am putting this blog live I am a bit nervous. Hopefully things will settle down as time passes by <img src="http://networkprotocolsblog.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley"></p>
]]></content:encoded>
			<wfw:commentRss>http://networkprotocolsblog.com/personal/the-beginning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
