Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 115396 - Add an example for IPv4 route to baselayout-1.12.0_pre11-r3
Summary: Add an example for IPv4 route to baselayout-1.12.0_pre11-r3
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-13 02:41 UTC by Martin Mokrejš
Modified: 2005-12-20 10:12 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Mokrejš 2005-12-13 02:41:13 UTC
Hi,
  I ocassionally face the problem that the net.eth0 does not get IP address
assigned. I know you move to new file format with iproute2. I don't use anything
fancy, so I thought let's make the warnings quiet and use the new net.example as
the template. However, I made something wrong (I don't use IPv6).

vrapenec ~ # cp /etc/conf.d/net /etc/conf.d/net-ok
vrapenec ~ # cp /etc/conf.d/net.example /etc/conf.d/net
vrapenec ~ # vim /etc/conf.d/net
vrapenec ~ # /etc/init.d/net.eth0 pause
 * Caching service dependencies ...                                            
                                                    [ ok ]
 * Stopping eth0
 *   Bringing down eth0
 *     Shutting down eth0 ...                                                  
                                                    [ ok ]
vrapenec ~ # rc
 * Starting eth0
 *   Bringing up eth0
 *     192.168.0.2                                                             
                                                    [ ok ]
 *   Adding routes
 *     default via 192.168.0.1 ...                                             
                                                    [ ok ]
 *     ::/0 ...
RTNETLINK answers: Invalid argument                                            
                                                    [ !! ]
vrapenec ~ #
vrapenec ~ # grep -v "^#" /etc/conf.d/net
config_eth0=( "192.168.0.2 netmask 255.255.255.0" )
routes_eth0=(
        "default via 192.168.0.1"
        "::/0"
)
vrapenec ~ #
Comment 1 Martin Mokrejš 2005-12-13 02:44:37 UTC
Commenting out the line with
`        "::/0"'
did indeed help for my IPv4 setup. Probably you want to add IPv4 prepared
routing example as well and improve the error handling.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2005-12-13 02:50:46 UTC
Well, baselayout version missing and I don't see why are you setting up IPv6
route if you are not using IPv6 at all...
Comment 3 Martin Mokrejš 2005-12-13 03:20:05 UTC
There is only IPv6 example how to setup the route. I propose someone adds also
the IPv4 example. I use sys-apps/baselayout-1.12.0_pre11-r3.
Comment 4 Roy Marples (RETIRED) gentoo-dev 2005-12-13 03:57:58 UTC
The example has two default routes - one for IPv4 and one for IPv6. 
Are you actually suggesting that we split this example into two examples and 
clearly label each? 
 
# 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" 
#) 
 
 
maybe if we changed it to 
 
# Here's how todo routing if you need it - the below sets the default IPv4 
# gateway on eth0 and sets eth0 to be the default route for IPv6 unicast 
# addresses. 
#routes_eth0=( 
#       "default via 192.168.0.1" 
#       "::/0" 
#) 
 
Comment 5 Martin Mokrejš 2005-12-13 04:41:59 UTC
Hi Roy,
  just add another section and label it as being for IPv4. Or advise people to
comment out the "::/0" if they use only IPv4 networks.
Comment 6 Clint Silvester 2005-12-15 15:23:22 UTC
shouldn't there be an example of how to add extra, non-default routes?
Comment 7 Roy Marples (RETIRED) gentoo-dev 2005-12-16 07:51:51 UTC
# 
# WARNING :- some examples have a mixture of IPv4 (ie 192.168.0.1) and IPv6 
# (ie 4321:0:1:2:3:4:567:89ab) internet addresses. They only work if you have 
# the relevant kernel option enabled. So if you don't have an IPv6 enabled 
# kernel then remove the IPv6 address from your config. 
# 
 
.... 
 
# Here's how todo routing if you need it  
#routes_eth0=(  
#       "default via 192.168.0.1"               # IPv4 default route  
#       "10.0.0.0/8 via 192.168.0.1"            # IPv4 subnet route  
#       "::/0"                                  # IPv6 unicast  
#)  
 
 
Happy with this? 
Comment 8 Martin Mokrejš 2005-12-16 13:39:24 UTC
I'd be happy with that if it states that I'm supposed to pickup only one of the three lines. Sorrry for my ignorance, but have never used IPv6.

For dummies I'd recommend to split it into 3 distinct examples. But in any case it's a step forward! Thanks!
Comment 9 Roy Marples (RETIRED) gentoo-dev 2005-12-20 10:12:43 UTC
Fixed in baselayout-1.12.0_pre12