Difference between revisions of "IPv6 Route: Menambahkan IPv6 route melalui sebuah gateway"

From OnnoWiki
Jump to navigation Jump to search
(New page: 7.1. Displaying existing IPv6 routes First you should check, whether and which IPv6 addresses are already configured (perhaps auto-magically during auto-configuration). 7.1.1. Using "ip" ...)
 
Line 1: Line 1:
7.1. Displaying existing IPv6 routes
+
7.2. Add an IPv6 route through a gateway
  
First you should check, whether and which IPv6 addresses are already configured (perhaps auto-magically during auto-configuration).
+
Mostly needed to reach the outside with IPv6 using an IPv6-enabled router on your link.
7.1.1. Using "ip"
 
  
Usage:
+
==Menggunakan "ip"==
  
# /sbin/ip -6 route show [dev <device>]
+
Penggunaan
  
Example:
+
# /sbin/ip -6 route add <ipv6network>/<prefixlength> via <ipv6address> [dev <device>]
  
# /sbin/ip -6 route show dev eth0
+
Contoh
2001:0db8:0:f101::/64 proto kernel metric 256 mtu 1500 advmss 1440
 
fe80::/10            proto kernel metric 256 mtu 1500 advmss 1440
 
ff00::/8              proto kernel metric 256 mtu 1500 advmss 1440
 
default              proto kernel metric 256 mtu 1500 advmss 1440
 
  
7.1.2. Using "route"
+
# /sbin/ip -6 route add 2000::/3 via 2001:0db8:0:f101::1
  
Usage:
+
==Menggunakan "route"==
  
# /sbin/route -A inet6
+
Penggunaan
  
Example (output is filtered for interface eth0). Here you see different IPv6 routes for different addresses on a single interface.
+
# /sbin/route -A inet6 add <ipv6network>/<prefixlength> gw <ipv6address> [dev <device>]
  
# /sbin/route -A inet6 |grep -w "eth0"
+
A device can be needed, too, if the IPv6 address of the gateway is a link local one.
2001:0db8:0:f101 ::/64 :: UA  256 0 0 eth0 <- Interface route for global
+
 
¬ address
+
Following shown example adds a route for all currently global addresses (2000::/3) through gateway 2001:0db8:0:f101::1
fe80::/10        ::      UA  256 0 0 eth0 <- Interface route for link-local
+
 
¬ address
+
# /sbin/route -A inet6 add 2000::/3 gw 2001:0db8:0:f101::1
ff00::/8        ::       UA  256 0 0 eth0 <- Interface route for all multicast
 
¬ addresses
 
::/0            ::       UDA 256 0 0 eth0 <- Automatic default route
 

Revision as of 07:49, 23 May 2013

7.2. Add an IPv6 route through a gateway

Mostly needed to reach the outside with IPv6 using an IPv6-enabled router on your link.

Menggunakan "ip"

Penggunaan

# /sbin/ip -6 route add <ipv6network>/<prefixlength> via <ipv6address> [dev <device>]

Contoh

# /sbin/ip -6 route add 2000::/3 via 2001:0db8:0:f101::1

Menggunakan "route"

Penggunaan

# /sbin/route -A inet6 add <ipv6network>/<prefixlength> gw <ipv6address> [dev <device>] 

A device can be needed, too, if the IPv6 address of the gateway is a link local one.

Following shown example adds a route for all currently global addresses (2000::/3) through gateway 2001:0db8:0:f101::1

# /sbin/route -A inet6 add 2000::/3 gw 2001:0db8:0:f101::1