Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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
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
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:
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 ?
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.