Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ETH0 vs ETH1

243 views
Skip to first unread message

greymausg

unread,
Feb 4, 2013, 12:28:38 PM2/4/13
to

Replaced my motherboard, but Slackware will no connect
to the internet unless I enter

ifconfig eth1 192.168.1.18
dhclient

(The subnet code is found by booting with Knoppix)
Slackware seems to expect ETH0
but Knoppix will connect to ETH1
There is only one LAN port on the motherboard


--
maus
.
.
...

John K. Herreshoff

unread,
Feb 4, 2013, 12:42:23 PM2/4/13
to
I'm not sure, but I would wonder what /etc/rc.d/rc.inet1.conf looks like...
I would guess that some startup program finds and labels your wired
connections as eth0, eth1, and so on. I'm wondering if you could rename
eth0 to eth1 and see what happens...

John.

--
Using the Cubic at home

Ken P

unread,
Feb 4, 2013, 12:49:53 PM2/4/13
to
Check "/etc/udev/rules.d/70-persistent-net.rules" and maybe delete the
entry for eth0 and eth1 or reverse eth0 and eth1.


--
Ken P

Lew Pitcher

unread,
Feb 4, 2013, 12:54:54 PM2/4/13
to
On Monday 04 February 2013 12:28, in alt.os.linux.slackware, ma...@mail.com
wrote:
That's strange. What does dmesg tell you about the ethernet devices? How
about lspci and lsusb? Unless otherwise configured, udev assignes ethernet
devices in sequence; the first one detected becomes eth0, the second eth1,
and so on.

If Slackware's udev thinks that you have an eth1, then either you have two
ethernet devices, or you may have an overriding udev rule.

Look for /etc/udev/rules.d/70-persistent-net.rules

FWIW, you can use the rules in /etc/udev/rules.d/70-persistent-net.rules
to set up the devices in the order you like. On one of my systems, one NIC
attaches to my LAN, while the other to my ISP. I have rules in
70-persistent-net.rules to ensure that eth0 is assigned to the proper NIC,
so that routing and firewalling rules properly apply. The format looks like
# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", \
ATTR{address}=="00:24:8c:75:4d:bf", ATTR{type}=="1", KERNEL=="eth*", \
NAME="eth0"

# PCI device 0x10b7:0x9055 (3c59x)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", \
ATTR{address}=="00:10:5a:1b:08:a9", ATTR{type}=="1", KERNEL=="eth*", \
NAME="eth1"

(lines folded for posting - original does not use folded lines)

HTH
--
Lew Pitcher
"In Skills, We Trust"

greymausg

unread,
Feb 4, 2013, 1:04:59 PM2/4/13
to
Ta, will try

John F. Morse

unread,
Feb 4, 2013, 2:10:38 PM2/4/13
to
Does Slackware use:

interfaces(5)

/etc/network/interfaces


--
John

When a person has -- whether they knew it or not -- already
rejected the Truth, by what means do they discern a lie?

Kees Theunissen

unread,
Feb 4, 2013, 2:41:31 PM2/4/13
to
John F. Morse wrote:
> On 02/04/2013 11:28 AM, greymausg wrote:
>> Replaced my motherboard, but Slackware will no connect
>> to the internet unless I enter
>>
>> ifconfig eth1 192.168.1.18
>> dhclient
>>
>> (The subnet code is found by booting with Knoppix)
>> Slackware seems to expect ETH0
>> but Knoppix will connect to ETH1
>> There is only one LAN port on the motherboard
>
>
> Does Slackware use:
>
> interfaces(5)
>
> /etc/network/interfaces

Did you try to find the answer yourself?
It's not too complicated:

$ man interfaces
No manual entry for interfaces

$ ls -l /etc/network
/bin/ls: cannot access /etc/network: No such file or directory

So obviously Slackware does not use /etc/network/interfaces.


Regards,

Kees.

--
Kees Theunissen.

John F. Morse

unread,
Feb 4, 2013, 4:12:17 PM2/4/13
to
On 02/04/2013 01:41 PM, Kees Theunissen wrote:
> John F. Morse wrote:
>> On 02/04/2013 11:28 AM, greymausg wrote:
>>> Replaced my motherboard, but Slackware will no connect
>>> to the internet unless I enter
>>>
>>> ifconfig eth1 192.168.1.18
>>> dhclient
>>>
>>> (The subnet code is found by booting with Knoppix)
>>> Slackware seems to expect ETH0
>>> but Knoppix will connect to ETH1
>>> There is only one LAN port on the motherboard
>>
>> Does Slackware use:
>>
>> interfaces(5)
>>
>> /etc/network/interfaces
> Did you try to find the answer yourself?


Yes, I asked the OP about it. Why make such a remark.

I'm running Debian, which does have interfaces.

I do have Slackware 10.1 and 13 on older hardware in the basement, but I'm not
going to bother booting it to please you.


> It's not too complicated:
>
> $ man interfaces
> No manual entry for interfaces


I get the manual page. Not complicated for me at all.

Going to the basement is complicated though.

Furthermore, you can have interfaces without the manual page.


> $ ls -l /etc/network
> /bin/ls: cannot access /etc/network: No such file or directory
>
> So obviously Slackware does not use /etc/network/interfaces.


Perhaps obvious to you, but maybe it is that you don't have the file, while
others might?

That is why I asked the OP if HE had the file.


> Regards,
>
> Kees.


What kind of "regards" Kees?

Kees Theunissen

unread,
Feb 4, 2013, 7:06:14 PM2/4/13
to
John F. Morse wrote:
> On 02/04/2013 01:41 PM, Kees Theunissen wrote:

>> So obviously Slackware does not use /etc/network/interfaces.
>
>
> Perhaps obvious to you, but maybe it is that you don't have the file, while
> others might?
>
> That is why I asked the OP if HE had the file.
>
>
>> Regards,
>>
>> Kees.
>
>
> What kind of "regards" Kees?

John, you're right. Please accept my apologies.
You are posting in this group on a more or less regular basis, so I
assumed that you were a regular Slackware user. But even in that case
I should have formulated my answer differently.

Network interfaces are configured in Slackware in
/etc/rc.d/rc.inet1.conf. That is functionally similar to
/etc/network/interfaces in debian. The OP can (but shouldn't)
restore network functionality by configuring the eth1 interface
instead of eth0.

The problem is caused by the replacement of the original network
interface, or in this case the replacement of the complete
motherbord which contains an integrated network interface.

The udev subsystem keeps a permanent registration of which
interface name (eth0, eth1, ...) has been assigned to which
hardware. This registration is stored in the file
/etc/udev/rules.d/70-persistent-net.rules (this is the same on
slackware and debian). This is done to ensure that on systems with
several interfaces each interface gets its old name back after a
reboot. The consequence of this permanent registration is that
it needs manual intervention after the replacement of a network
interface. Either /etc/udev/rules.d/70-persistent-net.rules
can be edited to reflect the new situation, or the complete file
can be deleted (it will be created again after a reboot).

Robby Workman

unread,
Feb 4, 2013, 10:02:55 PM2/4/13
to
On 2013-02-04, Ken P <K...@invalid.invalid> wrote:
There's your answer ^^

In fact, I documented this very issue in CHANGES_AND_HINTS.TXT, which
is on every mirror and every cd and dvd we shipped:

Speaking of udev, pay particular attention to 70-persistent-net.rules and
70-persistent-cd.rules in /etc/udev/rules.d/ -- these two are automatically
generated by the system. If you remove, add, and/or replace some hardware
(specifically network cards and/or optical drives) in a machine, you will
probably need to edit one or both of the rules files mentioned above (or
just remove them and reboot to create new ones).

-RW

John F. Morse

unread,
Feb 5, 2013, 3:58:42 AM2/5/13
to
Kees Theunissen <theu...@rijnh.nl> wrote:
> John, you're right. Please accept my apologies.

Accepted with thanks.

> You are posting in this group on a more or less regular basis, so I
> assumed that you were a regular Slackware user. But even in that case
> I should have formulated my answer differently.

I do read this group several times each day. There is always more knowledge found here than in, say, a.o.l.u where the flames burn high.

I rarely post unless I have a question, or can offer some knowledge that is distro-independent.

In this case, I didn't know, but I did know about the interfaces file in Debian because I've worked with it frequently when building servers, such as Linux routers, where I may change the physical NIC several times, or move it to a different PCI slot.

> Network interfaces are configured in Slackware in
> /etc/rc.d/rc.inet1.conf. That is functionally similar to
> /etc/network/interfaces in debian. The OP can (but shouldn't)
> restore network functionality by configuring the eth1 interface
> instead of eth0.

That is good to know, and I appreciate you providing the info.

As I mentioned, I do have Slackware on a couple of PCs. They were installed for my education, and not really for running any services.

> The problem is caused by the replacement of the original network
> interface, or in this case the replacement of the complete
> motherbord which contains an integrated network interface.

Exactly. Well-known result of making hardware changes, but easy to "fix" since, in Linux, all hardware is represented by a text file. The editor is the all-purpose tool.

> The udev subsystem keeps a permanent registration of which
> interface name (eth0, eth1, ...) has been assigned to which
> hardware. This registration is stored in the file
> /etc/udev/rules.d/70-persistent-net.rules (this is the same on
> slackware and debian). This is done to ensure that on systems with
> several interfaces each interface gets its old name back after a
> reboot. The consequence of this permanent registration is that
> it needs manual intervention after the replacement of a network
> interface. Either /etc/udev/rules.d/70-persistent-net.rules
> can be edited to reflect the new situation, or the complete file
> can be deleted (it will be created again after a reboot).

Also see /lib/udev/write_net_rules which I'm guessing is in Slackware.

greymausg

unread,
Feb 5, 2013, 4:56:01 AM2/5/13
to
Further progress, reinstalled a/*.txz, loading crashed,
so I chrooted in, and mkinitrd an initrd, then wrote an
usbbootimg, which looks for "Insert boot floppy". Reminds me
of a video on YouTube, showing a car bogging down, then the tractor
bogs down, finally a tracked tractor, with great effort, gets all
out.

greymausg

unread,
Feb 5, 2013, 12:56:10 PM2/5/13
to
Once again, RTFM,
Ta.

greymausg

unread,
Feb 5, 2013, 2:30:44 PM2/5/13
to
Finall, fixed all, that machine is backing up now, which I should have
done earlier.

Dan C

unread,
Feb 5, 2013, 10:20:17 PM2/5/13
to
n00b.


--
"Ubuntu" -- an African word, meaning "Slackware is too hard for me".
"Bother!" said Pooh, as he dropped the razor on his gonads.
Usenet Improvement Project: http://twovoyagers.com/improve-usenet.org/
Thanks, Obama: http://brandybuck.site40.net/pics/politica/thanks.jpg

Chick Tower

unread,
Feb 7, 2013, 3:03:43 PM2/7/13
to
On 2013-02-06, Dan C <youmust...@lan.invalid> wrote:
> n00b.

Thank you ever so much for your helpful answer, Dan.
--
Chick Tower

For e-mail: aols2 DOT sent DOT towerboy AT xoxy DOT net

Dan C

unread,
Feb 7, 2013, 8:58:40 PM2/7/13
to
On Thu, 07 Feb 2013 20:03:43 +0000, Chick Tower wrote:

> On 2013-02-06, Dan C <youmust...@lan.invalid> wrote:
>> n00b.
>
> Thank you ever so much for your helpful answer, Dan.

I aim to please. :)

My point was that someone who doesn't bother to read
CHANGES_AND_HINTS.TXT when installing a new version of Slack can only be
called a ............ n00b.

What would you call such a person?


--
"Ubuntu" -- an African word, meaning "Slackware is too hard for me".
"Bother!" said Pooh, as he rolled off the prostitute.

Aragorn

unread,
Feb 7, 2013, 9:31:32 PM2/7/13
to
On Friday 08 February 2013 02:58, Dan C conveyed the following to
alt.os.linux.slackware...

> On Thu, 07 Feb 2013 20:03:43 +0000, Chick Tower wrote:
>
>> On 2013-02-06, Dan C <youmust...@lan.invalid> wrote:
>>> n00b.
>>
>> Thank you ever so much for your helpful answer, Dan.
>
> I aim to please. :)
>
> My point was that someone who doesn't bother to read
> CHANGES_AND_HINTS.TXT when installing a new version of Slack can only
> be called a ............ n00b.
>
> What would you call such a person?

A gambler. Or an "investigative journalist". :p

--
= Aragorn =
(registered GNU/Linux user #223157)

notbob

unread,
Feb 7, 2013, 9:54:28 PM2/7/13
to
On 2013-02-08, Aragorn <str...@telenet.be.invalid> wrote:
> On Friday 08 February 2013 02:58, Dan C conveyed the following to

>> My point was that someone who doesn't bother to read
>> CHANGES_AND_HINTS.TXT when installing a new version of Slack can only
>> be called a ............ n00b.
>>
>> What would you call such a person?
>
> A gambler. Or an "investigative journalist". :p

notbob?

nb

Michael Black

unread,
Feb 8, 2013, 3:15:08 PM2/8/13
to
The word might be "hacker" if the word hadn't been overused and applied
to where it doesn't apply.

But certainly if someone was learning from experience, ie a hacker, they'd
not be asking in the newsgroup. Then they just look like a newbie.

Michael

Joe Rosevear

unread,
Feb 9, 2013, 12:15:30 AM2/9/13
to
How about making a new /etc/rc.d/rc.inet1.conf file which uses eth1?

I see this from a different viewpoint, since I run Slackware from an
external USB drive. The drive may be connected to a variety of
different host boxes each with a different network interface card
(nic).

It's easier for me to let a nic keep the associated interface assigned
to it by udev.

This is similar to a more general philosophy that I try to follow: Let
a thing be what it is. If I make a new installation of Slackware, I
give it a new host name, instead of re-using the same name. When I
make passwords, I don't try to make them easy to remember or make a
group of them the same. I let each password be random and unique, and
I deal with it as needed. This is vaguely like the no top-posting
philosophy. Don't give in to the temptation to do it backwards, just
do it. (Oh, I guess that's the Nike philosophy.)

--
http://JosephRosevear.com
http://RosevearSoftware.com

Ed Wilson

unread,
Feb 11, 2013, 12:22:28 PM2/11/13
to
Joe Rosevear wrote:

>
> How about making a new /etc/rc.d/rc.inet1.conf file which uses eth1?
>
> I see this from a different viewpoint, since I run Slackware from an
> external USB drive. The drive may be connected to a variety of
> different host boxes each with a different network interface card
> (nic).
>
> It's easier for me to let a nic keep the associated interface assigned
> to it by udev.
>

How many devices do you have in /etc/rc.d/rc.inet1.conf? Would it be any
easier to add rm /etc/udev/rules.d/70-persistent-net.rules to
/etc/rc.d/rc.local_shutdown?

--
Ed

Joe Rosevear

unread,
Feb 14, 2013, 1:50:29 AM2/14/13
to
Ed Wilson <ewi...@jackmaxton.com> wrote:
I have one device in /etc/rc.d/rc.inet1.conf, but I didn't make the
file directly.

It is generated by a tool I wrote that lives at etc/rc.d/rc.JBD. That
tool finds "box=<box>" on the boot line, then compares
"/etc/rc.d/rc.inet1.conf" to "/etc/rc.d/rc.inet1.conf-<box>". If they
are different, it stops the network, copies rc.inet1.conf-<box> to
rc.inet1.conf, and restarts the network. The tool runs automatically
at boot up, as it is invoked by /etc/rc.d/rc.local.

This way I can choose the network behavior by the parameter <box> that
I supply. I have not yet included /etc/wpa_supplicant.conf in this
scheme, but it should be simple to treat it the same way.

I did consider doing what you suggested, then I came up with the scheme
I described. It seems to me that frequent re-making of
70-persistent-net.rules might cause some erratic behavior, and this
method doesn't give me the same easy control of network behavior.

Since I use a boot disk (JBD) anyway, it's easy to include box=<box>
when I make the JBD.

Did any of this help?

Ed Wilson

unread,
Feb 14, 2013, 6:40:19 PM2/14/13
to
It helps in that I understand what you are doing better. My next question
would have been, Do you have to worry about static addresses or wireless
cards, but I see that you have thought of that also.

I have a laptop and use the network management plasmoid on Slackware 14,
before that I used wicd in my KDE tray in previous versions of Slackware.

--
Ed
0 new messages