Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Cannot set IPv6 default route when setup
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
OstCollector
n00b
n00b


Joined: 02 Jan 2013
Posts: 13

PostPosted: Wed Jan 02, 2013 2:44 pm    Post subject: [SOLVED] Cannot set IPv6 default route when setup Reply with quote

After re-install the system, I met the problem the same as https://forums.gentoo.org/viewtopic-p-6532843.html

here is my configuration and tracepath6 result

Code:

# /etc/conf.d/net
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d.  To create a more complete configuration,
# please review /usr/share/doc/openrc/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).

dns_domain_lo="********.name"


config_eth0="206.***.***.141/24
        2607:****:****:c21::****:c410/64"

routes_eth0="default via 206.***.***.1
        default via 2607:****:****:c21::1"

dns_servers="8.8.8.8
        8.8.4.4"


Code:

# /var/log/rc.log
 * Bringing up interface eth0
 *   206.***.***.141/24 ...
 [ ok ]
 *   2607:****:****:c21::****:c410/64 ...
 [ ok ]
 *   Adding routes
 *     default via 206.****.****.1 ...
 [ ok ]
 *     default via 2607:****:****:c21::1 ...
2607:****:****:c21::1: Unknown host
 [ !! ]


Code:

tracepath6 -n 2607:****:****:c21::1
 1?: [LOCALHOST]                        0.000ms pmtu 1500
 1:  2607:****:****:c21::1                                  0.000ms reached
 1:  2607:****:****:c21::1                                  0.000ms reached
     Resume: pmtu 1500 hops 1 back 64



It seems I can set the default route manually:
Code:

# current ipv6 routing table
admin@www ~ $ route -6
Kernel IPv6 routing table
Destination                    Next Hop                   Flag Met Ref Use If
::1/128                        ::                         Un   0   1     8 lo
2607:****:****:c21::****:c410/128 ::                         Un   0   1     0 lo
2607:****:****:c21::/64         ::                         U    256 0     0 eth0
fe80::216:3cff:fe69:1eb/128    ::                         Un   0   1     0 lo
fe80::/64                      ::                         U    256 0     0 eth0
ff00::/8                       ::                         U    256 0     0 eth0
::/0                           ::                         !n   -1  1    13 lo

# manually set IPv6 route
admin@www ~ $ sudo route -A inet6 add ::/0 gw 2607:****:****:c21::1

# new IPv6 routing table
admin@www ~ $ route -6
Kernel IPv6 routing table
Destination                    Next Hop                   Flag Met Ref Use If
::1/128                        ::                         Un   0   1     8 lo
2607:****:****:c21::****:c410/128 ::                         Un   0   1     0 lo
2607:****:****:c21::/64         ::                         U    256 0     1 eth0
fe80::216:3cff:fe69:1eb/128    ::                         Un   0   1     0 lo
fe80::/64                      ::                         U    256 0     0 eth0
ff00::/8                       ::                         U    256 0     0 eth0
::/0                           2607:****:****:c21::1       UG   1   0     0 eth0
::/0                           ::                         !n   -1  1    13 lo

# test
admin@www ~ $ sudo tracepath6 -n he.net
 1?: [LOCALHOST]                        0.000ms pmtu 1500
 1:  2607:****:****:c21::1                                  2.999ms
 1:  2607:****:****:c21::1                                  0.000ms
 2:  2607:****:****:c20::1                                  1.999ms
 3:  2607:fcd0::1d                                         0.999ms
 4:  2001:504:13::1a                                       3.998ms
 5:  2001:470:0:72::1                                      0.999ms
 6:  2001:470:0:2f::1                                      8.995ms asymm  7
 7:  2001:470:0:76::2                                      9.994ms reached
     Resume: pmtu 1500 hops 7 back 57



Now I want to set the gateway when setup, rather than manually.

I will provide more information if you require.


Last edited by OstCollector on Thu Jan 03, 2013 3:14 am; edited 1 time in total
Back to top
View user's profile Send private message
floppymaster
Developer
Developer


Joined: 07 Jul 2010
Posts: 229
Location: Detroit, MI, USA

PostPosted: Wed Jan 02, 2013 4:57 pm    Post subject: Reply with quote

Firstly, I recommend installing sys-apps/iproute2 and using the "ip route" command. The old "route" command uses a deprecated interface.

You should be able to configure a default route for IPv6 by specifying ::/0 as the network. For example:
Code:
routes_eth0="default via 206.***.***.1
   ::/0 via 2607:****:****:c21::1"
Back to top
View user's profile Send private message
OstCollector
n00b
n00b


Joined: 02 Jan 2013
Posts: 13

PostPosted: Thu Jan 03, 2013 3:09 am    Post subject: Reply with quote

floppymaster wrote:
Firstly, I recommend installing sys-apps/iproute2 and using the "ip route" command. The old "route" command uses a deprecated interface.

You should be able to configure a default route for IPv6 by specifying ::/0 as the network. For example:
Code:
routes_eth0="default via 206.***.***.1
   ::/0 via 2607:****:****:c21::1"


Thank you very much for your reply. It works fine now after I installed iproute2, even without specifying ::/0.
:D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum