Subject: ipv6, route6d, zebra: horrible problem
To: None <netbsd-users@netbsd.org>
From: Lista de NetBSD Users <list10@sepc.edu.mx>
List: netbsd-users
Date: 07/01/2002 13:39:09
Hello

My IPv6 network works *very very very FINE*
except in the routers ;)
All are NetBSD-1.5.2/i386, zebra 0.92a

Yes, specially host2. I would like to receive
mail with ipv6 in host2 but nobody in the world
can see the global address of interfase host2-gif0.
A traceroute6 from any site to host2-gif0 loops
between cisco-tunX and host3-gif2.

If I wish to receive ipv6-mail in host[134] instead
host2, I never had discovered this problem.

                                      | tunX
                               ---------------
                               | cisco at    |
                               | ISP office  |
                               ---------------
                                tunnel | to 6bone
                                  gif2 |
--------------                 ---------------
| host2      | gif0       gif1 | host3 zebra |
| route6d    |-----------------| ripngd bgp4+|
| rtadvd ex1 |                 | rtadvd ex1  |
--------------                 ---------------
      | ex1                          | ex1
LAN1  |                        LAN2  |
==============                 ==============
      |                              |
------------                     ------------
| host1    |                     | host4    |
| autohost |                     | autohost |
------------                     ------------

Question:
For routers using route6d
Is this the *natural* way of work?
How can I fix it?

For the following traceroutes, all ipv6 address are global

traceroute6 from host1 to host2-ex1  OK
traceroute6 from host1 to host2-gif0 OK
traceroute6 from host1 to host3-gif1 OK
traceroute6 from host1 to host3-ex1  OK
traceroute6 from host1 to host4      OK
traceroute6 from host1 to cisco      OK
traceroute6 from host1 to ftp.netbsd.org OK

traceroute6 from host4 to any point  OK

traceroute6 from host2 to host1       OK
traceroute6 from host2 to host3-gif1     NO note1
traceroute6 from host2 to host3-ex1      NO note1
traceroute6 from host2 to host4          NO note1
traceroute6 from host2 to cisco          NO note1
traceroute6 from host2 to ftp.netbsd.org NO note1

traceroute6 from host3 to host1      OK
traceroute6 from host3 to host2-ex1  OK
traceroute6 from host3 to host2-gif0 LOOP note2
traceroute6 from host3 to host4      OK
traceroute6 from host3 to cisco      OK
traceroute6 from host3 to ftp.netbsd.org      OK

traceroute6 from any external site to host2-gif0 NO note3

Note1:
 1  * * *
 2  * * *
 3  * *^C

Note2:
host3# traceroute6 -n 3ffe:aaaa:bbbb:2:250:daff:fe6b:7ae6
traceroute6 to 3ffe:aaaa:bbbb:2:250:daff:fe6b:7ae6 (3ffe:aaaa:bbbb:2:250:daff:fe6b:7ae6) from 3ffe:aaaa:bbbb:2:250:daff:fe69:47fd, 30 hops max, 12 byte packets
 1  3ffe:aaaa:bbbb:6::1  44.047 ms *  44.362 ms
 2  3ffe:aaaa:bbbb:2:250:daff:fe69:47fd  37.238 ms  36.55 ms  37.394 ms
 3  * 3ffe:aaaa:bbbb:6::1  80.622 ms *
 4  3ffe:aaaa:bbbb:2:250:daff:fe69:47fd  74.674 ms  73.238 ms  78.217 ms
 5  3ffe:aaaa:bbbb:6::1  117.297 ms *  121.782 ms
 6  3ffe:aaaa:bbbb:2:250:daff:fe69:47fd  110.354 ms  110.223 ms  110.321 ms
 7  * 3ffe:aaaa:bbbb:6::1  153.794 ms^C
and it means a loop between host2-gif0 and cisco

Note3:
Is a infinite loop between host3-gif2 and cisco-tunX

The following are my config files:
----------------------- host1 and host4 -------------
ifconfig.nic: inet w.x.y.z/24 media autoselect
/etc/rc.conf:
    ip6mode=autohost                   # host, autohost or router
    rtsol=YES        rtsol_flags="ex0" # for ip6mode=autohost only
----------------------- host2 ------------------
ifconfig.ex1:
    inet  w.x.y.z netmask 0xffffff00 media autoselect
    inet6 3ffe:aaaa:bbbb:10:250:daff:fe6b:7ae6 prefixlen 64 alias
ifconfig.gif0
    inet  tunnel w.x.y.1 w.x.y.2
    inet6 3ffe:aaaa:bbbb:2:250:daff:fe6b:7ae6 prefixlen 64
/etc/rc.conf:
    route6d=YES    route6d_flags="-N ex0"  # NO IPv6 in this LAN
    rtsold=NO      rtsold_flags=""         # for ip6mode=autohost only
    ip6mode=router                         # host, autohost or router
    rtsol=NO       rtsol_flags=""          # for ip6mode=autohost only
    rtadvd=YES     rtadvd_flags="ex1"
    zebra=NO       zebra_flags="-d"
    bgpd=NO        bgpd_flags="-d"

host2# netstat -rn
[...]
Internet6:
Destination                   Gateway                   Flags     Refs     Use    Mtu  Interface
::/104                        ::1                       UGRS        0        0  33228  lo0 =>
::/96                         ::1                       UGRS        0        0  33228  lo0 =>
default                       fe80::250:daff:fe69:47fd%gif0 UG          0       42   1280  gif0
::1                           ::1                       UH         12        0  33228  lo0
[... the *default* route was received from host3/zebra/ripngd]
3ffe:aaaa:bbbb::/48           fe80::250:daff:fe69:47fd%gif0 UG          0      225   1280  gif0
3ffe:aaaa:bbbb:2:250:daff:fe6b:7ae6 ::1                       UH          0        0  33228  lo0
3ffe:aaaa:bbbb:10::/64        link#2                    UC          3        0   1500  ex1
3ffe:aaaa:bbbb:10:250:daff:fe69:461c 00:50:da:69:46:1c         UHLc        0      203   1500  ex1
3ffe:aaaa:bbbb:10:250:daff:fe69:4687 00:50:da:69:46:87         UHLc        0       11   1500  ex1
3ffe:aaaa:bbbb:10:250:daff:fe6b:7ae6 00:50:da:69:47:b9         UHLc        0        0   1500  lo0
[...]
-------------------- host3 -----------------------
ifconfig.ex1
    inet  a.b.c.d/24 media autoselect
    inet6 3ffe:aaaa:bbbb:4:250:daff:fe69:48d6 prefixlen 64 alias
ifconfig.gif1
    tunnel w.x.y.2 w.y.y.1
    inet6 3ffe:aaaa:bbbb:2:250:daff:fe69:47fd prefixlen 64
ifconfig.gif2
    tunnel aa.ab.ac.ad ba.bb.bc.bd
    inet6  3ffe:aaaa:bbbb:6:250:daff:fe69:47fd prefixlen 64
    inet6  3ffe:aaaa:bbbb:6::2                 prefixlen 64 alias

NOTE:
    host3 needs a push in order to work with the cisco
    of my ISP (ipv6) and the push is the following:

    host3# route add    -inet6 default ::1
    host3# route change -inet6 default ::1 -ifp gif2

    (Does host2 needs a push like this?)
    (what about I run zebra/ripng instead route6d in host2?)

zebra.conf
    interface ex0
     ipv6 nd suppress-ra
    !
    ! interfaces ex1 gif0 gif1 etc are exactly as ex0
    !
ripngd.conf
    interface ex0
    !
    interface ex1
    !
    interface lo0
    !
    interface gif0
    !
    interface gif1
    !
    interface gif2
    !
    interface gif3
    !
    router ripng
     default-information originate
     network gif1
     route 3ffe:aaaa:bbbb::/48
    !
bgpd.conf
    router bgp 65000
     no bgp default ipv4-unicast
     neighbor 3ffe:aaaa:bbbb:6::1 remote-as 1111
     neighbor 3ffe:aaaa:bbbb:6::1 description Cisco to 6bone
     neighbor 3ffe:aaaa:bbbb:6::1 interface gif2
    !
     address-family ipv6
     network 3ffe:aaaa:bbbb::/48
      redistribute connected
     neighbor 3ffe:aaaa:bbbb:6::1 activate
     neighbor 3ffe:aaaa:bbbb:6::1 prefix-list mynet6 out
     exit-address-family
    !
    ipv6 prefix-list mynet6 seq 10 permit 3ffe:aaaa:bbbb::/48
    ipv6 prefix-list mynet6 seq 90 deny any
    !

/etc/rc.conf
    ip6mode=router                    # host, autohost or router
    rtsol=NO       rtsol_flags=""     # for ip6mode=autohost only
    rtadvd=YES     rtadvd_flags="ex1"
    zebra=YES      zebra_flags="-d"
    bgpd=YES       bgpd_flags="-d"
    ripngd=YES     ripngd_flags="-d"

host3# netstat -rn
Internet6:
Destination                   Gateway                   Flags     Refs     Use    Mtu  Interface
::/104                        ::1                       UGRS        0        0  33228  lo0 =>
::/96                         ::1                       UGRS        0        0  33228  lo0 =>
default                       ::1                       UGS         0     8901   1280  gif2
::1                           ::1                       UH         13     5908  33228  lo0
::127.0.0.0/104               ::1                       UGRS        0        0  33228  lo0
::224.0.0.0/100               ::1                       UGRS        0        0  33228  lo0
::255.0.0.0/104               ::1                       UGRS        0        0  33228  lo0
::ffff:0.0.0.0/96             ::1                       UGRS        0        0  33228  lo0
2001:ff::/35                  fe80::83b2:6408%gif2      UG1         0        0   1280  gif2
2001:200::/35                 fe80::83b2:6408%gif2      UG1         0        0   1280  gif2
2001:208::/35                 fe80::83b2:6408%gif2      UG1         0        0   1280  gif2
2001:210::/35                 fe80::83b2:6408%gif2      UG1         0        0   1280  gif2
[...]
2001:7e8::/35                 fe80::83b2:6408%gif2      UG1         0        0   1280  gif2
2001:7f8::/35                 fe80::83b2:6408%gif2      UG1         0        0   1280  gif2
2002::/24                     ::1                       UGRS        0        0  33228  lo0
2002:7f00::/24                ::1                       UGRS        0        0  33228  lo0
2002:e000::/20                ::1                       UGRS        0        0  33228  lo0
2002:ff00::/24                ::1                       UGRS        0        0  33228  lo0
3ffe::/24                     fe80::83b2:6408%gif2      UG1         0        0   1280  gif2
3ffe:100::/24                 fe80::83b2:6408%gif2      UG1         0        0   1280  gif2
3ffe:200::/24                 fe80::83b2:6408%gif2      UG1         0        0   1280  gif2
[...]
3ffe:aaaa::/28                fe80::83b2:6408%gif2      UG1         1    14081   1280  gif2
3ffe:aaaa:bbbb:2:250:daff:fe69:47fd ::1                       UH          0       27  33228  lo0
3ffe:aaaa:bbbb:4::/64         link#2                    UC          2        0   1500  ex1
3ffe:aaaa:bbbb:4:250:daff:fe69:4749 00:50:da:69:47:49         UHLc        0        9   1500  ex1
3ffe:aaaa:bbbb:4:250:daff:fe69:48d6 00:50:da:69:48:d6         UHLc        0      987   1500  lo0
3ffe:aaaa:bbbb:6::2           ::1                       UH          0       95  33228  lo0
3ffe:aaaa:bbbb:6:250:daff:fe69:47fd ::1                       UH          0        0  33228  lo0
3ffe:aaaa:bbbb:10::/64        fe80::250:daff:fe6b:7ae6%gif1 UG1         0      199   1280  gif1
3ffe:next::/28                fe80::83b2:6408%gif2      UG1         0        0   1280  gif2
[...]
-----------------------------------------------------
This table looks nice... I like it

If you are reading yet, thanks for your time

Heron Gallegos