LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 08-10-2012, 01:24 AM   #1
LeetShiva
LQ Newbie
 
Registered: Jul 2012
Distribution: Arch, Gentoo, CrunchBang, Archbang, Slackware, FreeBsd, DamnSmallLinux, Debian
Posts: 21

Rep: Reputation: Disabled
Question How to free eth0 from obsolete interface


I have a problem with new motherboard interface actually more with old.
I had this installation of Debian before I changed motherboard and now I have obsolete interface taking up eth0 name. That interface doesnt exist anymore on my machine cause its motherboard is dead.
How to my interface form new motherboard map to eth0 not eth1 also what should I write in interfaces section later about eth0 ?

I run debian wheezy with linux 3.2.
Also I have another question I have a wireless connection that is connection from whom I write now and new adsl connection, when I have up and running wireless so that I can write here for example I cant utilize my adsl on at moment eth1. Actually I cant utilize adsl at all now I try:
Code:
ping "my adsl gateway ip" and get
connect: Network is unreachable

same thing with google:

ping google.com
connect: Network is unreachable
I have Ethernet connect to adsl modem thru dhcp and wireless connect to provider via static configuration and mac filter.
Output of lspci -v part about ethernet controlers:
Code:
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
	Subsystem: Giga-byte Technology GA-EP45-DS5/GA-EG45M-DS2H Motherboard
	Flags: bus master, fast devsel, latency 0, IRQ 40
	I/O ports at ee00 [size=256]
	Memory at fdeff000 (64-bit, prefetchable) [size=4K]
	Memory at fdef8000 (64-bit, prefetchable) [size=16K]
	Capabilities: [40] Power Management version 3
	Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Capabilities: [70] Express Endpoint, MSI 01
	Capabilities: [b0] MSI-X: Enable- Count=4 Masked-
	Capabilities: [d0] Vital Product Data
	Capabilities: [100] Advanced Error Reporting
	Capabilities: [140] Virtual Channel
	Capabilities: [160] Device Serial Number 01-00-00-00-68-4c-e0-00
	Kernel driver in use: r8169

02:06.0 Ethernet controller: Atheros Communications Inc. AR2417 Wireless Network Adapter [AR5007G 802.11bg] (rev 01)
	Subsystem: Atheros Communications Inc. Device 2055
	Flags: bus master, medium devsel, latency 168, IRQ 20
	Memory at fddf0000 (32-bit, non-prefetchable) [size=64K]
	Capabilities: [44] Power Management version 2
	Kernel driver in use: ath5k
Can someone help with this problem

Last edited by LeetShiva; 08-10-2012 at 01:40 AM.
 
Old 08-10-2012, 01:51 AM   #2
EricTRA
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290
Hi,

If you want to change the device name for the ethernet card, have a look at the /etc/udev/rules.d/70-persistent-net.rules file. Map the correct MAC address to the device name you want. Next restart the udev service. If that doesn't apply the new rules run the following and see if that does the trick:
Code:
udevadm control --reload-rules
With regards to your networking problem, can you post output of
Code:
ifconfig -a
Kind regards,

Eric
 
Old 08-10-2012, 02:28 AM   #3
LeetShiva
LQ Newbie
 
Registered: Jul 2012
Distribution: Arch, Gentoo, CrunchBang, Archbang, Slackware, FreeBsd, DamnSmallLinux, Debian
Posts: 21

Original Poster
Rep: Reputation: Disabled
Thx for quick reply firstly

I found and changed /etc/udev/rules.d/70-persistent-net.rules
It was looking like this:
Code:
# 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}=="00:25:22:f5:b7:07", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x168c:0x001d (ath5k)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="b0:48:7a:de:ab:b7", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

# PCI device 0x10ec:/sys/devices/pci0000:00/0000:00:04.0/0000:01:00.0 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="50:e5:49:bc:86:d7", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
and now it look like this just commented out obsolete card and change name of card to eth0:

Code:
# 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}=="00:25:22:f5:b7:07", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x168c:0x001d (ath5k)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="b0:48:7a:de:ab:b7", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

# PCI device 0x10ec:/sys/devices/pci0000:00/0000:00:04.0/0000:01:00.0 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="50:e5:49:bc:86:d7", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
and I have tried
Code:
/etc/init.d/udev restart 

and 

udevadm control --reload-rules
but still it stay eth1 probably I would need to restart system or to change init lvl

Here is output of ifconfig -a one wireless card and one ethernet card
Code:
# ifconfig -a
eth1      Link encap:Ethernet  HWaddr 50:e5:49:bc:86:d7  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:37698 errors:0 dropped:0 overruns:0 frame:0
          TX packets:39964 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:21283567 (20.2 MiB)  TX bytes:3993187 (3.8 MiB)
          Interrupt:40 Base address:0xe000 

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:101028 errors:0 dropped:0 overruns:0 frame:0
          TX packets:101028 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:5275736 (5.0 MiB)  TX bytes:5275736 (5.0 MiB)

wlan0     Link encap:Ethernet  HWaddr b0:48:7a:de:ab:b7  
          inet addr:10.0.4.172  Bcast:10.0.4.255  Mask:255.255.255.0
          inet6 addr: fe80::b248:7aff:fede:abb7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:117861 errors:0 dropped:9009 overruns:0 frame:0
          TX packets:106102 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:81138311 (77.3 MiB)  TX bytes:15212078 (14.5 MiB)
 
Old 08-10-2012, 02:59 AM   #4
LeetShiva
LQ Newbie
 
Registered: Jul 2012
Distribution: Arch, Gentoo, CrunchBang, Archbang, Slackware, FreeBsd, DamnSmallLinux, Debian
Posts: 21

Original Poster
Rep: Reputation: Disabled
After I restarted machine well device names are now fine my motherboard ethernet card is now eth0 but I still have no connectivity when I leave it without wlan0 only on eth0:

ping google.com
connect: Network is unreachable
 
Old 08-10-2012, 04:08 AM   #5
Pray23
LQ Newbie
 
Registered: Aug 2012
Posts: 4

Rep: Reputation: 1
thanks for sharing
 
Old 08-10-2012, 05:14 AM   #6
LeetShiva
LQ Newbie
 
Registered: Jul 2012
Distribution: Arch, Gentoo, CrunchBang, Archbang, Slackware, FreeBsd, DamnSmallLinux, Debian
Posts: 21

Original Poster
Rep: Reputation: Disabled
I'm now on my parted magic cd and I can say that my router is working and here I can have connection via adsl but when I'm on my debian installation I get errors that I cant connect

ping "my dns server"
connect: Network is unreachable

Dns is setup as it should I use google public dns servers and opendns servers.
What might be a problem ?
What diagnostic data should I post here ?

now on parted magic my ifconfig -a is:

Code:
# ifconfig 
eth0      Link encap:Ethernet  HWaddr 50:e5:49:bc:86:d7  
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::52e5:49ff:febc:86d7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:54581 errors:0 dropped:0 overruns:0 frame:0
          TX packets:40613 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:68706642 (65.5 MiB)  TX bytes:9291709 (8.8 MiB)
          Interrupt:51 Base address:0xc000 

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:288 errors:0 dropped:0 overruns:0 frame:0
          TX packets:288 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:21928 (21.4 KiB)  TX bytes:21928 (21.4 KiB)

wlan0     Link encap:Ethernet  HWaddr b0:48:7a:de:ab:b7  
          UP BROADCAST MULTICAST  MTU:1500  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:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
As much as I see I dont have assigned address by dhcp on Debian even if I run ifup eth0 and it configure it via dhcp and show that in console.

It looks by the /etc/network/interfaces on partedmagic that I dont have any of interfaces enabled ? But it works with no configuration.

My /etc/network/interfaces on Debian:

Code:
# This file describes the network interfaces available on your system

# The loopback network interface
auto lo
iface lo inet loopback

#The eth0 ethernet 
allow-hotplug eth0
iface eth0 inet dhcp

#The eth0 ethernet 
#auto eth0
#iface eth0 inet dhcp

# my wifi device
auto wlan0
iface wlan0 inet static
		address 10.0.4.172
		netmask 255.255.255.0
		gateway 10.0.4.1

My /etc/network/interfaces on PartedMagic:
Code:
######################################################################
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
#
# A "#" character in the very first column makes the rest of the line
# be ignored. Blank lines are ignored. Lines may be indented freely.
# A "\" character at the very end of the line indicates the next line
# should be treated as a continuation of the current one.
#
# The "pre-up", "up", "down" and "post-down" options are valid for all
# interfaces, and may be specified multiple times. All other options
# may only be specified once.
#
# See the interfaces(5) manpage for information on what options are
# available.
######################################################################

# We always want the loopback interface.
#
# auto lo
# iface lo inet loopback

# An example ethernet card setup: (broadcast and gateway are optional)
#
# auto eth0
# iface eth0 inet static
#     address 192.168.0.42
#     network 192.168.0.0
#     netmask 255.255.255.0
#     broadcast 192.168.0.255
#     gateway 192.168.0.1

# A more complicated ethernet setup, with a less common netmask, and a downright
# weird broadcast address: (the "up" lines are executed verbatim when the
# interface is brought up, the "down" lines when it's brought down)
#
# auto eth0
# iface eth0 inet static
#     address 192.168.1.42
#     network 192.168.1.0
#     netmask 255.255.255.128
#     broadcast 192.168.1.0
#     up route add -net 192.168.1.128 netmask 255.255.255.128 gw 192.168.1.2
#     up route add default gw 192.168.1.200
#     down route del default gw 192.168.1.200
#     down route del -net 192.168.1.128 netmask 255.255.255.128 gw 192.168.1.2

# A more complicated ethernet setup with a single ethernet card with
# two interfaces.
# Note: This happens to work since ifconfig handles it that way, not because
# ifup/down handles the ':' any differently.
# Warning: There is a known bug if you do this, since the state will not
# be properly defined if you try to 'ifdown eth0' when both interfaces
# are up. The ifconfig program will not remove eth0 but it will be
# removed from the interfaces state so you will see it up until you execute:
# 'ifdown eth0:1 ; ifup eth0; ifdown eth0'
# BTW, this is "bug" #193679 (it's not really a bug, it's more of a
# limitation)
#
# auto eth0 eth0:1
# iface eth0 inet static
#     address 192.168.0.100
#     network 192.168.0.0
#     netmask 255.255.255.0
#     broadcast 192.168.0.255
#     gateway 192.168.0.1
# iface eth0:1 inet static
#     address 192.168.0.200
#     network 192.168.0.0
#     netmask 255.255.255.0

# "pre-up" and "post-down" commands are also available. In addition, the
# exit status of these commands are checked, and if any fail, configuration
# (or deconfiguration) is aborted. So:
#
# auto eth0
# iface eth0 inet dhcp
#     pre-up [ -f /etc/network/local-network-ok ]
#
# will allow you to only have eth0 brought up when the file
# /etc/network/local-network-ok exists.

# Two ethernet interfaces, one connected to a trusted LAN, the other to
# the untrusted Internet. If their MAC addresses get swapped (because an
# updated kernel uses a different order when probing for network cards,
# say), then they don't get brought up at all.
#
# auto eth0 eth1
# iface eth0 inet static
#     address 192.168.42.1
#     netmask 255.255.255.0
#     pre-up /path/to/check-mac-address.sh eth0 11:22:33:44:55:66
#     pre-up /usr/local/sbin/enable-masq
# iface eth1 inet dhcp
#     pre-up /path/to/check-mac-address.sh eth1 AA:BB:CC:DD:EE:FF
#     pre-up /usr/local/sbin/firewall

# Two ethernet interfaces, one connected to a trusted LAN, the other to
# the untrusted Internet, identified by MAC address rather than interface
# name:
#
# auto eth0 eth1
# mapping eth0 eth1
#     script /path/to/get-mac-address.sh
#     map 11:22:33:44:55:66 lan
#     map AA:BB:CC:DD:EE:FF internet
# iface lan inet static
#     address 192.168.42.1
#     netmask 255.255.255.0
#     pre-up /usr/local/sbin/enable-masq $IFACE
# iface internet inet dhcp
#     pre-up /usr/local/sbin/firewall $IFACE

# A PCMCIA interface for a laptop that is used in different locations:
# (note the lack of an "auto" line for any of these)
#
# mapping eth0
#    script /path/to/pcmcia-compat.sh
#    map home,*,*,*                  home
#    map work,*,*,00:11:22:33:44:55  work-wireless
#    map work,*,*,01:12:23:34:45:50  work-static
#
# iface home inet dhcp
# iface work-wireless bootp
# iface work-static static
#     address 10.15.43.23
#     netmask 255.255.255.0
#     gateway 10.15.43.1
#
# Note, this won't work unless you specifically change the file
# /etc/pcmcia/network to look more like:
#
#     if [ -r ./shared ] ; then . ./shared ; else . /etc/pcmcia/shared ; fi
#     get_info $DEVICE
#     case "$ACTION" in
#         'start')
#             /sbin/ifup $DEVICE
#             ;;
#         'stop')
#             /sbin/ifdown $DEVICE
#             ;;
#     esac
#     exit 0

# An alternate way of doing the same thing: (in this case identifying
# where the laptop is is done by configuring the interface as various
# options, and seeing if a computer that is known to be on each particular
# network will respond to pings. The various numbers here need to be chosen
# with a great deal of care.)
#
# mapping eth0
#    script /path/to/ping-places.sh
#    map 192.168.42.254/24 192.168.42.1 home
#    map 10.15.43.254/24 10.15.43.1 work-wireless
#    map 10.15.43.23/24 10.15.43.1 work-static
#
# iface home inet dhcp
# iface work-wireless bootp
# iface work-static static
#     address 10.15.43.23
#     netmask 255.255.255.0
#     gateway 10.15.43.1
#
# Note that the ping-places script requires the iproute package installed,
# and the same changes to /etc/pcmcia/network are required for this as for
# the previous example.

# Set up an interface to read all the traffic on the network. This
# configuration can be useful to setup Network Intrusion Detection
# sensors in 'stealth'-type configuration. This prevents the NIDS
# system to be a direct target in a hostile network since they have
# no IP address on the network. Notice, however, that there have been
# known bugs over time in sensors part of NIDS (for example see
# DSA-297 related to Snort) and remote buffer overflows might even be
# triggered by network packet processing.
#
# auto eth0
# iface eth0 inet manual
# 	up ifconfig $IFACE 0.0.0.0 up
#       up ip link set $IFACE promisc on
#       down ip link set $IFACE promisc off
#       down ifconfig $IFACE down

# Set up an interface which will not be allocated an IP address by
# ifupdown but will be configured through external programs. This
# can be useful to setup interfaces configured through other programs,
# like, for example, PPPOE scripts.
#
# auto eth0
# iface eth0 inet manual
#       up ifconfig $IFACE 0.0.0.0 up
#       up /usr/local/bin/myconfigscript
#       down ifconfig $IFACE down

Last edited by LeetShiva; 08-10-2012 at 05:24 AM.
 
Old 08-10-2012, 08:28 AM   #7
LeetShiva
LQ Newbie
 
Registered: Jul 2012
Distribution: Arch, Gentoo, CrunchBang, Archbang, Slackware, FreeBsd, DamnSmallLinux, Debian
Posts: 21

Original Poster
Rep: Reputation: Disabled
I have solved this issue by removing in /etc/network/interfaces everything but:
Code:
# The loopback network interface
auto lo
iface lo inet loopback
everything else is commented out and now network manager understand and bring up all interfaces upon booting but I'm not sure can I now bring them up manually ?

For some reason debian now work fine and network manager bring up all interfaces without need to mess with ifup and ifdown commands.

My question is can I now bring them up manually ?

Last edited by LeetShiva; 08-10-2012 at 08:29 AM.
 
  


Reply

Tags
adsl, linux, network connectivity, network interface


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
beginning interface eth0 : device eth0 has different MAC address to expected.FAILED petrofrontier Linux - Software 2 02-28-2011 11:09 AM
ERROR: The interface does not exist (UBUNTU) interface eth0 not configured anshulbhatt Linux - Networking 2 11-20-2008 12:23 PM
Bringing up interface eth0 Delaying eth0 initialization. [ FA bansal_ashok Linux - Networking 4 05-27-2005 10:09 AM
application sox uses obsolete OSS audio interface awt586 Fedora 2 01-12-2005 12:08 PM
Bringing up interface eth0: determining ip information for eth0... failed ralphethomas Linux - Networking 0 01-24-2004 05:33 PM


All times are GMT -5. The time now is 12:25 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration