<?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; Uncategorized</title>
	<atom:link href="http://ccielab.ro/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://ccielab.ro</link>
	<description>Cry in the Lab, Laugh in the Datacenter</description>
	<lastBuildDate>Wed, 09 May 2012 12:02:36 +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>IP CEF</title>
		<link>http://ccielab.ro/2012/03/ip-cef/</link>
		<comments>http://ccielab.ro/2012/03/ip-cef/#comments</comments>
		<pubDate>Mon, 26 Mar 2012 21:35:51 +0000</pubDate>
		<dc:creator>Marius Bunget</dc:creator>
				<category><![CDATA[Routing]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ccielab.ro/?p=185</guid>
		<description><![CDATA[CEF load balancing is based on a combination of  source and destination packet information. It allows you to optimize  resources by distributing traffic over multiple paths for transferring  data to a destination. You can configure load balancing on a  per-destination or per-packet basis. Load balancing decisions are made  on the [...]]]></description>
			<content:encoded><![CDATA[<p><span>CEF load balancing is based on a combination of  source and destination packet information. It allows you to optimize  resources by distributing traffic over multiple paths for transferring  data to a destination. You can configure load balancing on a  per-destination or per-packet basis. Load balancing decisions are made  on the outbound interface. When you configure load balancing, configure  it on outbound interfaces. </span></p>
<p><span>Per-destination load balancing allows the router  to use multiple paths to achieve load sharing. Packets for a given  source-destination host pair are guaranteed to take the same path, even  if multiple paths are available. Traffic destined for different pairs  tend to take different paths. Per-destination load balancing is enabled  by default when you enable CEF.</span></p>
<p>To determine if CEF is enabled globally on a router, use the  commands <em><span>show ip cef</span></em> and <em><span>show ipv6 cef</span></em>. If it is not enabled by default, you  can turn it on globally using the command <em><span>ip  cef</span></em> for IPv4. To enable CEF for IPv6, first enable CEF for IPv4, then use  the command <em><span>ipv6 cef</span></em>. You can verify that CEF is enabled on an interface using the  commands <em><span>show cef interface</span> {interface}</em> and  <em><span>show ipv6 cef</span> {inte</em><em>rface} </em><span><em>detail</em></span>.</p>
<p>Topology</p>
<p style="text-align: center"><img class="size-full wp-image-205 aligncenter" src="http://ccielab.ro/wp-content/uploads/2012/03/ccielab.png" alt="ip cef" width="267" height="105" /></p>
<p style="text-align: left"><span lang="en"><span>The routing table</span> <span>of</span> <span>router</span> <span>R2</span> <span>is</span> <span>similar to</span> <span>R1:</span></span></p>
<p style="text-align: left">R1#show ip route</p>
<p style="text-align: left">[...]</p>
<p style="text-align: left">C    192.168.12.0/24 is directly connected, FastEthernet0/0<br />
1.0.0.0/24 is subnetted, 1 subnets<br />
C       1.1.1.0 is directly connected, Loopback1<br />
2.0.0.0/24 is subnetted, 1 subnets<br />
S       2.2.2.0 [1/0] via 192.168.21.2<br />
[1/0] via 192.168.12.2<br />
C    192.168.21.0/24 is directly connected, FastEthernet1/0</p>
<p style="text-align: left">Check if CEF is enabled and show the forwarding information base (FIB) with information obtained from the  routing table.</p>
<p style="text-align: left">R1#show ip cef<br />
Prefix                    Next Hop                    Interface<br />
0.0.0.0/0           drop                              Null0 (default route handler entry)<br />
0.0.0.0/32         receive<br />
1.1.1.0/24           attached                      Loopback1<br />
1.1.1.0/32           receive<br />
1.1.1.1/32            receive<br />
1.1.1.255/32       receive<br />
2.2.2.0/24           192.168.21.2            FastEthernet1/0<br />
192.168.12.2            FastEthernet0/0</p>
<p style="text-align: left">[...]</p>
<p>Routers with default configuration perform Load Sharing per destination, also known as Fast Switching. Fast switching is the default IOS switching mode in some routers. The <em>debug ip packet</em> command displays process packets.</p>
<p style="text-align: left">R1#debug ip packet<br />
IP packet debugging is on<br />
R1#ping 2.2.2.2 repeat 1</p>
<p>Type escape sequence to abort.<br />
Sending 1, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:<br />
!<br />
Success rate is 100 percent (1/1), round-trip min/avg/max = 56/56/56 ms<br />
R1#<br />
*Mar  1 00:39:40.379: IP: tableid=0, s=192.168.12.1 (local), d=2.2.2.2 (FastEthernet1/0), routed via FIB<br />
*Mar  1 00:39:40.379: IP: s=192.168.12.1 (local), d=2.2.2.2 (FastEthernet1/0), len 100, sending<br />
*Mar  1 00:39:40.431: IP: tableid=0, s=2.2.2.2 (FastEthernet0/0), d=192.168.12.1 (FastEthernet0/0), routed via RIB<br />
*Mar  1 00:39:40.431: IP: s=2.2.2.2 (FastEthernet0/0), d=192.168.12.1 (FastEthernet0/0), len 100, rcvd 3<br />
R1#ping 2.2.2.2 repeat 1 so<br />
R1#ping 2.2.2.2 repeat 1 source loo 1</p>
<p>Type escape sequence to abort.<br />
Sending 1, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:<br />
<span>Packet sent with a source address of 1.1.1.1</span><br />
!<br />
Success rate is 100 percent (1/1), round-trip min/avg/max = 56/56/56 ms<br />
R1#<br />
*Mar  1 00:39:48.411: IP: tableid=0, s=1.1.1.1 (local), d=2.2.2.2 (FastEthernet0/0), routed via FIB<br />
*Mar  1 00:39:48.411: IP: s=1.1.1.1 (local), d=2.2.2.2 (FastEthernet0/0), len 100, sending<br />
*Mar  1 00:39:48.467: IP: tableid=0, s=2.2.2.2 (FastEthernet1/0), d=1.1.1.1 (Loopback1), routed via RIB<br />
*Mar  1 00:39:48.467: IP: s=2.2.2.2 (FastEthernet1/0), d=1.1.1.1, len 100, rcvd 4</p>
<p style="text-align: left">Note that for different source-destination pairs the outbound interface changes.</p>
<p style="text-align: left"><span lang="en"><span>Per packet </span></span><span lang="en"><span>Load Sharing configuration.</span></span></p>
<p style="text-align: left">R1(config)#int f 0/0<br />
R1(config-if)#no ip route-cache    //enable process switching<br />
R1(config-if)#ip load-sharing per-packet<br />
R1(config-if)#exit<br />
R1(config)#int f 1/0<br />
R1(config-if)#no ip route-cache<br />
R1(config-if)#ip load-sharing per-packet<br />
R1(config-if)#exit</p>
<p style="text-align: left">R1#sh cef interface fastEthernet 0/0<br />
[...]<br />
Per packet load-sharing is enabled<br />
[...]<br />
Fast switching type 1, interface type 18<br />
IP CEF switching disabled</p>
<p style="text-align: left">Verify per packet Load Sharing:</p>
<p style="text-align: left">R1#ping 2.2.2.2 source loopback 1 repeat 3</p>
<p>Type escape sequence to abort.<br />
Sending 3, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:<br />
Packet sent with a source address of 1.1.1.1<br />
!!!<br />
Success rate is 100 percent (3/3), round-trip min/avg/max = 16/37/52 ms<br />
R1#<br />
*Mar  1 01:00:35.419: IP: tableid=0, s=1.1.1.1 (local), d=2.2.2.2 (FastEthernet1/0), routed via FIB<br />
*Mar  1 01:00:35.419: IP: s=1.1.1.1 (local), d=2.2.2.2 (FastEthernet1/0), len 100, sending<br />
!<br />
*Mar  1 01:00:35.467: IP: tableid=0, s=1.1.1.1 (local), d=2.2.2.2 (FastEthernet0/0), routed via FIB<br />
*Mar  1 01:00:35.467: IP: s=1.1.1.1 (local), d=2.2.2.2 (FastEthernet0/0), len 100, sending<br />
!<br />
*Mar  1 01:00:35.523: IP: tableid=0, s=1.1.1.1 (local), d=2.2.2.2 (FastEthernet1/0), routed via FIB<br />
*Mar  1 01:00:35.523: IP: s=1.1.1.1 (local), d=2.2.2.2 (FastEthernet1/0), len 100, sending</p>
<p>When CEF is disabled all the packets are processed by the Routing Information Base (RIB) as shown below:</p>
<p style="text-align: left">R1(config)#no ip cef<br />
R1(config)#exit<br />
R1#clear ip cef * prefix-statistics<br />
R1#clear ip cef 2.2.2.2 prefix-statistics<br />
R1#ping 2.2.2.2 source loopback 1 repeat 2<br />
Type escape sequence to abort.<br />
Sending 2, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:<br />
Packet sent with a source address of 1.1.1.1<br />
!!<br />
Success rate is 100 percent (2/2), round-trip min/avg/max = 28/56/84 ms<br />
*Mar  1 01:07:07.475: IP: tableid=0, s=1.1.1.1 (local), d=2.2.2.2 (FastEthernet0/0), routed via RIB<br />
*Mar  1 01:07:07.475: IP: s=1.1.1.1 (local), d=2.2.2.2 (FastEthernet0/0), len 100, sending<br />
!<br />
*Mar  1 01:07:07.507: IP: tableid=0, s=1.1.1.1 (local), d=2.2.2.2 (FastEthernet1/0), routed via RIB<br />
*Mar  1 01:07:07.507: IP: s=1.1.1.1 (local), d=2.2.2.2 (FastEthernet1/0), len 100, sending</p>
]]></content:encoded>
			<wfw:commentRss>http://ccielab.ro/2012/03/ip-cef/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic packet crafting</title>
		<link>http://ccielab.ro/2010/06/basic-pachet-crafting/</link>
		<comments>http://ccielab.ro/2010/06/basic-pachet-crafting/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 19:47:40 +0000</pubDate>
		<dc:creator>Dragos Draghicescu</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[acl]]></category>
		<category><![CDATA[craft]]></category>
		<category><![CDATA[hping]]></category>

		<guid isPermaLink="false">http://ccielab.ro/?p=86</guid>
		<description><![CDATA[Ok, this will be a short one  . I just want to raise attention on how can one bypass an extended (or standard) ACL (or access-list).
So, for this example, i have one router with an IP address of 10.10.10.2, which can be accessed only by the admin, only from 20.20.20.20. That is done with [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify">Ok, this will be a short one <img src='http://ccielab.ro/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . I just want to raise attention on how can one bypass an extended (or standard) ACL (or access-list).</p>
<p style="text-align: justify">So, for this example, i have one router with an IP address of 10.10.10.2, which can be accessed only by the admin, only from 20.20.20.20. That is done with an inbound ACL, put on the egress interface of the router. Looks like this:</p>
<pre>Extended IP access list 111</pre>
<pre>20 permit ip host 20.20.20.20 host 10.10.10.2 log</pre>
<p style="text-align: justify">There is a little problem with spoofing: the return traffic has to be routed back to the attacker. But everything will work just fine if you happen to be in the same network with the admin (you can achieve bidirectional communication). In case the attack is done over the Internet, there is still the possibility of a DOS (Denial Of Service), by sending tons of packets that will be accepted. I assumed another thing: your ISP does not check for the source of the packets (DOS attacks are less frequent if that simple measure is taken).</p>
<p style="text-align: justify">For the demonstration, i chose a well-known packet crafter named HPING3. It allows one to customize a packet at different layers and it`s well documented, but for now we will only use a fraction of it`s power:</p>
<pre><em><strong>$</strong></em><em> sudo hping3 -S 10.10.10.2 -a 20.20.20.20</em></pre>
<p>The result could be:</p>
<pre style="text-align: justify"><em>*Mar 1 05:52:01.702: %SEC-6-IPACCESSLOGP:</em></pre>
<pre style="text-align: justify"><em>list 111 permitted tcp 20.20.20.20(0) -&gt; 10.10.10.2(0), 360 packets</em></pre>
<p style="text-align: justify"><em>To check the amount of pings, you can issue the command &#8220;</em><em><strong>show ip traffic | section ICMP</strong></em><em>&#8220;. You can &#8220;<strong>clear ip traffic</strong></em><em>&#8221; before that.</em></p>
<p style="text-align: justify"><em>Despite this, ACLs are still adding a serious amount of security to your network. But in front of a determined attacker, one should do more than that in order to have a healthy network. </em></p>
]]></content:encoded>
			<wfw:commentRss>http://ccielab.ro/2010/06/basic-pachet-crafting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

