<?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>CCIE Lab &#187; Switching</title>
	<atom:link href="http://ccielab.ro/category/ccnp/switching/feed/" rel="self" type="application/rss+xml" />
	<link>http://ccielab.ro</link>
	<description>Cry in the Lab, Laugh in the Datacenter</description>
	<lastBuildDate>Mon, 02 Jan 2012 00:15:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>DHCP Relay Server and NAT Case Study</title>
		<link>http://ccielab.ro/2010/08/dhcp-relay-server-and-nat-case-study/</link>
		<comments>http://ccielab.ro/2010/08/dhcp-relay-server-and-nat-case-study/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 17:38:37 +0000</pubDate>
		<dc:creator>Alex Juncu</dc:creator>
				<category><![CDATA[CCNA]]></category>
		<category><![CDATA[CCNP]]></category>
		<category><![CDATA[Routing]]></category>
		<category><![CDATA[Switching]]></category>
		<category><![CDATA[boradcast]]></category>
		<category><![CDATA[debug ip packet]]></category>
		<category><![CDATA[debup ip dhcp server]]></category>
		<category><![CDATA[DHCP]]></category>
		<category><![CDATA[DHCP Relay]]></category>
		<category><![CDATA[Gateway IP Address]]></category>
		<category><![CDATA[GIADDR]]></category>
		<category><![CDATA[inside nat]]></category>
		<category><![CDATA[ip helper-address]]></category>
		<category><![CDATA[NAT]]></category>
		<category><![CDATA[PAT]]></category>
		<category><![CDATA[unicast]]></category>

		<guid isPermaLink="false">http://ccielab.ro/?p=143</guid>
		<description><![CDATA[Topology:

Scenario:
The Host in the 192.168.0.0/24 network should get its IP address from a DHCP server.
Relay is the default router for the Host, but doesn&#8217;t have a DHCP service running. It will pass any DHCP requests from it&#8217; f1/0 interface to the DHCP server that has DHCP pools configured on it, using the &#8220;ip helper-addres&#8221; command.
Between [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Topology:</strong></p>
<p><img class="alignnone size-full wp-image-144" src="http://ccielab.ro/wp-content/uploads/2010/07/dhcp_nat.png" alt="dhcp_nat" width="307" height="109" /></p>
<p style="text-align: justify"><strong>Scenario:</strong></p>
<p style="text-align: justify">The <strong>Host</strong> in the 192.168.0.0/24 network should get its IP address from a DHCP server.</p>
<p style="text-align: justify"><strong>Relay</strong> is the default router for the <strong>Host</strong>, but doesn&#8217;t have a DHCP service running. It will pass any DHCP requests from it&#8217; f1/0 interface to the <strong>DHCP</strong> server that has <strong>DHCP pools</strong> configured on it, using the <strong>&#8220;ip helper-addres&#8221;</strong> command.</p>
<p style="text-align: justify">Between the <strong>DHCP</strong> router and the <strong>Relay</strong> router there is a public network, but behind <strong>Relay</strong>, there is a private network (<strong>Host</strong> is part of that network).  Relay will use <strong>NAT with overload</strong> (PAT) to service the private network.</p>
<p style="text-align: justify"><strong>Relay</strong> uses <strong>DHCP</strong> as it&#8217;s default route to the Internet, but DHCP doesn&#8217;t know about the private network in which <strong>Host</strong> is in (private networks shoudn&#8217;t be permitted to be accessed from the Internet).</p>
<p style="text-align: justify"><strong>Configurations:</strong></p>
<p>DHCP:</p>
<blockquote><p>ip dhcp pool DHCP_POOL<br />
network 192.168.0.0 255.255.255.0<br />
default-router 192.168.0.1</p>
<p>interface FastEthernet0/0<br />
ip address 200.0.0.1 255.255.255.0</p></blockquote>
<p>Relay:</p>
<blockquote><p>interface FastEthernet0/0<br />
ip address 200.0.0.100 255.255.255.0<br />
ip nat outside</p>
<p>interface FastEthernet1/0<br />
ip address 192.168.0.1 255.255.255.0<br />
ip helper-address 200.0.0.1<br />
ip nat inside</p>
<p>ip nat inside source list NAT_HOSTS interface FastEthernet0/0 overload</p>
<p>ip access-list standard NAT_HOSTS<br />
permit 192.168.0.0 0.0.0.255</p></blockquote>
<p>Host:</p>
<blockquote><p>interface FastEthernet1/0<br />
ip address dhcp</p></blockquote>
<p><strong>Problem:</strong></p>
<p><strong>Relay</strong> will receive a DHCP request (broadcast) on F1/0 interface. Because of the &#8220;<strong>ip helper-address</strong>&#8220;, <strong>Relay</strong> will transform the request from broadcast to unicast and send it to the <strong>DHCP</strong> router. The  DHCP request will reach the router, it will assign  an IP from the pool, but the reply will never reach <strong>Host</strong>.</p>
<p><strong>Explenation:</strong></p>
<p>Using &#8220;<strong>debug ip dhcp server events</strong>&#8220;, &#8220;<strong>debug ip dhcp server packet</strong>&#8221; and &#8220;<strong>debug ip packet</strong>&#8220;, we can find out the problem.</p>
<p>The first thing that could come to mind is the fapt that if <strong>Relay</strong> receives a packet on F1/0 interface (192.168.0.1) it will send an unicast message with the source IP address of that interface and a destination address of the ip-helper server. This is not true. The relayed request is considered to be generated by the local router (<strong>Relay</strong>). This means that the source IP address of the relayed request is that of the outgoing interface to the DHCP Server. Here is the <strong>debug ip packet</strong> output:</p>
<blockquote><p>*Mar  1 02:33:23.127: IP: tableid=0, s=200.0.0.100 (FastEthernet0/0), d=200.0.0. 1 (FastEthernet0/0), routed via RIB</p></blockquote>
<p>If  the source address of the IP packet does not have an IP address from the 192.168.0.0/24 network, how does the DHCP Server know from witch pool to give out a free address. The answer is a field in the DHCP protocol, called GIADDR (Gateway IP Address). The value of this field will be the IP address of the interface in the private network.</p>
<p>The problem is that after the DHCP server chooses an IP from the pool, it will reply to the unicast request, with another unicast packet that has the destination IP the GIADDR, not the source address of the request. The output from <strong>debug ip dhcp server events:</strong></p>
<blockquote><p>*Mar  1 03:13:33.719: DHCPD: DHCPDISCOVER received from client 0063.6973.636f.2d 63.6330.322e.3035.6230.2e30.3031.302d.4661.312f.30 through relay 192.168.0.1.<br />
*Mar  1 03:13:33.731: DHCPD: Sending DHCPOFFER to client 0063.6973.636f.2d63.6330.322e.3035.6230.2e30.3031.302d.4661.312f.30 (192.168.0.2).<br />
*Mar  1 03:13:33.731: DHCPD: unicasting BOOTREPLY for client cc02.05b0.0010 to relay 192.168.0.1</p></blockquote>
<p>The <strong>DHCP</strong> router doesn&#8217;t know about the 192.168.0.0/24 network because that is a private network behind a NAT.</p>
<p>A solution to the situation is to add a static route on the <strong>DHCP</strong> router to the private network. But this would ruin the purpose of NAT. A better solution is to avoid the scenario by design (still, the situation could come up in lab environments and you should now know why it behaves the way it does)</p>
]]></content:encoded>
			<wfw:commentRss>http://ccielab.ro/2010/08/dhcp-relay-server-and-nat-case-study/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Weird Things on Cisco Switches – Case study #2: VTP</title>
		<link>http://ccielab.ro/2009/11/wierd-things-on-cisco-switches-%e2%80%93-case-study-2-vtp/</link>
		<comments>http://ccielab.ro/2009/11/wierd-things-on-cisco-switches-%e2%80%93-case-study-2-vtp/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 09:37:09 +0000</pubDate>
		<dc:creator>Alex Juncu</dc:creator>
				<category><![CDATA[CCNP]]></category>
		<category><![CDATA[Switching]]></category>
		<category><![CDATA[dot1q]]></category>
		<category><![CDATA[Transparent Mode]]></category>
		<category><![CDATA[VLAN]]></category>
		<category><![CDATA[VTP]]></category>

		<guid isPermaLink="false">http://ccielab.ro/?p=64</guid>
		<description><![CDATA[To lower broadcast traffic in our network or for some extra security we use Virtual LANs. Cisco switches can be configured with Ethernet VLAN IDs ranging from 1 to 1001 and, with the extended VLANs, from 1006 to 4096. For trunking, we can use the IEEE 802.1Q (dot1q) protocol that can support the extended VLANs [...]]]></description>
			<content:encoded><![CDATA[<p>To lower broadcast traffic in our network or for some extra security we use Virtual LANs. Cisco switches can be configured with Ethernet VLAN IDs ranging from 1 to 1001 and, with the extended VLANs, from 1006 to 4096. For trunking, we can use the IEEE 802.1Q (dot1q) protocol that can support the extended VLANs (1-4096).</p>
<p>The fisrt important rule of implementing VLANs in a network tells us that a switch won&#8217;t forward a frame from a VLAN if it does not know about that VLAN. All the switches in a network need to know about all the VLANs regardless of the fact that they have or not local access ports in those VLANs. So, we need to go to every switch and configure all the VLAN IDs, or we could use VTP (VLAN Trunking Protocol), Cisco&#8217;s proprietary protocol that automatically configures network-wide all the VLANs. Remember, VTP is on by default, in Server mode.</p>
<p>But the use of VTP can sometimes lead to unexpected behavior on the switch. Most common is when you try to reset your switch and you delete the running-config and the flash:vlan.dat, reload the IOS and find all your VLANs still there. If you have VTP configured in your network (without authentication), upon boot-up, the switch will get the VLAN information from it&#8217;s VTP neighbors, the reason being that the default configuration is Server mode. The solution would be to set the switch in Transparent mode and delete the VLANs.</p>
<p>The configuration of VTP Transparent mode causes another strange exception. As we are have studied in CCNA, the vlan.dat file in flash holds the VLAN information for a switch, not the running-config in NVRAM. This is not true when dealing with Transparent mode. If the switch is in VTP transparent mode, the VLAN information IS stored in running-config. So, if you configure vtp mode transparent, configure some VLANs, delete the vlan.dat and reboot, you will find the VLANs still there.</p>
<p>One more situation where VLANs are stored in running-config is when we use extended VLANs. Regardless of VTP mode, if we configure a VLAN with an ID greater than 1006, it will be stored as an entry in running-config. Extended VLANs will NOT be carried through VTP, so it makes sense not to store them in vlan.dat, because the switch will try to synchronize the file with the VTP information.</p>
]]></content:encoded>
			<wfw:commentRss>http://ccielab.ro/2009/11/wierd-things-on-cisco-switches-%e2%80%93-case-study-2-vtp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Weird Things on Cisco Switches &#8211; Case study #1: DTP</title>
		<link>http://ccielab.ro/2009/11/wierd-things-on-cisco-switches-case-study-1-dtp/</link>
		<comments>http://ccielab.ro/2009/11/wierd-things-on-cisco-switches-case-study-1-dtp/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 15:06:40 +0000</pubDate>
		<dc:creator>Alex Juncu</dc:creator>
				<category><![CDATA[CCNP]]></category>
		<category><![CDATA[Switching]]></category>
		<category><![CDATA[dtp]]></category>
		<category><![CDATA[trunking]]></category>

		<guid isPermaLink="false">http://ccielab.ro/?p=45</guid>
		<description><![CDATA[Networking is sometimes hard not because of the concepts that you need to apply, but because of the difference in implementation of some protocols on the equipment. For example, the default settings for DTP differ from one switch model to the next.
DTP (Dynamic Trunking Protocol) is used to negotiate a trunk link between two switches. [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify">Networking is sometimes hard not because of the concepts that you need to apply, but because of the difference in implementation of some protocols on the equipment. For example, the default settings for DTP differ from one switch model to the next.</p>
<p style="text-align: justify"><strong>DTP</strong> (Dynamic Trunking Protocol) is used to negotiate a trunk link between two switches. From the DTP point of view, a port can be &#8216;<strong>desirable</strong>&#8216; (it will actively try to negotiate a  trunk), &#8216;<strong>auto</strong>&#8216; (it will form a trunk if the other side wants to be a trunk) and &#8216;<strong>non-negotiate</strong>&#8216; (port will not negotiate the link). The reason for this protocol is to have a working access or trunk link immediately after you connect the switch to the network.   Most of the combinations are:</p>
<ul style="text-align: justify">
<li>auto &#8211; auto =&gt; access</li>
<li>auto &#8211; desirable =&gt; trunk</li>
<li>desirable-desirable =&gt; trunk</li>
<li>auto &#8211; trunk =&gt; trunk</li>
<li>auto &#8211; access =&gt; access</li>
<li>desirable &#8211; trunk =&gt; trunk</li>
<li>desirable &#8211; access =&gt; access</li>
</ul>
<p style="text-align: justify">What you should pay attention to is the default setting of a port on different switch models. On a <strong>2950 </strong>(Layer 2 switch) and a <strong>3550 </strong>(Layer 3 switch), a port is, before any configurations, in <strong>desirable</strong>. If you connect two of these switches, you will have a trunk link formed. On the other hand, on a <strong>2960</strong> or a <strong>3560</strong>, a port is in <strong>auto</strong>, so between these models, you will have an access port (by default, in VLAN 1). Even more problems could arrive when you have in a network switches of different models. If you connect a 2960 and a 2950, because the first is in auto and the second  is in desirable, a trunk link will be negotiated, so you should be careful when dealing with these kinds of situations.</p>
]]></content:encoded>
			<wfw:commentRss>http://ccielab.ro/2009/11/wierd-things-on-cisco-switches-case-study-1-dtp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

