Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problemas con el guion /etc/init.d/net.eth0
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Spanish
View previous topic :: View next topic  
Author Message
omarelrockero1
n00b
n00b


Joined: 01 Oct 2010
Posts: 43
Location: SABANETA BARINAS

PostPosted: Sun Feb 10, 2013 3:49 am    Post subject: Problemas con el guion /etc/init.d/net.eth0 Reply with quote

Saludos amigos, tengo unos días dándole vueltas a este inconveniente que recientemente se me a venido presentando después de unas actualizaciones: al arrancar el guion /etc/init.d/net.eth0 que es el enlace simbólico de /etc/init.d/net.lo no me obtiene dirección ip por dhcp, tengo que iniciar el servicio dhcp para que pueda conectarme a internet es decir tengo que ejecutar "/etc/init.d/dhcpcd start" aunque de este modo si ejecuto un ifconfig no me aparece dirección ip asignada a eth0. les agradezco me puedan ayudar continuación dejo varios datos importantes sobre el caso:

contenido de /etc/conf.d/net:

config_eth0=("dhcp")

#config_eth1=("192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255")
config_eth1=("192.168.1.1/24")

Reintentar conectar:

(23:06)root<ocan>omarelrockero1 (/home/omar)-> /etc/init.d/net.eth0 restart

* Bringing down interface eth0
* Removing addresses
* Bringing up interface eth0
* You are using a bash array for config_eth0.
* This feature will be removed in the future.
* Please see net.example for the correct format for config_eth0.
* dhcp ...
* Running dhcpcd ...
dhcpcd[5391]: version 5.6.4 starting
dhcpcd[539-> /etc/init.d/net.eth0 restart
* Bringing down interface eth0
* Removing addresses
* Bringing up interface eth0
* You are using a bash array for config_eth0.
* This feature will be removed in the future.
* Please see net.example for the correct format for config_eth0.
* dhcp ...
* Running dhcpcd ...
dhcpcd[5391]: version 5.6.4 starting
dhcpcd[5391]: eth0: waiting for carrier
dhcpcd[5391]: timed out
dhcpcd[5391]: allowing 8 seconds for IPv4LL timeout
^Cdhcpcd[5391]: received SIGINT, stopping
dhcpcd[5391]: eth0: removing interface
* net.eth0: caught SIGINT, aborting1]: eth0: waiting for carrier
dhcpcd[5391]: timed out
dhcpcd[5391]: allowing 8 seconds for IPv4LL timeout
^Cdhcpcd[5391]: received SIGINT, stopping
dhcpcd[5391]: eth0: removing interface
* net.eth0: caught SIGINT, aborting



despues de ejecutar /etc/init.d/dhcpcd start que se conecta a internet en ifconfig muestra los siguiente:

(23:11)root<ocan>omarelrockero1 (/home/omar)-> ifconfig

eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 00:05:1d:ef:c6:d0 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 576
inet 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255
ether e0:69:95:ac:a1:20 txqueuelen 1000 (Ethernet)
RX packets 5847 bytes 2530332 (2.4 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 5356 bytes 652482 (637.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 986 bytes 81844 (79.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 986 bytes 81844 (79.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

sit0: flags=193<UP,RUNNING,NOARP> mtu 1480
inet6 ::127.0.0.1 prefixlen 96 scopeid 0x90<compat,host>
inet6 ::192.168.1.1 prefixlen 96 scopeid 0x80<compat,global>
sit txqueuelen 0 (IPv6-in-IPv4)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 6 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 00:17:3f:7a:42:e2 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

_________________
NUNCA DEJAMOS DE APRENDER
Back to top
View user's profile Send private message
esteban_conde
Veteran
Veteran


Joined: 04 Jun 2003
Posts: 1495

PostPosted: Sun Feb 10, 2013 10:23 am    Post subject: Reply with quote

cambia config eth1 192.168.1.1 por 192.168.1.3 por ejemplo, tienes una colision y seguramente dhcpcd te asigna esa misma direccion a eth0.
Si persiste el error tendrás que cambiar de red eth1 y crear reglas iptables para que salga a internet si necesitas que así sea.
_________________
Saludos a tod@s, Esteban.
Back to top
View user's profile Send private message
agdg
Guru
Guru


Joined: 15 Aug 2010
Posts: 320

PostPosted: Sun Feb 10, 2013 10:49 am    Post subject: Reply with quote

No parece un problema de colisión, pero si lo fuese sería mejor opción mover el rango de direcciones asignadas por dhcp del ¿router? Pero como digo, no creo que ese sea el problema.

Puedes sustituir dhcpd por dhclient. Si cambias uno por otro, todo saldrá funcionando; si vas hacer que convivan ambos deberás indicar que cliente de dhcp vas usar, para ello añade a /etc/conf.d/net:
Code:
modules="dhclient"

_________________
make install . es
Noticias, apuntes y pequeños tutoriales sobre GNU/Linux
Back to top
View user's profile Send private message
omarelrockero1
n00b
n00b


Joined: 01 Oct 2010
Posts: 43
Location: SABANETA BARINAS

PostPosted: Sun Feb 10, 2013 7:15 pm    Post subject: Reply with quote

Primero que nada muchas gracias por su ayuda. He hecho lo que esteban_conde me ha indicado incluso quite la configuración de eth1 del /etc/conf.d/net y quite el guion de arranque en default (rc-update del net.eth1) pero el problema persistía. cambie como me digo agdg de dhcpcd a dhclient y el problema continuaba:

(11:28)root<ocan>omarelrockero1 (/home/omar)-> /etc/init.d/net.eth0 start
* Bringing up interface eth0
* You are using a bash array for config_eth0.
* This feature will be removed in the future.
* Please see net.example for the correct format for config_eth0.
* dhcp ...
* Running dhclient ...
* start-stop-daemon: failed to start `/sbin/dhclient' [ !! ]
* ERROR: net.eth0 failed to start


contenido de /etc/conf.d/net:

modules="dhclient"

config_eth0="dhcp"

#config_eth1=("192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255")


#config_eth1=("192.168.1.3/24")


Después me di cuenta de algo cuando arranque por un trisquel que esta instalado en el equipo también y es que la dirección de maquina de las tarjetas de red estaban invertidas a pesar de estar identificadas correctamente en /etc/udev/rules.d/70-persistent-net.rules por lo que comente el contenido de este archivo y recompile udev (emerge sys-fs/udev sys-fs/udev-init-scripts virtual/udev), pero el problema continuaba, le seguía asignando a eth0 la dirección de maquina que le corresponde a eth1, he reiniciado la maquina y el archivo 70-persistent-net.rules permanece tal cual lo deje, es decir, no asigno nombre a ningún dispositivo de red, ahora no se quien le asigna ahora los nombres a los dispositivos de red no es udev?. La única forma que me funcione correctamente es quitandole la tarjeta pci es decir la eth1, pero no creo que sea la tarjeta que este dañada porque funciona a la perfección en el otro OS.

aquí dejo información de los servicios:


(14:28)root<ocan>omarelrockero1 (/home/omar)-> rc-update -v show
alsasound | default
bittorrent-tracker |
bluetooth |
bootmisc | boot
consolefont |
consolekit | default
crypto-loop |
cupsd | default
dbus | default
devfs | sysinit
device-mapper |
dhcpd |
dhcrelay |
dhcrelay6 |
dmcrypt |
dmesg | sysinit
dmeventd |
fancontrol |
fsck | boot
fuse |
git-daemon |
gkrellmd |
gpm | default
hostname | boot
hwclock | boot
ip6tables |
iptables |
irexec |
keymaps | boot
killprocs | shutdown
lircd |
lircmd |
lm_sensors | default
local | default
localmount | boot
lvm |
lvm-monitoring |
modules | boot
mount-ro | shutdown
mpd |
mtab | boot
net.eth0 | default
net.eth1 |
net.lo | boot
netmount | default
nscd |
numlock |
pciparm |
procfs | boot
proftpd |
pwcheck |
pydoc-2.7 |
pydoc-3.2 |
rfcomm |
root | boot
rrdcached |
rsyncd |
saslauthd |
savecache | shutdown
sensord |
sshd |
swap | boot
swapfiles | boot
swclock |
sysctl | boot
sysfs | sysinit
syslog-ng | default
termencoding | boot
timidity | default
tmpfiles.setup | boot
transmission-daemon |
udev | sysinit
udev-mount | sysinit
urandom | boot
vixie-cron | default
xdm | default
xdm-setup


(14:29)root<ocan>omarelrockero1 (/home/omar)-> rc-status
Runlevel: default
syslog-ng [ started ]
gpm [ started ]
lm_sensors [ started ]
dbus [ started ]
net.eth0 [ stopped ]
netmount [ stopped ]
cupsd [ started ]
consolekit [ started ]
xdm [ started ]
alsasound [ started ]
timidity [ started ]
vixie-cron [ started ]
local [ started ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed
Dynamic Runlevel: manual


contenido del archivo /etc/udev/rules.d/70-persistent-net.rules actual:

#This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x10ec:0x8168 (r8169)
##SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="e0:69:95:ac:a1:20", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x10ec:0x8139 (8139too)
##SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:05:1d:ef:c6:d0", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x168c:0x001b (ath5k)
##SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:17:3f:7a:42:e2", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"


salida de ifconfig sin la tarjeta de red pci:

(14:37)root<ocan>omarelrockero1 (/home/omar)-> ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 190.79.134.83 netmask 255.255.224.0 broadcast 190.79.159.255
inet6 fe80::e269:95ff:feac:a120 prefixlen 64 scopeid 0x20<link>
ether e0:69:95:ac:a1:20 txqueuelen 1000 (Ethernet)
RX packets 21 bytes 1974 (1.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 26 bytes 2617 (2.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 2 bytes 100 (100.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2 bytes 100 (100.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

sit0: flags=128<NOARP> mtu 1480
sit txqueuelen 0 (IPv6-in-IPv4)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 00:17:3f:7a:42:e2 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions
_________________
NUNCA DEJAMOS DE APRENDER
Back to top
View user's profile Send private message
quilosaq
l33t
l33t


Joined: 22 Dec 2009
Posts: 806

PostPosted: Mon Feb 11, 2013 12:08 am    Post subject: Reply with quote

omarelrockero1 wrote:

...
* start-stop-daemon: failed to start `/sbin/dhclient' [ !! ]
...

Comprueba si existe el archivo /sbin/dhclient. Si no está tendrás que instalar el paquete que lo proporciona: dhcp
Code:
# emerge dhcp
Back to top
View user's profile Send private message
opotonil
l33t
l33t


Joined: 17 Jun 2005
Posts: 788
Location: 127.0.0.1

PostPosted: Mon Feb 11, 2013 8:04 am    Post subject: Reply with quote

Quote:

ahora no se quien le asigna ahora los nombres a los dispositivos de red no es udev?

Si has actualizado hace poco, tras instalar udev-197-r4 te tendría que haber aparecido el mensaje:
Quote:

old_net_rules=${ROOT}etc/udev/rules.d/70-persistent-net.rules
if [[ -f ${old_net_rules} ]]; then
ewarn "You still have ${old_net_rules} in place from previous udev release."
ewarn "Upstream has removed the possibility of renaming to existing"
ewarn "network interfaces. For example, it's not possible to assign based"
ewarn "on MAC address to existing interface eth0."
ewarn "See http://bugs.gentoo.org/453494 for more information."
ewarn "Rename your file to something else starting with 70- to silence"
ewarn "this warning."
fi


Si no recuerdo mal también avisaba con un "enews".

Salu2.
_________________
Localnet
Films Localnet
Back to top
View user's profile Send private message
omarelrockero1
n00b
n00b


Joined: 01 Oct 2010
Posts: 43
Location: SABANETA BARINAS

PostPosted: Mon Feb 11, 2013 1:03 pm    Post subject: Reply with quote

quilosaq: si hermano lo tengo instalado, incluso lo puedo ejecutar con el comando dhclient:

* net-misc/dhcp
Latest version available: 4.2.4_p2
Latest version installed: 4.2.4_p2
Size of files: 7,998 kB
Homepage: http://www.isc.org/products/DHCP
Description: ISC Dynamic Host Configuration Protocol (DHCP) client/server
License: ISC BSD SSLeay GPL-2


opotonil: tengo la version de sys-fs/udev-197-r4 y debe ser que no me di cuenta del enews, ya que ignora el /etc/udev/rules.d/70-persistent-net.rules ahora como hago para forzar la asignacion de direccion de MAC a la interfase que corresponde?.
_________________
NUNCA DEJAMOS DE APRENDER
Back to top
View user's profile Send private message
opotonil
l33t
l33t


Joined: 17 Jun 2005
Posts: 788
Location: 127.0.0.1

PostPosted: Tue Feb 12, 2013 8:22 am    Post subject: Reply with quote

Lee el bug del post anterior: http://bugs.gentoo.org/453494

Tras una lectura rápida no me queda nada claro, pero puedes probar: http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames
Quote:

I don't like this, how do I disable this?

You basically have three options:

You disable the assignment of fixed names, so that the unpredictable kernel names are used again. For this, simply mask udev's rule file for the default policy: ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules
You create your own manual naming scheme, for example by naming your interfaces "internet0", "dmz0" or "lan0". For that create your own udev rules file and set the NAME property for the devices. Make sure to order it before the default policy file, for example by naming it /etc/udev/rules.d/70-my-net-names.rules
You alter the default policy file, for picking a different naming scheme, for example for naming all interface names after their MAC address by default: cp /usr/lib/udev/rules.d/80-net-name-slot.rules /etc/udev/rules.d/80-net-name-slot.rules, then edit the file there and change the lines as necessary.


Salu2.
_________________
Localnet
Films Localnet
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Spanish All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum