[CentOS-es] Probelma con 2 tarjeta de red en CentOS6.3

Antonio Manogué Saiz amanogue en sabeco.es
Mie Mar 20 11:47:53 UTC 2013


También voy entre líneas. 

Un saludo, 

Antonio MANOGUE 

----- Mensaje original -----
| De: "Francesc Guitart" <francesc.guitart en enise.fr>
| Para: centos-es en centos.org
| Enviados: Miércoles, 20 de Marzo 2013 12:05:18
| Asunto: Re: [CentOS-es] Probelma con 2 tarjeta de red en CentOS6.3
| Respondo entre lineas
| 
| 
| Le 20/03/2013 10:19, Antonio Manogué Saiz a écrit :
| > Iptables está desactivado en esta máquina.
| >
| > [root en lorentz ~]# iptables -L
| > Chain INPUT (policy ACCEPT)
| > target prot opt source destination
| >
| > Chain FORWARD (policy ACCEPT)
| > target prot opt source destination
| >
| > Chain OUTPUT (policy ACCEPT)
| > target prot opt source destination
| >
| >
| > Solo eth1
| > [root en lorentz ~]# route -en
| > Kernel IP routing table
| > Destination Gateway Genmask Flags MSS Window irtt Iface
| > 10.20.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
| > 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
| > 0.0.0.0 10.20.1.12 0.0.0.0 UG 0 0 0 eth1
| >
| > [root en lorentz ~]# ifconfig -a
| > eth1 Link encap:Ethernet HWaddr 00:50:56:8A:D0:3C
| >            inet addr:10.20.2.24 Bcast:10.20.255.255 Mask:255.255.0.0
| >            inet6 addr: fe80::250:56ff:fe8a:d03c/64 Scope:Link
| >            UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
| >            RX packets:385431 errors:0 dropped:0 overruns:0 frame:0
| >            TX packets:16148 errors:0 dropped:0 overruns:0 carrier:0
| >            collisions:0 txqueuelen:1000
| >            RX bytes:37555994 (35.8 MiB) TX bytes:1949316 (1.8 MiB)
| >
| > eth3 Link encap:Ethernet HWaddr 00:50:56:8A:45:DE
| >            BROADCAST MULTICAST MTU:1500 Metric:1
| >            RX packets:6421 errors:0 dropped:0 overruns:0 frame:0
| >            TX packets:294 errors:0 dropped:0 overruns:0 carrier:0
| >            collisions:0 txqueuelen:1000
| >            RX bytes:646119 (630.9 KiB) TX bytes:49064 (47.9 KiB)
| >
| > lo Link encap:Local Loopback
| >            inet addr:127.0.0.1 Mask:255.0.0.0
| >            inet6 addr: ::1/128 Scope:Host
| >            UP LOOPBACK RUNNING MTU:16436 Metric:1
| >            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
| >            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
| >            collisions:0 txqueuelen:0
| >            RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
| >
| >
| > Después de ifup eth3
| >
| > [root en lorentz ~]# route -en
| > Kernel IP routing table
| > Destination Gateway Genmask Flags MSS Window irtt Iface
| > 10.1.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth3
| > 10.20.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
| > 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
| > 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth3
| > 0.0.0.0 10.1.1.1 0.0.0.0 UG 0 0 0 eth3
| 
| Cual es la red 169.254.0.0? Y porqué es accesible desde las dos
| ethernet
| y con la misma métrica?
Esa es la red "DHCP" que se asigna cuando no se puede conectar con un servidor DHCP. En alguna de las pruenas dejé eth3 en dhcp por probar. Ha debido dejar restos de esas pruebas. 

| >
| > [root en lorentz ~]# ifconfig -a
| > eth1 Link encap:Ethernet HWaddr 00:50:56:8A:D0:3C
| >            inet addr:10.20.2.24 Bcast:10.20.255.255 Mask:255.255.0.0
| >            inet6 addr: fe80::250:56ff:fe8a:d03c/64 Scope:Link
| >            UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
| >            RX packets:388473 errors:0 dropped:0 overruns:0 frame:0
| >            TX packets:16181 errors:0 dropped:0 overruns:0 carrier:0
| >            collisions:0 txqueuelen:1000
| >            RX bytes:37870282 (36.1 MiB) TX bytes:1954442 (1.8 MiB)
| >
| > eth3 Link encap:Ethernet HWaddr 00:50:56:8A:45:DE
| >            inet addr:10.1.10.68 Bcast:10.1.255.255 Mask:255.255.0.0
| >            inet6 addr: fe80::250:56ff:fe8a:45de/64 Scope:Link
| >            UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
| >            RX packets:1558 errors:0 dropped:0 overruns:0 frame:0
| >            TX packets:128 errors:0 dropped:0 overruns:0 carrier:0
| >            collisions:0 txqueuelen:1000
| >            RX bytes:156719 (153.0 KiB) TX bytes:15965 (15.5 KiB)
| >
| > lo Link encap:Local Loopback
| >            inet addr:127.0.0.1 Mask:255.0.0.0
| >            inet6 addr: ::1/128 Scope:Host
| >            UP LOOPBACK RUNNING MTU:16436 Metric:1
| >            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
| >            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
| >            collisions:0 txqueuelen:0
| >            RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
| >
| >
| > Si que apunta a problemas con GW.
| 
| Exactamente.
| 
| Como constatas que se pierde la conexión en eth1? Haces ping desde
| otra
| maquina a eth1 o haces ping desde este servidor a una red que es
| accesible a través de eth1? Que rangos de IP usan estas redes que no
| son
| accesibles por eth1?

Lo compruebo haciendo ping desde una 10.1.10.X/16 y desde una 10.1.2.X/16 . En efecto lo que pasa es que se pierde el tráfico de la eth1 y funciona el de eth3 y viceversa. 
Las dos tarjetas tienen acceso a las mismas redes, solo que algunos clientes antiguos atacan a esta aplicación por la IP de eth3, por eso tengo que hacer que responda simultáneamente a las 2 IPs, por lo menos durante este año, mientras renovamos esos equipos. 

| >
| >
| > Un saludo,
| >
| > Antonio MANOGUE
| >
| >
| >
| > ----- Mensaje original -----
| > | De: "Francesc Guitart" <francesc.guitart en enise.fr>
| > | Para: centos-es en centos.org
| > | Enviados: Miércoles, 20 de Marzo 2013 10:01:25
| > | Asunto: Re: [CentOS-es] Probelma con 2 tarjeta de red en CentOS6.3
| > | Hola,
| > | -rn
| > | Le 20/03/2013 09:24, Antonio Manogué Saiz a écrit :
| > | >
| > | > Buenos días.
| > | >
| > | > Tengo un problema que nunca me había pasado y con el que llevo
| > | > un
| > | > tiempo bloqueado.
| > | >
| > | > En un sistema (virtualizado con VMWare) CentOS6.3 tengo 1
| > | > tarjeta de
| > | > red funcionando correctamente. Ahora necesito añadirle una
| > | > segunda
| > | > tarjeta de red. La tarjeta se instala correctamente según los
| > | > registros que quedan en messages . La puedo configurar sin
| > | > problemas
| > | > desde system-config-network-tui . Cuando la activo con ifup ethX
| > | > no
| > | > me da ningún problema ni veo entradas en los logs que indiquen
| > | > error, pero a los pocos segundos (2-3 seg) se pierde la conexión
| > | > con
| > | > la otra IP. Si hago un ifdown ethX y reinicio network vuelve a
| > | > funcionar todo correctamente. De hw no parece ya que he probado
| > | > con
| > | > tarjetas diferentes y el comportamiento es el mismo. Las vmtools
| > | > están actualizadas.
| > | >
| > | > Este es un tail del messages cuando he
| > | > activado-desactivado-reiniciado y los ficheros de configuración
| > | > de
| > | > las tarjetas. La que está operativa es la eth1 y la que no me
| > | > deja
| > | > configurar es la eth3
| > | >
| > | > [root en lorentz log]# tail -n 40 messages
| > | > Mar 20 07:55:11 lorentz ntpd[1765]: Listening on interface #15
| > | > eth3,
| > | > 10.1.10.68#123 Enabled
| > | > Mar 20 07:55:28 lorentz ntpd[1765]: Deleting interface #14 eth3,
| > | > fe80::250:56ff:fe8a:45de#123, interface stats: received=0,
| > | > sent=0,
| > | > dropped=0, active_time=17 secs
| > | > Mar 20 07:55:28 lorentz ntpd[1765]: Deleting interface #15 eth3,
| > | > 10.1.10.68#123, interface stats: received=0, sent=0, dropped=0,
| > | > active_time=17 secs
| > | > Mar 20 07:58:48 lorentz ntpd[1765]: synchronized to 10.1.2.54,
| > | > stratum 3
| > | > Mar 20 08:00:22 lorentz ntpd[1765]: time reset -34.361615 s
| > | > Mar 20 08:09:26 lorentz system-config-network[4381]: chmod 0644
| > | > //etc/sysconfig/networking/devices/ifcfg-eth1
| > | > Mar 20 08:09:26 lorentz system-config-network[4381]: chmod 0644
| > | > //etc/sysconfig/networking/devices/ifcfg-eth3
| > | > Mar 20 08:09:46 lorentz ntpd[1765]: synchronized to 10.1.2.54,
| > | > stratum 3
| > | > Mar 20 09:16:39 lorentz system-config-network[4594]: chmod 0644
| > | > //etc/sysconfig/networking/devices/ifcfg-eth1
| > | > Mar 20 09:16:39 lorentz system-config-network[4594]: chmod 0644
| > | > //etc/sysconfig/networking/devices/ifcfg-eth3
| > | > Mar 20 09:17:07 lorentz kernel: lo: Disabled Privacy Extensions
| > | > Mar 20 09:17:07 lorentz kernel: e1000: eth1 NIC Link is Up 1000
| > | > Mbps
| > | > Full Duplex, Flow Control: None
| > | > Mar 20 09:17:07 lorentz kernel: ADDRCONF(NETDEV_UP): eth1: link
| > | > is
| > | > not ready
| > | > Mar 20 09:17:07 lorentz kernel: ADDRCONF(NETDEV_CHANGE): eth1:
| > | > link
| > | > becomes ready
| > | > Mar 20 09:17:08 lorentz kernel: eth3: intr type 3, mode 0, 2
| > | > vectors
| > | > allocated
| > | > Mar 20 09:17:08 lorentz kernel: eth3: NIC Link is Up 10000 Mbps
| > | > Mar 20 09:17:09 lorentz NET[4971]:
| > | > /etc/sysconfig/network-scripts/ifup-post : updated
| > | > /etc/resolv.conf
| > | > Mar 20 09:17:12 lorentz ntpd[1765]: Listening on interface #16
| > | > eth3,
| > | > fe80::250:56ff:fe8a:45de#123 Enabled
| > | > Mar 20 09:17:12 lorentz ntpd[1765]: Listening on interface #17
| > | > eth3,
| > | > 10.1.10.68#123 Enabled
| > | > Mar 20 09:17:47 lorentz NET[5040]:
| > | > /etc/sysconfig/network-scripts/ifdown-post : updated
| > | > /etc/resolv.conf
| > | > Mar 20 09:17:49 lorentz ntpd[1765]: Deleting interface #16 eth3,
| > | > fe80::250:56ff:fe8a:45de#123, interface stats: received=0,
| > | > sent=0,
| > | > dropped=0, active_time=37 secs
| > | > Mar 20 09:17:49 lorentz ntpd[1765]: Deleting interface #17 eth3,
| > | > 10.1.10.68#123, interface stats: received=0, sent=0, dropped=0,
| > | > active_time=37 secs
| > | > Mar 20 09:18:12 lorentz kernel: lo: Disabled Privacy Extensions
| > | > Mar 20 09:18:12 lorentz kernel: e1000: eth1 NIC Link is Up 1000
| > | > Mbps
| > | > Full Duplex, Flow Control: None
| > | > Mar 20 09:18:12 lorentz kernel: ADDRCONF(NETDEV_UP): eth1: link
| > | > is
| > | > not ready
| > | > Mar 20 09:18:12 lorentz kernel: ADDRCONF(NETDEV_CHANGE): eth1:
| > | > link
| > | > becomes ready
| > | > Mar 20 09:18:14 lorentz kernel: eth3: intr type 3, mode 0, 2
| > | > vectors
| > | > allocated
| > | > Mar 20 09:18:14 lorentz kernel: eth3: NIC Link is Up 10000 Mbps
| > | > Mar 20 09:18:15 lorentz NET[5416]:
| > | > /etc/sysconfig/network-scripts/ifup-post : updated
| > | > /etc/resolv.conf
| > | > Mar 20 09:18:17 lorentz ntpd[1765]: Listening on interface #18
| > | > eth3,
| > | > fe80::250:56ff:fe8a:45de#123 Enabled
| > | > Mar 20 09:18:17 lorentz ntpd[1765]: Listening on interface #19
| > | > eth3,
| > | > 10.1.10.68#123 Enabled
| > | > Mar 20 09:18:20 lorentz NET[5484]:
| > | > /etc/sysconfig/network-scripts/ifdown-post : updated
| > | > /etc/resolv.conf
| > | > Mar 20 09:18:22 lorentz ntpd[1765]: Deleting interface #18 eth3,
| > | > fe80::250:56ff:fe8a:45de#123, interface stats: received=0,
| > | > sent=0,
| > | > dropped=0, active_time=5 secs
| > | > Mar 20 09:18:22 lorentz ntpd[1765]: Deleting interface #19 eth3,
| > | > 10.1.10.68#123, interface stats: received=0, sent=0, dropped=0,
| > | > active_time=5 secs
| > | > Mar 20 09:18:44 lorentz kernel: lo: Disabled Privacy Extensions
| > | > Mar 20 09:18:44 lorentz kernel: e1000: eth1 NIC Link is Up 1000
| > | > Mbps
| > | > Full Duplex, Flow Control: None
| > | > Mar 20 09:18:45 lorentz ntpd[1765]: Deleting interface #12 eth1,
| > | > fe80::250:56ff:fe8a:d03c#123, interface stats: received=0,
| > | > sent=0,
| > | > dropped=0, active_time=5096 secs
| > | > Mar 20 09:18:45 lorentz ntpd[1765]: Deleting interface #13 eth1,
| > | > 10.20.2.24#123, interface stats: received=57, sent=57,
| > | > dropped=0,
| > | > active_time=5096 secs
| > | > Mar 20 09:18:47 lorentz ntpd[1765]: Listening on interface #20
| > | > eth1,
| > | > fe80::250:56ff:fe8a:d03c#123 Enabled
| > | > Mar 20 09:18:47 lorentz ntpd[1765]: Listening on interface #21
| > | > eth1,
| > | > 10.20.2.24#123 Enabled
| > | >
| > | > D EVICE= eth1
| > | > HWADDR=00:50:56:8a:d0:3c
| > | > NM_CONTROLLED=no
| > | > ONBOOT=yes
| > | > IPADDR=10.20.2.24
| > | > BOOTPROTO=none
| > | > NETMASK=255.255.0.0
| > | > DNS2=10.1.2.54
| > | > TYPE=Ethernet
| > | > GATEWAY=10.20.1.12
| > | > DNS1=10.20.1.12
| > | > IPV6INIT=no
| > | > USERCTL=no
| > | > ~
| > | >
| > | > DNS1=10.1.1.1
| > | > DEVICE=eth3
| > | > BOOTPROTO=none
| > | > TYPE=Ethernet
| > | > HWADDR=00:50:56:8a:45:de
| > | > NM_CONTROLLED=no
| > | > ONBOOT=no
| > | > IPV6INIT=no
| > | > USERCTL=no
| > | > IPADDR=10.1.10.68
| > | > NETMASK=255.255.0.0
| > | > GATEWAY=10.1.1.1
| > | > ~
| > |
| > | No sera un problema de enrutamiento? Puedes mandar la salida de
| > | netstat
| > | -rn antes y después de configurar eth3?
| > |
| > | Y iptables? no creo ya que en principio no añadir otra ethernet no
| > | debería desconectar la primera, pero... Manda la salida de
| > | iptables -L
| > | -n antes y después de configurar eth3.
| > |
| > | Y ya de paso, manda también la salida de ifconfig -a antes y
| > | después
| > | de
| > | configurar eth3.
| > |
| > | >
| > | > Gracias por adelantado.
| > | >
| > |
| > | De nada.
| > |
| > | --
| > | Francesc Guitart
| > |
| > |
| > |
| > |
| > | _______________________________________________
| > | CentOS-es mailing list
| > | CentOS-es en centos.org
| > | http://lists.centos.org/mailman/listinfo/centos-es
| > _______________________________________________
| > CentOS-es mailing list
| > CentOS-es en centos.org
| > http://lists.centos.org/mailman/listinfo/centos-es
| >
| 
| _______________________________________________
| CentOS-es mailing list
| CentOS-es en centos.org
| http://lists.centos.org/mailman/listinfo/centos-es


Más información sobre la lista de distribución CentOS-es