<?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>Senín ( con n ) &#187; redes</title>
	<atom:link href="http://www.senin.org/weblog/category/redes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.senin.org/weblog</link>
	<description>Mis notas rápidas de perl y shell</description>
	<lastBuildDate>Wed, 28 Jul 2010 23:14:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>error resolving source: libnet_get_ipaddr4(): ioctl(): Cannot assign requested address</title>
		<link>http://www.senin.org/weblog/2009/11/23/error-resolving-source-libnet_get_ipaddr4-ioctl-cannot-assign-requested-address/</link>
		<comments>http://www.senin.org/weblog/2009/11/23/error-resolving-source-libnet_get_ipaddr4-ioctl-cannot-assign-requested-address/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 10:29:27 +0000</pubDate>
		<dc:creator>jorge</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[redes]]></category>

		<guid isPermaLink="false">http://www.senin.org/weblog/2009/11/23/error-resolving-source-libnet_get_ipaddr4-ioctl-cannot-assign-requested-address/</guid>
		<description><![CDATA[Traceando protocolo aparece este error : traceproto -p tcp 192.168.1.1 error resolving source: libnet_get_ipaddr4(): ioctl(): Cannot assign requested address Es debido a que no hay ip o que no hemos especificado el interface que debe tracear. Por defecto elige el primer interface disponible. En mi caso saliendo por wifi habría que definir el trace por [...]]]></description>
			<content:encoded><![CDATA[<p>Traceando protocolo aparece este error :</p>
<pre>
traceproto -p tcp 192.168.1.1
error resolving source: libnet_get_ipaddr4(): ioctl(): Cannot assign requested address
</pre>
<p>Es debido a que no hay ip o que no hemos especificado el interface que debe tracear. Por defecto elige el primer interface disponible.</p>
<p>En mi caso saliendo por wifi habría que definir el trace por &#8216;wlan0&#8242; </p>
<pre>
# traceproto -p tcp -F wlan0 192.168.1.1
traceproto: trace to 192.168.1.1 (192.168.1.1), port 80
using interface wlan0
ttl  1:  TCP Syn Ack from 192.168.1.1 (192.168.1.1)
	8.3820 ms	0.95900 ms	0.72100 ms

hop :  min   /  ave   /  max   :  # packets  :  # lost
-------------------------------------------------------
  1 : 0.72100 / 3.3540 / 8.3820 :   3 packets :   0 lost
------------------------Total--------------------------
total 0.72100 / 2.5155 / 8.3820 :   3 packets :   0 lost
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.senin.org/weblog/2009/11/23/error-resolving-source-libnet_get_ipaddr4-ioctl-cannot-assign-requested-address/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Colisiones</title>
		<link>http://www.senin.org/weblog/2006/05/19/colisiones/</link>
		<comments>http://www.senin.org/weblog/2006/05/19/colisiones/#comments</comments>
		<pubDate>Fri, 19 May 2006 11:28:11 +0000</pubDate>
		<dc:creator>jorge</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[redes]]></category>

		<guid isPermaLink="false">http://senin.org/weblog/colisiones</guid>
		<description><![CDATA[eth1 Link encap:Ethernet HWaddr 00:11:25:57:BC:69 inet addr:62.151.24.74 Bcast:62.151.24.79 Mask:255.255.255.240 inet6 addr: fe80::211:25ff:fe57:bc69/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:174549467 errors:0 dropped:0 overruns:0 frame:0 TX packets:190245054 errors:29876265 dropped:0 overruns:0 carrier:29876265 collisions:32648117 txqueuelen:1000 RX bytes:1089220947 (1.0 GiB) TX bytes:2670160874 (2.4 GiB) Base address:0&#215;4400 Memory:d0340000-d0360000 Las colisiones son _normales_ en redes CSMA/CD como Ethernet con lo [...]]]></description>
			<content:encoded><![CDATA[<p>eth1      Link encap:Ethernet  HWaddr 00:11:25:57:BC:69<br />
          inet addr:62.151.24.74  Bcast:62.151.24.79  Mask:255.255.255.240<br />
          inet6 addr: fe80::211:25ff:fe57:bc69/64 Scope:Link<br />
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1<br />
          RX packets:174549467 errors:0 dropped:0 overruns:0 frame:0<br />
          TX packets:190245054 errors:29876265 dropped:0 overruns:0 carrier:29876265<br />
          collisions:32648117 txqueuelen:1000<br />
          RX bytes:1089220947 (1.0 GiB)  TX bytes:2670160874 (2.4 GiB)<br />
          Base address:0&#215;4400 Memory:d0340000-d0360000</p>
<p>Las colisiones son _normales_ en redes CSMA/CD como Ethernet con lo que<br />
la cantidad absoluta de colisiones no es un problema, siempre y cuando<br />
no exceda el 3% de las transmisiones totales. Esto es, si</p>
<p>colisiones * 100 / ( transmisiones + colisiones ) <= 4</p>
<p>3264811700 / 222893171 = 14,6</p>
<p>como mucho debería ser 4</p>
<p>¿Podrías mirar si las tarjetas están generando muchas interrupciones? Puedes<br />
saberlo con un cat /proc/interrupts:</p>
<p>ender@bonzo:~$ cat /proc/interrupts<br />
           CPU0<br />
  0:  145243168          XT-PIC  timer<br />
  1:     658148          XT-PIC  keyboard<br />
  2:          0          XT-PIC  cascade<br />
  5:   12889488          XT-PIC  soundblaster<br />
  8:          3          XT-PIC  rtc<br />
 10:    2222796          XT-PIC  usb-uhci<br />
 12:    6588303          XT-PIC  eth0   <======= Este valor.<br />
 14:    1522717          XT-PIC  ide0<br />
 15:      10359          XT-PIC  ide1<br />
NMI:          0<br />
LOC:  145243899<br />
ERR:          0<br />
MIS:          0</p>
<p>	¿Sube *a lo bestia* cuando haces una transferencia? Debería subir en uno por<br />
cada paquete.</p>
<p>solucionado cuando han forzado el switch a full duplex<br />
mii-tool &#8211;force 100baseTx-FD eth1</p>
<p>Colisiones en inteface eth1</p>
<p>referencias</p>
<p>http://linux-ip.net/html/tools-ethernet.html</p>
<p>~# netstat -in<br />
Kernel Interface table<br />
Iface   MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg<br />
eth0   1500 0  1248529355      0      0      01238671872      0      0      0 BMRU<br />
eth1   1500 0  304093570      0      0      0345828281 45713974      0      0 BMRU<br />
lo    16436 0   3590482      0      0      0 3590482      0      0      0 LRU<br />
lo:1  16436 0       &#8211; no statistics available &#8211;                        LRU</p>
<p>eth1      Link encap:Ethernet  HWaddr 00:11:25:57:BC:69<br />
          inet addr:62.151.24.74  Bcast:62.151.24.79  Mask:255.255.255.240<br />
          inet6 addr: fe80::211:25ff:fe57:bc69/64 Scope:Link<br />
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1<br />
          RX packets:304226299 errors:0 dropped:0 overruns:0 frame:0<br />
          TX packets:346020913 errors:45713974 dropped:0 overruns:0 carrier:45713974<br />
          collisions:50035841 txqueuelen:1000<br />
          RX bytes:1487723678 (1.3 GiB)  TX bytes:1302534086 (1.2 GiB)<br />
          Base address:0&#215;4400 Memory:d0340000-d0360000</p>
<p>Cambiar de half-duplex a full-duplex</p>
<p># mii-tool eth0<br />
eth0: 10 Mbit, half duplex, link ok</p>
<p>Port Speed	Description<br />
10baseT-HD	10 megabit half duplex<br />
10baseT-FD	10 megabit full duplex<br />
100baseTx-HD	100 megabit half duplex<br />
100baseTx-FD	100 megabit full duplex</p>
<p>~# mii-tool eth0<br />
eth0: negotiated 100baseTx-FD, link ok</p>
<p>~# mii-tool -v<br />
eth0: negotiated 100baseTx-FD, link ok<br />
  product info: vendor 00:aa:00, model 56 rev 0<br />
  basic mode:   autonegotiation enabled<br />
  basic status: autonegotiation complete, link ok<br />
  capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD<br />
  advertising:  100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control<br />
  link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD<br />
eth1: negotiated 100baseTx-FD, link ok<br />
  product info: vendor 00:aa:00, model 56 rev 0<br />
  basic mode:   autonegotiation enabled<br />
  basic status: autonegotiation complete, link ok<br />
  capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD<br />
  advertising:  100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control<br />
  link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD</p>
<p># mii-tool &#8211;force 100baseTx-FD<br />
# mii-tool eth0<br />
eth0: 100 Mbit, full duplex, link ok</p>
<p>tambien se puede forzar en los parametros de los modulos dependiendo de la tarjeta </p>
<p>http://www.cites.uiuc.edu/network/autosense.html</p>
<p>Cisco Catalyst Switches<br />
Departmental Switches</p>
<p>On most multi-module Cisco switches, you can display the current port status with the command:</p>
<p>    show port mod/port(s) </p>
<p>The Duplex and Speed columns of the table will tell you what the current port mode is set to. If the port has been forced to a specific mode, that mode will simply be listed. If the port is set to auto-negotiation, but nothing is plugged into it, the speed and duplex will be reported as auto. If the current mode was the result of a successful auto-negotiation, the labels will be prefixed with &#8220;a-&#8221; (e.g. a-100 or a-full). To change the mode of a port, you can use the following commands:</p>
<p>    set port speed mod/port(s) mode,    with mode being either 10, 100, or auto.<br />
    set port duplex mod/port(s) mode,    with mode being either full or half. </p>
<p>If a port has its speed mode set to auto, the duplex mode will also be set to auto and you will not be able to change it. In order to change the duplex mode, you will need to set the speed mode to 10 or 100. For more information, see the Cisco Catalyst 5000 series Ethernet/Fast Ethernet Module manual.</p>
<p>If you are depending on auto-negotiation, please be sure that portfast is configured on, and etherchannel should be set to off. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.senin.org/weblog/2006/05/19/colisiones/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>tcpdump</title>
		<link>http://www.senin.org/weblog/2006/05/19/tcpdump/</link>
		<comments>http://www.senin.org/weblog/2006/05/19/tcpdump/#comments</comments>
		<pubDate>Fri, 19 May 2006 10:55:13 +0000</pubDate>
		<dc:creator>jorge</dc:creator>
				<category><![CDATA[Notas rápidas]]></category>
		<category><![CDATA[redes]]></category>

		<guid isPermaLink="false">http://senin.org/weblog/tcpdump</guid>
		<description><![CDATA[Para ver si llegan datos de la ip 192.168.1.100 al puerto 80 tcpdump -i eth0 host 192.168.1.100 and port 80]]></description>
			<content:encoded><![CDATA[<p>Para ver si llegan datos de la ip 192.168.1.100 al puerto 80</p>
<pre>tcpdump -i eth0 host 192.168.1.100 and port 80</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.senin.org/weblog/2006/05/19/tcpdump/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subneting</title>
		<link>http://www.senin.org/weblog/2006/05/19/subneting/</link>
		<comments>http://www.senin.org/weblog/2006/05/19/subneting/#comments</comments>
		<pubDate>Fri, 19 May 2006 10:32:53 +0000</pubDate>
		<dc:creator>jorge</dc:creator>
				<category><![CDATA[redes]]></category>

		<guid isPermaLink="false">http://senin.org/weblog/subneting</guid>
		<description><![CDATA[subneting ip -> xxx.xxx.xxx.xxx -> 4 octetos (0-254) -> 4 x 8 = 32 bits clase a 10.0.0.0 &#8211; 10.255.255.255 máscara /8 clase b 172.16.0.0 &#8211; 172.31.255.255 máscara /12 clase c 192.168.0.0 &#8211; 192.168.255.255 máscara /16 172.30.50.80/255.255.255.240 255.255.255 -> 11111111 111111111 11111111-> 24 bits ahora más el ultimo 240 -> 11110000 -> 4 bits fijos [...]]]></description>
			<content:encoded><![CDATA[<p>subneting</p>
<p>ip -> xxx.xxx.xxx.xxx -> 4 octetos (0-254) -> 4 x 8 = 32 bits</p>
<p>clase a<br />
10.0.0.0 &#8211; 10.255.255.255<br />
    máscara /8</p>
<p>clase b<br />
172.16.0.0 &#8211; 172.31.255.255<br />
    máscara /12</p>
<p>clase c<br />
192.168.0.0 &#8211; 192.168.255.255<br />
    máscara /16</p>
<p>172.30.50.80/255.255.255.240</p>
<p>255.255.255 -> 11111111 111111111 11111111->  24 bits<br />
ahora más el ultimo</p>
<p>240 -> 11110000 -> 4 bits fijos y 4 libres</p>
<p>24 + 4 -> 28 bits </p>
<p>entonces 255.255.255.240 es lo mismo que /28</p>
<p>con 4 bits podemos representar 2^4 = 16 ips</p>
]]></content:encoded>
			<wfw:commentRss>http://www.senin.org/weblog/2006/05/19/subneting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
