1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

native IPv6 and miredo coexisting problem

Discussion in 'Networking' started by haohaolee, Jun 27, 2011.

  1. haohaolee

    haohaolee New Member

    Messages:
    18
    Thanks Received:
    0
    I have a native IPv6 setting that worked well until I installed the miredo client. After starting the miredo daemon, it will create a new default route overriding the original one. My intention is to use miredo to connect to other teredo nodes, not for IPv6 surfing.

    And, according to the miredo.conf:

    Code:
     NOTE:  Use  of Miredo as a Teredo client is possible even if the
                  system  already  has  IPv6  connectivity  through  another   way
                  (native, 6to4, TSP, etc). In that case, Miredo will only be used
                  to reach other Teredo clients, as its tunneling interface has  a
                  default route with a higher metric (which is to say a lower pri-
                  ority) than the other network interfaces.
    
    


    So I'm sure it can work that way, and it did work on my other (Linux) box. Any suggestion is appreciated.
     
  2. tingo

    tingo Member

    Messages:
    988
    Thanks Received:
    97
    So, what are the metrics for the routes involved?
     
  3. haohaolee

    haohaolee New Member

    Messages:
    18
    Thanks Received:
    0
    It seems there is no routing metric concept in FreeBSD, so I cannot use different default routes with different metrics.
     
  4. tingo

    tingo Member

    Messages:
    988
    Thanks Received:
    97
    How about posting the output of # netstat -r?

    Why do you think that you can have more than one default route?
     
  5. haohaolee

    haohaolee New Member

    Messages:
    18
    Thanks Received:
    0
    Sorry, it's a concept on other platform. Maybe the correct question is how to make balance route when having multi-interface
     
  6. tingo

    tingo Member

    Messages:
    988
    Thanks Received:
    97
    Another platform than FreeBSD? If so, why are you asking this question in a FreeBSD forum?
     
    haohaolee thanks for this.
  7. DutchDaemon

    DutchDaemon Administrator Staff Member Administrator Moderator

    Messages:
    10,765
    Thanks Received:
    1,871
    haohaolee thanks for this.
  8. haohaolee

    haohaolee New Member

    Messages:
    18
    Thanks Received:
    0
    I'm new to FreeBSD, so I thought it would have the same concept. Never mind, I solved this specific problem myself.

    Miredo has a script called client-hook, which is called when teredo tunnel is established and is to set up routing:

    Code:
    ....
    case "$STATE" in
            up)
                    "$IFCONFIG" "$IFACE" up
                    "$IFCONFIG" "$IFACE" inet6 "${LLADDRESS}/64"
                    "$IFCONFIG" "$IFACE" inet6 "${ADDRESS}/32"
                    "$ROUTE" delete -inet6 default
                    "$ROUTE" add -inet6 default -iface "$IFACE"
                    ;;
    .....


    I just commented out two lines of the above to make mine work.

    BTW, this script on other platforms like Linux does not delete default route, but adds another default route with different metric. I think this is why the default install on Linux seems all right. :D
     
  9. ecazamir

    ecazamir New Member

    Messages:
    215
    Thanks Received:
    28
    FreeBSD does not allow at this time to have multiple routes to the same destination on a single FIB (Forward Information Base, routing table).
    If you need to reach some destination using multiple paths, one solution can be 'pf', which is able to override kernel's routing table on a single FIB and it allows use of multiple routes to the same destination network/mask.
    If you need to use 'metrics', /usr/ports/net/quagga's zebra routing daemon can be helpful.
     
    SreenathaSetty and haohaolee thanked for this.