Modify

Opened 7 years ago

Closed 7 years ago

Last modified 4 years ago

#8337 closed enhancement (fixed)

6to4 should support multiple internal networks.

Reported by: slusarz@… Owned by: jow
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc:

Description

Maybe I missed something perusing both the source code and documentation, but it does not seem to be able to use 6to4 to serve multiple internal interfaces.

e.g. (/etc/config/network)

config interface ipv6
        option proto            6to4
        option adv_interface    'wlan wifi'

Not sure if each internal interface needs a different IPv6 subnet ID, as this would make configuration more difficult given the current options.

Attachments (0)

Change History (10)

comment:1 Changed 7 years ago by jow

  • Owner changed from developers to jow
  • Status changed from new to accepted

comment:2 Changed 7 years ago by jow

Yes, each needs its own ID, however I propose the following:

  • ability to specify multiple adv_interface values
  • the adv_prefix is taken as start value and incremented by 1 for each interface

This should solve it cleanly

comment:3 Changed 7 years ago by jow

  • Resolution set to fixed
  • Status changed from accepted to closed

Proposal implemented in r24219 and merged to backfire in r24220.

comment:4 Changed 7 years ago by slusarz@…

Unfortunately, this only activates the last interface for purposes of radvd. The generated radvd.conf looks like this:

interface foo
{
   prefix XYZ
   {
   };
   ...
};

interface foo2
{
    prefix XYZ2
    {
    };
    ...
};

interface foo3
{
    MaxRtrAdvInterval 30;
    IgnoreIfMissing on;
    AdvSendAdvert On;

    prefix XYZ3
    {
    };
    ...
};

Not following the logic in /lib/network/6to4.sh well enough to develop a patch. But it has something to do with the fact that uci is treating all the networks as a single interface (using the network 6to4 interface name), rather than treating the interfaces separately for purposes of radvd.conf generation.

comment:5 Changed 7 years ago by jow

I cannot reproduce it. Please send some actual examples of /etc/config/network, /etc/config/radvd and /var/etc/radvd.conf that show this behaviour.

comment:6 Changed 7 years ago by slusarz@…

/etc/config/network:

config interface ipv6
        option proto    6to4
        option adv_interface    'wired wifi servers'

/etc/config/radvd:

config interface
        option interface        'wired wifi servers'

config prefix
        option interface        'wired wifi servers'

config rdnss
        option interface        'wired wifi servers'

Generated /var/etc/radvd.conf:

interface eth0.0
{
        prefix [...]:1::1/64
        {
        };

        prefix 0:0:0:1::/64
        {
                AdvValidLifetime 300;
                AdvPreferredLifetime 120;
                AdvOnLink on;
                AdvAutonomous on;
                Base6to4Interface eth1;
        };

        RDNSS [...]:e5b8
        {
        };
};

interface wlan0
{
        prefix [...]:2::1/64
        {
        };

        prefix 0:0:0:2::/64
        {
                AdvValidLifetime 300;
                AdvPreferredLifetime 120;
                AdvOnLink on;
                AdvAutonomous on;
                Base6to4Interface eth1;
        };

        RDNSS [...]:e5b8
        {
        };
};

interface eth0.1
{
        MaxRtrAdvInterval 30;
        IgnoreIfMissing on;
        AdvSendAdvert on;

        prefix [...]:3::1/64
        {
        };

        prefix 0:0:0:3::/64
        {
                AdvValidLifetime 300;
                AdvPreferredLifetime 120;
                AdvOnLink on;
                AdvAutonomous on;
                Base6to4Interface eth1;
        };

        RDNSS [...]:e5b8
        {
        };
};

Looking at /etc/init.d/radvd a bit more, in radvd_write_interface() this call:
config_get value "$cfg" "$name"
only returns a value for the last interface - the first two interfaces have blank values.

comment:7 Changed 7 years ago by jow

Ah. Afaik multiple interfaces for "interface" and "prefix" sections in radvd are not even defined.

I think you should change it like that:

config interface
        option interface        'wired'

config interface
        option interface        'wifi'

config interface
        option interface        'servers'


config prefix
        option interface        'wired'

config prefix
        option interface        'wifi'

config prefix
        option interface        'servers'


config rdnss
        option interface        'wired'

config rdnss
        option interface        'wifi'

config rdnss
        option interface        'servers'

comment:8 Changed 7 years ago by slusarz@…

Yeah, that does it. I've updated radvd wiki documentation to reflect this (also updated 6to4 wiki documentation to reflect new adv_interface and adv_prefix behavior).

comment:9 Changed 7 years ago by jow

Thank you.

comment:10 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.