# iproute2 necessary now?

## simon_irl

excuse my ignorance of ip etc. (this is probably a very stupid question), but...why is iproute2 necessary on my system now, when it wasn't yesterday before i updated baselayout? with yesterday's baselayout, i could start net.eth0 with no problems, but today netmount failed and suggested i emerge iproute2 (which i did, and the network now works).

also...if iproute2 is now required, how come emerge -uD world didn't grab it?

----------

## UberLord

https://bugs.gentoo.org/show_bug.cgi?id=108960

It's a bug - iproute2 should not be a requirement

----------

## simon_irl

ah...sorry...i searched the forums but forgot the bugs. thanks for the quick reply.

----------

## UberLord

There's a patch posted to the bug - care to try it before I commit it to portage?

----------

## UberLord

Too slow!

baselayout-1.12.0_pre9-r1 was just comitted to the tree which fixes this

----------

## grimlog

 *UberLord wrote:*   

> Too slow!
> 
> baselayout-1.12.0_pre9-r1 was just comitted to the tree which fixes this

 

So, you are the guy responsible for this? May I ask, how you test things? You do tests, do you? I have the simplest setup in the world. Only eth0, one IP assigned, simple route to my router. Why on earth do you submit things to the tree, breaking really basic setups? I had no problems bringing eth0 up manually to search for the reason. I only wonder, how this mess could happen at all   :Evil or Very Mad:  I am aware of the fact, that this happend to me, because I run ~x86, but imo you should take better care of what you are doing.

regards, Michael

----------

## MerlinTheWizard

 *UberLord wrote:*   

> Too slow!
> 
> baselayout-1.12.0_pre9-r1 was just comitted to the tree which fixes this

 

It doesn't seem to fix it very well.

The net.eth0 script is fixed now, but iproute2 has been added as a requirement in net.lo!

Crap...

----------

## j-m

 *MerlinTheWizard wrote:*   

> 
> 
> It doesn't seem to fix it very well.
> 
> The net.eth0 script is fixed now, but iproute2 has been added as a requirement in net.lo!
> ...

 

Eh? /etc/init.d/net.eth0 is a symlink to /etc/init.d/net.lo   :Confused: 

----------

## MerlinTheWizard

 *j-m wrote:*   

>  *MerlinTheWizard wrote:*   
> 
> It doesn't seem to fix it very well.
> 
> The net.eth0 script is fixed now, but iproute2 has been added as a requirement in net.lo!
> ...

 

I didn't realize that, but you're right...

All I know is that I had fixed the script by hand yesterday. And today, a couple hours ago, I update baselayout with the "fixed" version, issue a "rc-update" and it wanted to update net.lo. When I inspected the differences before deciding to overwrite it or not with the new version, I noticed "iproute2" was back. That's all I know. So I discarded the updated version...

Don't know what's up with all that.

----------

## simon_irl

 *UberLord wrote:*   

> Too slow!

 

Heh...yeah...I was just going to say I've installed today's update to baselayout (and removed iproute2) and all is well...but I see you're probably aware of this, since you implemented it. Sorry I didn't see your request to test the patch in time.

Thanks for fixing it.

----------

## Autie

just tried sys-apps/baselayout-1.12.0_pre9-r1, and it gave me problems with net.eth0

It wanted to start ifplugd for some reason, wich i don't use normally, and even with this, net.eth0 won't start.

so, i guess there's still some work on

----------

## UberLord

 *grimlog wrote:*   

> So, you are the guy responsible for this? May I ask, how you test things? You do tests, do you? I have the simplest setup in the world. Only eth0, one IP assigned, simple route to my router. Why on earth do you submit things to the tree, breaking really basic setups? I had no problems bringing eth0 up manually to search for the reason. I only wonder, how this mess could happen at all   I am aware of the fact, that this happend to me, because I run ~x86, but imo you should take better care of what you are doing.
> 
> regards, Michael

 

OK - here's my defence. I added a new preferred module (netplugd) to the preferred module list. As I had all the modules emerged, I didn't see the error as the error was caused by me not updateing a variable specifying the number of perferred modules.

The current svn version has an improved fix where we calculate that number from a list instead of specifying it.

Or from another perspective, I do test my code a lot, but I cannot test for all configuartions as there is not enough time in the day.

Be happy that I fixed it within 20 minutes of being aware of it.

Thanks!

----------

## UberLord

 *Autie wrote:*   

> just tried sys-apps/baselayout-1.12.0_pre9-r1, and it gave me problems with net.eth0
> 
> It wanted to start ifplugd for some reason, wich i don't use normally, and even with this, net.eth0 won't start.
> 
> so, i guess there's still some work on

 

We try and be as automatic as possible - 1.12 now handles ifplugd - the ifplugd in ~ARCH has a new init script that should be able to interact with baselayout and vice versa.

The only downside is that ifplugd now launches automatically - which is good as you installed it! To stop baselayout from launching ifplugd on an interface you can do this

```
modules_eth0=( "!ifplugd" )
```

----------

## barum87

hmmm now my gentoo is totally offline. (Posting this on Windows)

Do I need to boot with my liveCD to get my internet connection back or is there a simpler solution?

----------

## Decibels

 *barum87 wrote:*   

> hmmm now my gentoo is totally offline. (Posting this on Windows)
> 
> Do I need to boot with my liveCD to get my internet connection back or is there a simpler solution?

 

**HOW TO FIX:(used patch info) Okay, don't need the LiveCD,.... just boot to Gentoo. Open /etc/init.d/net.lo with nano as root. 

```
#nano  -w  /etc/init.d/net.lo

Then:

Change the line 183 from npref=3 to npref=4  
```

Then not sure if this order is needed, but restarted net.lo, started syslog-ng, which started net.eth0.

Typing this in Gentoo online right now.

Title should be changed to: Don't use baselayout-1.12.0_pre9

UberLord : Glad you got it fixed fast. Thanks!! But that did suck when I rebooted and what the heck is going on???   :Shocked: 

Are we going through another Major change in how to set something up. Maybe it did this before, but don't recall it. 

```
decibels david # /etc/init.d/net.eth0 restart

 * Stopping syslog-ng ...                                                                                         [ ok ]

 * Stopping eth0

 *   Bringing down eth0

 *     Shutting down eth0 ...                                                                                     [ ok ]

 * Starting eth0

 *   You are using a depreciated configuration syntax for eth0

 *   You are advised to read /etc/conf.d/net.example and upgrade it accordingly

 *   Bringing up eth0

 *     192.168.1.100                                                                                              [ ok ]

 *   Adding routes

 *     default gw 192.168.1.1 ...                                                                                 [ ok ]

 * Starting syslog-ng ...
```

It is stopping syslog-ng just because the interface is restarting???? That just seems stupid. Don't see the reason!

Depreciated configuration syntax for eth0???? Why oh why?

----------

## barum87

thanks Decibels

I modified net.lo and simply ran "/etc/init.d/netmount start" and it worked : )

----------

## UberLord

 *barum87 wrote:*   

> hmmm now my gentoo is totally offline. (Posting this on Windows)
> 
> Do I need to boot with my liveCD to get my internet connection back or is there a simpler solution?

 

You can always apply the past attached to the bug linked above

----------

## UberLord

 *Decibels wrote:*   

> 
> 
> Title should be changed to: Don't use baselayout-1.12.0_pre9
> 
> 

 

Or if you do, ensure that you have iproute2, dhcpcd, wireless-tools and netplug installed - then it works

 *Quote:*   

> UberLord : Glad you got it fixed fast. Thanks!! But that did suck when I rebooted and what the heck is going on???  
> 
> Are we going through another Major change in how to set something up.

 

No major changes since bselayout-1.12.0_pre2 really - just new modules in the form of ifplugd, netplugd and pppd. Adding a new system preferred module to the list in net.lo caused the error - stupid really.

 *Quote:*   

> It is stopping syslog-ng just because the interface is restarting????  That just seems stupid. Don't see the reason!

 

Yes, it's because the interface is restarting. The reason is because syslog-ng has a "need" dependany on "net". net.eth0 supplies your "net". You can change this in /etc/conf.d/rc - RC_STRICT_NET_CHECKING

 *Quote:*   

> Depreciated configuration syntax for eth0???? Why oh why?

 

It still works, there's just no guarantee it will work in versions in the future.

Why? Well, let's just say that there's around 70 lines of code just dealing with the old syntax as opposed to erm - around 10 lines with the new syntax.

I'd like to think that we can cut those 70 lines someday to make us leaner and meaner!

----------

## Karl-Franz

You could also start dhcpcd manually to get netaccess even though the scripts fail. That way you won't need to use Windows or liveCD:s.

----------

## UberLord

Good idea, but not everyone has a dhcp server handy

----------

## Autie

ok, i retried it, new baselayout. Used now parallel startup, installed netplug (didn't had it before), and added ifplugd to default runlevel.

Now latest baselayout works great, without any problem

----------

## UberLord

netplug and ifplug do the same job, and both are now controlled by baselayout-1.12 so you no longer need the ifplug init script at all  :Smile: 

----------

## Autie

oh, didn't notice that.

so, its safe to unmerge ifplugd, or only to remove it from runlevels?

----------

## UberLord

yes to both

----------

## Autie

ok, great

thanks for the help

----------

## Decibels

 *UberLord wrote:*   

>  *Decibels wrote:*   
> 
> Title should be changed to: Don't use baselayout-1.12.0_pre9
> 
>  
> ...

 

Yes, your right. I knew I wasn't using dhcpcd or wireless-tools, but the others wasn't sure. Had the system up for a long time.

 *UberLord wrote:*   

>  *Decibels wrote:*   It is stopping syslog-ng just because the interface is restarting????  That just seems stupid. Don't see the reason! 
> 
> Yes, it's because the interface is restarting. The reason is because syslog-ng has a "need" dependany on "net". net.eth0 supplies your "net". You can change this in /etc/conf.d/rc - RC_STRICT_NET_CHECKING

 

Okay, changed it to "none"

 *UberLord wrote:*   

>  *Decibels wrote:*   Depreciated configuration syntax for eth0???? Why oh why? 
> 
> It still works, there's just no guarantee it will work in versions in the future.
> 
> Why? Well, let's just say that there's around 70 lines of code just dealing with the old syntax as opposed to erm - around 10 lines with the new syntax.
> ...

 

I was still using an old setup config of net cause it was still working. After they changed that setup had trouble getting it working so stuck with the old one.

Just changed to the newer net.example for Static IP. There is one thing that is confusing though. On the 'gateway', not using IPV6. But it seems to indicate that this is only for setting up route using IPv6.

In INTERFACE HANDLERS:

```
# Here's how todo routing if you need it - the below sets the default gateway

# and eth0 to be the default route for IPv6 unicast addresses

#routes_eth0=(

#   "default via 192.168.0.1"

#   "::/0"

#)
```

I just changed it to: 

```
routes_eth0=("default via 192.168.1.1")
```

and it worked, without giving the warning. Can't find good documentation on this though.

Started checking Gentoo Docs to see if explained. Checked Install Guide for x86 & amd64, but neither talk about /etc/init.d/net, Quick x86 Install Guide does mention editing it.

Okay, this does show a little setup: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=8

But, they use gw instead of via for the gateway route, BOTH works it seems. Not sure which is 'depreciated' cause didn't see any warning with either.

Guess getting off topic though.

----------

## UberLord

 *Decibels wrote:*   

> 
> 
> Just changed to the newer net.example for Static IP. There is one thing that is confusing though. On the 'gateway', not using IPV6. But it seems to indicate that this is only for setting up route using IPv6.

 

That's just an example to show setting IPv4 and IPv6 routes - how would you make it more clear?

 *Quote:*   

> 
> 
> But, they use gw instead of via for the gateway route, BOTH works it seems. Not sure which is 'depreciated' cause didn't see any warning with either.

 

Both work and neither are depreciated.

----------

## Decibels

 *UberLord wrote:*   

>  *Decibels wrote:*   
> 
> Just changed to the newer net.example for Static IP. There is one thing that is confusing though. On the 'gateway', not using IPV6. But it seems to indicate that this is only for setting up route using IPv6. 
> 
> That's just an example to show setting IPv4 and IPv6 routes - how would you make it more clear?

 

Guess I thought there was a big diff in IPv4 vs Ipv6 so when I see below says only for IPv6, thought IPv4 wasn't included. So I guess for clueless people like me, maybe it could be more clear if read:

```
# Here's how todo routing if you need it - the below sets the default gateway 

# and eth0 to be the default route for Ipv4 or IPv6 unicast addresses
```

or

```
# Here's how todo routing if you need it - the below sets the default gateway 

# and eth0 to be the default route.
```

instead of:

```
# Here's how todo routing if you need it - the below sets the default gateway 

# and eth0 to be the default route for IPv6 unicast addresses
```

----------

## grimlog

 *UberLord wrote:*   

> 
> 
> OK - here's my defence. I added a new preferred module (netplugd) to the preferred module list. As I had all the modules emerged, I didn't see the error as the error was caused by me not updateing a variable specifying the number of perferred modules.
> 
> The current svn version has an improved fix where we calculate that number from a list instead of specifying it.
> ...

 

Thanks for the explanation. I really wondered, how it could happen, that really simple setups fail. I know, you cannot test all possible configurations, but the basic ones should be in your "must-test-before-commiting"-list. Oh, and I was happy, that the fix was already there, when I searched for a solution.  :Smile: 

Regards, Michael

----------

