LinuxQuestions.org
Help answer threads with 0 replies.
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 06-26-2017, 04:01 AM   #1
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Rep: Reputation: 68
/etc/rc.d/rc.inet1.conf - bridge config overwrites first interface config


In rc.inet1.conf, if the first interface is configured and *not* part of the bridge, and the bridge section is configured below as well, the bridge configuration overwrites the configuration for the first interface - because they use the same array index. I have spent a few hours troubleshooting when this first happened to me, as it just wasn't obvious why eth0 (in my case) remained unconfigured, although the relevant section in rc.inet1.conf was filled in. The two sections are not even next to each other in rc.inet1.conf, so you don't stand much chance of spotting the issue quickly - and all the other sample sections in rc.inet1.conf use different indexes.

I wonder if it would be possible to give the sample bridge config a different array index - maybe '5' - to follow on after the index used by the wifi config - or another one much higher? It would also be nice if all the sections would be arranged in ascending order of their index in the file - this way if a new section is inserted by the end user - it is much easier to spot if duplicate index entries are created. Just to make it less likely for others to fall in the same trap I did. Or maybe use a separate array for bridge interfaces?

Last edited by xj25vm; 06-27-2017 at 06:31 AM.
 
Old 06-27-2017, 04:50 AM   #2
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 567

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Hi,

the interfaces (eth0, eth1,...) are associated to different NICs on your machine if no bridge is running. When you are operating a bridge, an interface will be associated with that bridge and if your card is added to the bridge, it cannot be used for Internet protocol traffic anymore. There is a step in setting up of a bridge where there is zeroing of IP addresses associated with the NICs before reconfiguring them inside the bridge. This is why the bridge settings on a single machine in /etc/rc.d/rc.inet1.conf supersedes the eth0 settings above it.

Check these out:
http://www.microhowto.info/howto/bri..._on_linux.html
https://wiki.linuxfoundation.org/networking/bridge
http://www.tldp.org/HOWTO/BRIDGE-STP-HOWTO/index.html

Last edited by aragorn2101; 06-27-2017 at 04:53 AM.
 
Old 06-27-2017, 06:05 AM   #3
Slax-Dude
Member
 
Registered: Mar 2006
Location: Valadares, V.N.Gaia, Portugal
Distribution: Slackware
Posts: 528

Rep: Reputation: 272Reputation: 272Reputation: 272
Can you please post your rc.inet1.conf?
 
Old 06-27-2017, 06:31 AM   #4
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Original Poster
Rep: Reputation: 68
@aragorn2101 - as per my original post, I am referring to the case where a bridge is configured, but eth0 is *not* part of the bridge (the bridge can contain other interfaces on the machine, such as eth1 or tap0). Unless I'm missing something, in this case, eth0 should not be affected by the bridge configuration, its IP address should not be zeroed and its configuration should not be superseded by the bridge configuration.

Last edited by xj25vm; 06-27-2017 at 06:33 AM.
 
Old 06-28-2017, 04:03 AM   #5
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 567

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Quote:
Originally Posted by xj25vm View Post
@aragorn2101 - as per my original post, I am referring to the case where a bridge is configured, but eth0 is *not* part of the bridge (the bridge can contain other interfaces on the machine, such as eth1 or tap0). Unless I'm missing something, in this case, eth0 should not be affected by the bridge configuration, its IP address should not be zeroed and its configuration should not be superseded by the bridge configuration.
Ah ok. Sorry for the confusion.

According to Slackware's /etc/rc.d/rc.inet1.conf, it seems that if you have a bridge, then eth0 would be reserved for the bridge. Then, let's say previously you had 3 cards: eth0, eth1 and eth2, you simply shift the ifnames. You change the cards to eth1, eth2 and eth3 respectively, and you change the udev rules in /etc/udev/rules.d/...net.rules for everything to work.

Make a backup of the udev rules before modifying anything.
 
Old 06-28-2017, 04:23 AM   #6
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Original Poster
Rep: Reputation: 68
Quote:
Originally Posted by aragorn2101 View Post
According to Slackware's /etc/rc.d/rc.inet1.conf
Where? My rc.inet1.conf doesn't contain any comments or hints to that effect. Besides, are you suggesting having to change udev rules just to configure a bridge without eth0? Really? It seems like a long way around - instead of just giving the bridge config section in rc.inet1.conf a different, unused index number - which just works.

Not to mention the effort put into troubleshooting when eth0 config doesn't work in the first place, and it isn't obvious why.
 
1 members found this post helpful.
Old 06-29-2017, 03:45 AM   #7
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 567

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Quote:
Originally Posted by xj25vm View Post
... giving the bridge config section in rc.inet1.conf a different, unused index number - which just works. ...
It works? That's great, I think many people just learned something from you.

Yeah, my suggestion really would be tedious to implement.

Anyway, thanks for letting us know it works to just change the index of the interface.
 
Old 06-29-2017, 05:06 AM   #8
Slax-Dude
Member
 
Registered: Mar 2006
Location: Valadares, V.N.Gaia, Portugal
Distribution: Slackware
Posts: 528

Rep: Reputation: 272Reputation: 272Reputation: 272
Quote:
Originally Posted by xj25vm View Post
In rc.inet1.conf, if the first interface is configured and *not* part of the bridge, and the bridge section is configured below as well, the bridge configuration overwrites the configuration for the first interface - because they use the same array index.
Yes, if you use defaults.
Quote:
Originally Posted by xj25vm View Post
and all the other sample sections in rc.inet1.conf use different indexes.
Indeed.
Quote:
Originally Posted by xj25vm View Post
I wonder if it would be possible to give the sample bridge config a different array index - maybe '5' - to follow on after the index used by the wifi config - or another one much higher?
That would be best.
If bridge sample config used index 5 it wouldn't cause problems when using defaults.
Safe defaults are important.
 
1 members found this post helpful.
  


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
[SOLVED] bridge, dhcp and rc.inet1.conf MRZA Slackware 6 04-13-2015 12:13 PM
Slackware 12.2: Wireless interface predefined instead of taken from rc.inet1.conf? gargamel Slackware 21 12-29-2008 07:20 AM
rc.inet1 will NOT load/Mp3 playback/Amarok Config tubatodd Slackware 7 07-14-2006 11:11 PM
Config Error: Error accessing config file: /etc/yum.conf dr_zayus69 Linux - Software 2 01-17-2006 05:20 PM
strange problem with rc.inet1 / eth0 config shadow.blue Slackware 2 06-25-2003 02:50 AM

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

All times are GMT -5. The time now is 03:53 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