Git init
[external/ifupdown.git] / inet6.defn
1 address_family inet6
2 architecture linux
3
4 method loopback
5   description
6     This method may be used to define the IPv6 loopback interface.
7   up
8     ifconfig %iface% add ::1
9   down
10     ifconfig %iface% del ::1
11
12 method static
13   description
14     This method may be used to define interfaces with statically assigned
15     IPv6 addresses.
16
17   options
18     address address        -- Address (colon delimited) *required*
19     netmask mask           -- Netmask (number of bits, eg 64) *required*
20     gateway address        -- Default gateway (colon delimited)
21     media type             -- Medium type, driver dependent
22     hwaddress class address -- Hardware Address. /class/ is one of \
23                                  *ether*, *ax25*, *ARCnet* or *netrom*. \
24                                  /address/ is dependent on this choice.
25     mtu size               -- MTU size
26   up
27     ifconfig %iface% [[media %media%]] [[hw %hwaddress%]] [[mtu %mtu%]] up
28     ifconfig %iface% add %address%/%netmask%
29     [[ route -A inet6 add ::/0 gw %gateway% ]] 
30
31   down
32     ifconfig %iface% down
33
34 method v4tunnel
35   description
36     This method may be used to setup an IPv6-over-IPv4 tunnel. It requires
37     the *ip* command from the *iproute* package.
38
39   options
40     address address       -- Address (colon delimited)
41     netmask mask          -- Netmask (number of bits, eg 64) 
42     endpoint address      -- Address of other tunnel endpoint (IPv4 \
43                              dotted quad) *required*
44     local address         -- Address of the local endpoint (IPv4 \
45                              dotted quad)
46     gateway address       -- Default gateway (colon delimited)
47     ttl time              -- TTL setting
48
49   up
50     ip tunnel add %iface% mode sit remote %endpoint% [[local %local%]] \
51        [[ttl %ttl%]]
52     ip link set %iface% up
53     [[ ip addr add %address%/%netmask% dev %iface% ]]
54     [[ ip route add %gateway% dev %iface% ]]
55     [[ ip route add ::/0 via %gateway% dev %iface% ]]
56
57   down
58     ip tunnel del %iface%