No network wired connection

Issues Related to Networking (Wired and Wireless)

Moderator: Moderators

No network wired connection

Postby lucassim » Mon Feb 18, 2013 19:38

Hiii I am using sabayon, and after the update a few months ago my network with cable do not work anymore.

Code: Select all
ifconfig
enp9s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::223:aeff:fe26:d8e7  prefixlen 64  scopeid 0x20<link>
        ether 00:23:ae:26:d8:e7  txqueuelen 1000  (Ethernet)
        RX packets 26  bytes 1560 (1.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1827  bytes 1083598 (1.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 16 

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 5926  bytes 470300 (459.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5926  bytes 470300 (459.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.3  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::224:2bff:feb1:1f4b  prefixlen 64  scopeid 0x20<link>
        ether 00:24:2b:b1:1f:4b  txqueuelen 1000  (Ethernet)
        RX packets 282352  bytes 403171943 (384.4 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 174263  bytes 19062658 (18.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


I see that enp9s0 and when I try run this command, I got error:

Code: Select all
sudo dhcpcd enp9s0
Password:
dhcpcd[5254]: version 5.6.6 starting
dhcpcd[5254]: enp9s0: sending IPv6 Router Solicitation
dhcpcd[5254]: enp9s0: broadcasting for a lease
dhcpcd[5254]: enp9s0: sending IPv6 Router Solicitation
dhcpcd[5254]: enp9s0: sending IPv6 Router Solicitation
dhcpcd[5254]: enp9s0: sending IPv6 Router Solicitation
dhcpcd[5254]: enp9s0: no IPv6 Routers available
dhcpcd[5254]: timed out
dhcpcd[5254]: allowing 8 seconds for IPv4LL timeout
dhcpcd[5254]: enp9s0: probing for an IPv4LL address
dhcpcd[5254]: enp9s0: checking for 169.254.93.18
dhcpcd[5254]: enp9s0: using IPv4LL address 169.254.93.18
dhcpcd[5254]: forked to background, child pid 5415


I don't have IPV6 in my router and how can I do to going back eth0 with ipv4 only.

Thxs
lucassim
Young Hen
 
Posts: 23
Joined: Wed Feb 22, 2012 23:00

Re: No network wired connection

Postby Fitzcarraldo » Tue Feb 19, 2013 12:03

It looks to me like your installation is now using the new network interface naming convention that started with udev-197. You could try the steps below to see if you can get back to the old name.

If it does not already exist, create a file /etc/udev/rules.d/80-net-name-slot.rules which contains only comments:

Code: Select all
# No, I don't want the switch yet. Thanks.
# End of file.

Edit the file /etc/udev/rules.d/70-persistent-net.rules (first make a backup in your home directory of the original!) to look something like the following (BUT you'll need to use the MAC addresses and comments about your devices that are given in your current 70-persistent-net.rules file, not the ones below which are just for example):

Code: Select all
# PCI device 0x1969:0x1063 (atl1c)
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="70:5a:b6:3e:c1:8a", NAME="eth0"

# PCI device 0x8086:0x4235 (iwlagn)
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:21:6a:9a:68:4c", NAME="wlan0"

Using the new version of the initscript in Gentoo Bugzilla Bug Report No. 453494 as a template, create an initscript named /etc/init.d/rename_ethX containing:

Code: Select all
#!/sbin/runscript

# Run this before 70-persistent-net.rules to allow swapping to eth*
#
# OpenRC, example: rc-update add $script_name sysinit
#
# Then you can use rules like, example:
#
# SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="bc:ae:c5:59:5a:85", NAME="eth0"
# SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="bc:ae:c5:59:5a:fd", NAME="eth1"
#
# You need to have sys-apps/iproute2 installed.

description="Renames ethX to ethXtmp to avoid udev rename conflicts"

depend() {
        before dev
        need sysfs
        need modules
}

start() {
        local i
        for i in /sys/class/net/eth* ; do
                [ "$i" = "/sys/class/net/eth*" ] && continue
                ip link set dev ${i##*/} name ${i##*/}tmp 2>/dev/null
        done
        for i in /sys/class/net/wlan* ; do
                [ "$i" = "/sys/class/net/wlan*" ] && continue
                ip link set dev ${i##*/} name ${i##*/}tmp 2>/dev/null
        done
}

and make it executable and add it to the sysinit runlevel:

Code: Select all
# cd /etc/init.d/
# chmod +x rename_ethX
# rc-update add rename_ethX sysinit
# rc-update show -v | grep rename_ethX
          rename_ethX |                                        sysinit

After rebooting, the two network interfaces eth0 and wlan0 should be detected by the ifconfig command:

Code: Select all
# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.71  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::725a:b6ff:fe3e:c18a  prefixlen 64  scopeid 0x20<link>
        ether 70:5a:b6:3e:c1:8a  txqueuelen 1000  (Ethernet)
        RX packets 11983  bytes 13910638 (13.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 11246  bytes 1382475 (1.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 1  collisions 0

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

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::221:6aff:fe9a:684c  prefixlen 64  scopeid 0x20<link>
        ether 00:21:6a:9a:68:4c  txqueuelen 1000  (Ethernet)
        RX packets 3  bytes 380 (380.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 16  bytes 9979 (9.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7340
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom


Return to Networking and Wireless

Who is online

Users browsing this forum: No registered users and 0 guests