Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Bridge or equivalent for LXD 2.1 where eth0 remains inactive
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jeffk
l33t
l33t


Joined: 13 Sep 2003
Posts: 671

PostPosted: Wed Sep 07, 2016 10:04 pm    Post subject: Bridge or equivalent for LXD 2.1 where eth0 remains inactive Reply with quote

Revising question, further research indicates that bridging wlan0 will not be the right thing.

I need a bridged interface for LXD 2.1, or virtual interface equivalent that supports LXD container networking. However, My eth0 is usually inactive (wlan0 is active), but I'd prefer to keep it ready for wired DHCP connection, all managed by connman.

Can bridge interfaces use localhost? What virtual interface type fits best here. I'm interested in using openvswitch if it provides a good solution as I use OVS elsewhere with OpenStack.

Thanks for any suggestions.


Original question follows, disregard

Edit title, was: Bridge lxcbr0 not working with connman managed wlan0, eth0

I need to set up bridged networking on my laptop for use with LXD. This is for local use, I don't need the LXD containers to be accessible from outside the laptop. I do need them to see each other via LXD internal networks.

I'm having trouble adding a bridge interface to wlan0 on my laptop, as I normally don't have eth0 connected. Is it possible to get wlan0 bridged?

Wireless NIC is: Centrino Wireless-N 1000, iwlwifi
Code:
cat /etc/conf.d/net
bridge_lxcbr0="wlan0"
config_lxcbr0="dhcp"

Code:
sudo /etc/init.d/net.lxcbr0 start
 * Caching service dependencies ...  [ ok ]
 * Bringing up interface lxcbr0
 *   Destroying bridge lxcbr0 ...   [ ok ]
 *   Creating bridge lxcbr0 ...
 *   Adding ports to lxcbr0
 *     wlan0 ...
RTNETLINK answers: Operation not supported   [ !! ]
 * ERROR: net.lxcbr0 failed to start

I use connman to manage the wlan0 and eth0 interfaces. With connman only one interface has an IP at a time.

I don't currently have a dhcp server running on the laptop.

Per information in this 2015 post, I have added recommended kernel config:

Code:
grep -e 'CONFIG_\(NETFILTER_NETLINK\)\|\(NETFILTER_NETLINK_QUEUE\)\|
\(NETFILTER_NETLINK_LOG\)\|\(NF_CT_NETLINK\)\|\(SCSI_NETLINK\)\|
\(IP_ADVANCED_ROUTER\)\|\(NET_SCH_INGRESS\)\|\(NET_SCHED\)\|\(IP_MULTIPLE_TABLES\)\|
\(NETFILTER_XT_TARGET_MARK\)' /etc/kernels/kernel-config-x86_64-4.7.2-gentoo

CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_NETFILTER_NETLINK=m
CONFIG_NETFILTER_NETLINK_ACCT=m
CONFIG_NETFILTER_NETLINK_QUEUE=m
CONFIG_NETFILTER_NETLINK_LOG=m
CONFIG_NF_CT_NETLINK=m
CONFIG_NF_CT_NETLINK_TIMEOUT=m
CONFIG_NF_CT_NETLINK_HELPER=m
CONFIG_NETFILTER_NETLINK_GLUE_CT=y
CONFIG_NETFILTER_XT_TARGET_MARK=m
CONFIG_NET_SCHED=y
CONFIG_NET_SCH_INGRESS=m
CONFIG_SCSI_NETLINK=y

No change to the above RNETLINK error.

I did try the iw method suggested at ServerFault: Bridging wlan0 to eth0, and promptly lost all networking function with wlan0.

My interface symlinks are defined as follows:
Code:
 ls -al /etc/init.d/net.*
lrwxrwxrwx 1 root root     6 Mar 25  2011 /etc/init.d/net.eth0 -> net.lo
-rwxr-xr-x 1 root root 17951 Jul 14 15:26 /etc/init.d/net.lo
lrwxrwxrwx 1 root root     6 Jul 14 10:46 /etc/init.d/net.lxcbr0 -> net.lo

With eth0 being a legacy artifact before I started using connman, service is not running. Having it around comes in handy for rare occasions when I need to run wired without connman. Only net.lo is defined in rc-update at boot runlevel.

The full iw list output seems to indicate AP mode is not supported. I'm not actually trying to run an AP, only to bridge for LXD as I would with eth0

Code:
sudo iw list
Wiphy phy0
        Supported commands:
                 * new_interface
                 * set_interface
                 * new_key
                 * start_ap
                 * new_station
                 * set_bss
                 * authenticate
                 * associate
                 * deauthenticate
                 * disassociate
                 * join_ibss
                 * set_tx_bitrate_mask
                 * frame
                 * frame_wait_cancel
                 * set_wiphy_netns
                 * set_channel
                 * set_wds_peer
                 * probe_client
                 * set_noack_map
                 * register_beacons
                 * start_p2p_device
                 * set_mcast_rate
                 * set_qos_map
                 * connect
                 * disconnect
        Supported TX frame types:
                 * IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
        Supported RX frame types:
                 * IBSS: 0x40 0xb0 0xc0 0xd0
                 * managed: 0x40 0xd0
                 * AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * mesh point: 0xb0 0xc0 0xd0
                 * P2P-client: 0x40 0xd0
                 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * P2P-device: 0x40 0xd0
        software interface modes (can always be added):
                 * monitor
        interface combinations are not supported
        HT Capability overrides:
                 * MCS: ff ff ff ff ff ff ff ff ff ff
                 * maximum A-MSDU length
                 * supported channel width
                 * short GI for 40 MHz
                 * max A-MPDU length exponent
                 * min MPDU start spacing
        Device supports TX status socket option.
        Device supports HT-IBSS.
        Device supports SAE with AUTHENTICATE command
        Device supports scan flush.
        Device supports per-vif TX power setting
        Driver supports full state transitions for AP/GO clients
        Driver supports a userspace MPM
        Device supports static SMPS
        Device supports dynamic SMPS
        Device supports configuring vdev MAC-addr on create.

What would be the recommended config here:

- Run a bridged eth0 even when I don't have a wired connection?
- Add routing to achieve the effect of bridging?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum