[linux-sparc-users] multiple MAC addresses on sparc Linux LDOM?

Alexandre Chartre alexandre.chartre at oracle.com
Thu Sep 22 05:36:38 PDT 2016


On 09/22/2016 10:58 AM, Richard L. Hamilton wrote:
>
>> On Sep 21, 2016, at 08:58, Alexandre Chartre
>> <alexandre.chartre at oracle.com> wrote:
>>
>>
>> On 09/21/2016 01:44 PM, Richard L. Hamilton wrote:
>>> Since 3.something of LDOMs, one could assign multiple MAC
>>> addresses to an LDOM, although it was only said to be supported
>>> for Solaris 11 guests, not Solaris 10.
>>
>> Right, LDoms has support for alternate MAC addresses (ldm set-vnet
>> alt-mac-addrs=...), to have multiple MAC addresses on the same
>> vnet.
>>
>>> Can SPARC Linux make use of them?  I'd like to run an emulator
>>> using tun/tap for bridged networking within a Linux LDOM (because
>>> it will probably be less of a pain to compile for that than for
>>> Solaris), and that's the only Linux I've got that's running 24/7
>>> anyway, so if I want to leave the emulator running, that would be
>>> the best place...but it would need an extra MAC address for
>>> that.
>>
>> No, alternate MAC addresses is not supported by the current Linux
>> sunvnet driver.
>
>> Maybe you can use a second vnet connected to the same vswitch. That
>> way your domain will have two MAC addresses on the same network
>> (same vswitch) but on two different vnet interface.
>>
>> alex.
>>
>
>
> Thanks! - a practical suggestion, probably doable once I figure out
> the necessary ldm commands, subject to one possible complication: is
> there some state (e.g. visible but marked down) in which I can send
> raw Ethernet packets out such an additional interface while having
> the domain's Linux OS otherwise ignore the interface?  Typical
> emulators use TUN/TAP, either with TUN (IP injection, which takes
> playing games with routes and proxy ARP, and may not play well with
> firewalls, routers, or NAT), or with TAP (raw Ethernet packets with
> an alternative MAC address, essentially bridging).  The latter if
> possible works far better. :-)

Use "ldm add-vnet" to add a new virtual network interface to your
domain. You can specify its MAC address with mac-addr=<mac-address>
otherwise one will be automatically assigned for you. So basically:

  # ldm add-vnet vnet1 primary-vsw0 domain1

This adds a new vnet1 to domain1, and the vnet is connected to the
primary-vsw0 vswitch.

Each vnet you add to your domain will appear with Linux as a regular
network interface (eth0, eth1...).

> Also - if it would not be too difficult, I'd sure like to see
> multiple MAC address support added to Linux sunvnet driver one day.
> :-)   There are probably uses other than the specific one I have in
> mind, even if I'd be hard-pressed to think of them at the moment.

That's certainly a feature we expect to implement, but no idea when
for now.

alex.



More information about the linux-sparc-users mailing list