LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-24-2009, 12:35 AM   #1
svar
Member
 
Registered: Jul 2003
Posts: 362

Rep: Reputation: 30
How come all other distros see eth0 and slack eth1 for the dsl modem/router


The story is: Due to an M/B failure, I had to replace the entire system(holding 3 linux distros). Two of them had serious corruption(superblock fot found), but one of them (Slack 12) I was able to recover. DSL however did not. I also installed Open Suse and again, no DSL. However, Slack's ifconfig detects and eth1 , but no eth0, while Open Suse 11.1 detects and eth0, no eth1.


Here is for Slack:
ifconfig -a
eth1 Link encap:Ethernet HWaddr 00:19:66:99:04:F8
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::219:66ff:fe99:4f8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:4294967279 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)
Interrupt:17 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:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1176 (1.1 KiB) TX bytes:1176 (1.1 KiB)

I then tried an Ubuntu CD(ran it from the live cd without installing and the DSL worked like a charm. It also reports eth0, not eth1

In fact I also took the resolv.conf from there and now OpenSuse also worked. But Slack still refuses, though the resolv.conf and rc.inet1.conf are the same as Ubuntu.
I suspect the problem is the eth0 vs eth1? I don't think there are two interfaces, so probably Slack, which was built for the old M/B is confused here. The question is how do I fix that
 
Old 07-24-2009, 01:08 AM   #2
buggyazyn
LQ Newbie
 
Registered: Jul 2009
Distribution: Slackware
Posts: 3

Rep: Reputation: 0
I have a similar problem. I just edit /etc/udev/rules.d/70-persistent-net.rules.
Search for your network card and change NAME="eth1" for eth0.
 
Old 07-24-2009, 11:03 AM   #3
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 564

Rep: Reputation: Disabled
This happens when you change network adapters, without modifying your network programs. udev is reserving eth0 for the original network adapter, so your new one gets eth1. The above solution works fine.
Regards,
Bill
 
Old 07-24-2009, 08:45 PM   #4
SqdnGuns
Senior Member
 
Registered: Aug 2005
Location: Pensacola, FL
Distribution: Slackware64® Current & Arch
Posts: 1,092

Rep: Reputation: 174Reputation: 174
Quote:
Originally Posted by TSquaredF View Post
This happens when you change network adapters, without modifying your network programs. udev is reserving eth0 for the original network adapter, so your new one gets eth1. The above solution works fine.
Regards,
Bill
Yup, Alien Bob covered this in a post a few days back.
 
Old 08-03-2009, 01:04 AM   #5
svar
Member
 
Registered: Jul 2003
Posts: 362

Original Poster
Rep: Reputation: 30
I looked at the post mentioned, but still no success:
Briefly, I have an Open Suse that works and a Slack that does not ON THE SAME machine. So, what would be simpler than just copying the config files?

Let's see:
udev: There is no difference in the persistent-net.rules file(because I copied the one from suse to the slack one)

bash-3.1# diff 70-persistent-net.rules /mnt/root/etc/udev/rules.d/70-persistent-net.rules
bash-3.1#
cat 70-persistent-net.rules
# 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.
# PCI device 0x10ec:0x8136 (r8169)
# 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.
# PCI device 0x10ec:0x8136 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:19:66:99:04:f8", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

Also resolv.conf is the same


bash-3.1# cat resolv.conf
nameserver 192.168.1.1
#nameserver 195.170.0.1
bash-3.1#

and ifconfig -a:

For openSuse:

me@dhcppc0:~> su
Password:
dhcppc0:/home/me # ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:19:66:99:04:F8
inet addr:192.168.1.6 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::219:66ff:fe99:4f8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3547 errors:0 dropped:125141407 overruns:0 frame:0
TX packets:2521 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5128475 (4.8 Mb) TX bytes:189575 (185.1 Kb)
Interrupt:221 Base address:0x8000

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:56 errors:0 dropped:0 overruns:0 frame:0
TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3496 (3.4 Kb) TX bytes:3496 (3.4 Kb)


and for Slack:


ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:19:66:99:04:F8
inet addr:192.168.1.6 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::219:66ff:fe99:4f8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:4294967257 overruns:0 frame:0
TX packets:0 errors:0 dropped:6 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:17 Base address:0x8000

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)

--------------------
for completeness, here is rc.inet1.conf from Slack(Suse uses xinetd and I forgot where the relevant files are, but this file looks ok):
# /etc/rc.d/rc.inet1.conf
#
# This file contains the configuration settings for network interfaces.
# If USE_DHCP[interface] is set to "yes", this overrides any other settings.
# If you don't have an interface, leave the settings null ("").

# You can configure network interfaces other than eth0,eth1... by setting
# IFNAME[interface] to the interface's name. If IFNAME[interface] is unset
# or empty, it is assumed you're configuring eth<interface>.

# Several other parameters are available, the end of this file contains a
# comprehensive set of examples.

# =============================================================================

# Config information for eth0:
IPADDR[0]="192.168.1.6"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""

# Config information for eth1:
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""

# Config information for eth2:
IPADDR[2]=""
NETMASK[2]=""
USE_DHCP[2]=""
DHCP_HOSTNAME[2]=""

# Config information for eth3:
IPADDR[3]=""
NETMASK[3]=""
USE_DHCP[3]=""
DHCP_HOSTNAME[3]=""

# Default gateway IP address:
GATEWAY="192.168.1.1"

# Change this to "yes" for debugging output to stdout. Unfortunately,
# /sbin/hotplug seems to disable stdout so you'll only see debugging output
# when rc.inet1 is called directly.
DEBUG_ETH_UP="no"

## Example config information for wlan0. Uncomment the lines you need and fill
## in your info. (You may not need all of these for your wireless network)
#IFNAME[4]="wlan0"
#IPADDR[4]=""
#NETMASK[4]=""
#USE_DHCP[4]="yes"
#DHCP_HOSTNAME[4]="icculus-wireless"
#DHCP_KEEPRESOLV[4]="yes"
#DHCP_KEEPNTP[4]="yes"
#DHCP_KEEPGW[4]="yes"
#DHCP_IPADDR[4]=""
#WLAN_ESSID[4]=BARRIER05
#WLAN_MODE[4]=Managed
##WLAN_RATE[4]="54M auto"
##WLAN_CHANNEL[4]="auto"
##WLAN_KEY[4]="D5AD1F04ACF048EC2D0B1C80C7"
##WLAN_IWPRIV[4]="AuthMode=WPAPSK EncrypType=TKIP WPAPSK=7B1ABEEB5D197741923ED26727569C365E31212096A0EAFAD563B268BAD01CAF TxRate=0"
#WLAN_WPA[4]="wpa_supplicant"
#WLAN_WPADRIVER[4]="ndiswrapper"

## Some examples of additional network parameters that you can use.
## Config information for wlan0:
#IFNAME[4]="wlan0" # Use a different interface name nstead of
# the default 'eth4'
#HWADDR[4]="00:01:23:45:67:89" # Overrule the card's hardware MAC address
#MTU[4]="" # The default MTU is 1500, but you might need
# 1360 when you use NAT'ed IPSec traffic.
#DHCP_KEEPRESOLV[4]="yes" # If you dont want /etc/resolv.conf overwritten
#DHCP_KEEPNTP[4]="yes" # If you don't want ntp.conf overwritten
#DHCP_KEEPGW[4]="yes" # If you don't want the DHCP server to change
# your default gateway
#DHCP_IPADDR[4]="" # Request a specific IP address from the DHCP
# server
#WLAN_ESSID[4]=DARKSTAR # Here, you can override _any_ parameter
# defined in rc.wireless.conf, by prepending
# 'WLAN_' to the parameter's name. Useful for
# those with multiple wireless interfaces.
#WLAN_IWPRIV[4]="AuthMode=WPAPSK EncrypType=TKIP WPAPSK=thekey TxRate=0"
# Some drivers require a private ioctl to be
# set through the iwpriv command. If more than
# one is required, you can place them in the
# IWPRIV parameter (space-separated, see the
# example).
 
Old 08-03-2009, 07:25 AM   #6
Franklin
Senior Member
 
Registered: Oct 2002
Distribution: Slackware
Posts: 1,348

Rep: Reputation: 217Reputation: 217Reputation: 217
Looking at your last post, it seems that you have the nic identified as eth0, so that problem looks sorted.

I notice that resolv.conf, which you copied from SUSE, seems to list your router as the nameserver. This has never worked for me with Slackware. Probaly some additional config voodoo required. Instead, try explicitly stating the nameserver your ISP has given you in resolv.conf. You can find this listed often on the configuration page for your router (point a browser to your default gateway - at least in my case, YMMV) or you can use 4.2.2.1 and 4.2.2.2 as the nameserver:

nameserver 4.2.2.1
nameserver 4.2.2.2

HTH
 
Old 08-04-2009, 12:44 AM   #7
svar
Member
 
Registered: Jul 2003
Posts: 362

Original Poster
Rep: Reputation: 30
Smile

I did change the resolv.conf(I have no idea why Suse can do without it though and it would be nice to understand this), so it reads

nameserver 195.170.0.1
nameserver 195.170.2.2




(which are the correct ones), but it still has the same problem. I can ping to the ip address, but not the router(default gw) address. Again, no idea why this is so and why this is not a problem for Suse.
 
Old 08-04-2009, 01:13 AM   #8
Nille_kungen
Member
 
Registered: Jul 2005
Distribution: Slackware64-current
Posts: 587

Rep: Reputation: 201Reputation: 201Reputation: 201
Whats the output of 'route -n' or 'netstat -rn' ?
And what address is it that your trying to ping?
Does the DNS work? (google.com vs 74.125.127.100)
 
Old 08-04-2009, 03:32 AM   #9
svar
Member
 
Registered: Jul 2003
Posts: 362

Original Poster
Rep: Reputation: 30
I cannot ping(connction timed out)
192.168.1.1
which according to rc.inet1.conf is the
Default gateway IP address:
GATEWAY="192.168.1.1"

I can ping eth0:192.168.1.6

I will try the route and netstat commands. I am not sure which configuration files set the
relevant parameters(if I did, I could copy them over from the Suse installation, which works fine)
 
Old 08-04-2009, 09:15 AM   #10
svar
Member
 
Registered: Jul 2003
Posts: 362

Original Poster
Rep: Reputation: 30
Yes, route -h or netstat show a conflict. Not sure how to resolve it though....

route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.1.1 0.0.0.0 UG 1 0 0 eth0
bash-3.1# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
 
  


Reply



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
Eth0 using DHCP and eth1 using static ip: eth0 receive internal ip not the router ip geraldomanaus Linux - Networking 3 04-23-2008 03:00 PM
howto acess intrnet thru eth1(wireless card)in winXP via briging in linux(eth0-eth1) labhesh_popli Linux - Wireless Networking 1 09-21-2006 01:11 AM
Setting up PC as router, eth1 problem talking to modem NeXuS_2006 Linux - Networking 6 01-17-2005 01:23 PM
eth1 added, mysql connections FROM this machine are from eth1. Need bound to eth0??? kreese Linux - Networking 9 03-31-2004 12:12 PM
dchp dsl/router eth0 redhat 7.0 BlueKrystal22 Linux - Newbie 14 06-23-2003 08:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:14 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration