Recent releases of Raspbian have adopted the use of dhcpcd to manage both dynamic and static interface configuration. If you would prefer to use the traditional /etc/network/interfaces mechanism instead, follow these steps.

  1. First, disable dhcpcd and wpa_supplicant.

    systemctl disable --now dhdpcd wpa_supplicant
    
  2. You will need a wpa_supplicant configuration for wlan0 in /etc/wpa_supplicant/wpa_supplicant-wlan0.conf.

    If you already have an appropriate configuration in /etc/wpa_supplicant/wpa_supplicant.conf, you can just symlink the file:

     cd /etc/wpa_supplicant
     ln -s wpa_supplicant.conf wpa_supplicant-wlan0.conf
    
  3. Enable the wpa_supplicant service for wlan0:

    systemctl enable --now wpa_supplicant@wlan0
    
  4. Create an appropriate configuration in /etc/network/interfaces.d/wlan0. For example:

    allow-hotplug wlan0
    
    iface wlan0 inet static
    address 192.168.2.100
    netmask 255.255.255.0
    
    iface wlan0 inet6 static
    address 2607:f0d0:2001:000a:0000:0000:0000:0010
    netmask 64
    
  5. Reboot to make sure everything comes up as expected. With the above configuration, after rebooting you should see:

    root@raspberrypi:~# ip addr show wlan0
    3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
        link/ether 00:e1:b0:67:98:67 brd ff:ff:ff:ff:ff:ff
        inet 192.168.2.100/24 brd 192.168.2.255 scope global wlan0
           valid_lft forever preferred_lft forever
        inet6 2607:f0d0:2001:a::10/64 scope global
           valid_lft forever preferred_lft forever
        inet6 fe80::2e1:b0ff:fe67:9867/64 scope link
           valid_lft forever preferred_lft forever
    

Using Docker macvlan networks

Mon 12 March 2018 by Lars Kellogg-Stedman Tags networking docker

A question that crops up regularly on #docker is "How do I attach a container directly to my local network?" One possible answer to that question is the macvlan network type, which lets you create "clones" of a physical interface on your host and use that to attach containers directly …

read more

Listening for connections on all ports/any port

Tue 27 February 2018 by Lars Kellogg-Stedman Tags networking

On IRC -- and other online communities -- it is common to use a "pastebin" service to share snippets of code, logs, and other material, rather than pasting them directly into a conversation. These services will typically return a URL that you can share with others so that they can see the …

read more

Provider external networks (in an appropriate amount of detail)

In Quantum in Too Much Detail, I discussed the architecture of a Neutron deployment in detail. Since that article was published, Neutron gained the ability to handle multiple external networks with a single L3 agent. While I wrote about that back in 2014, I covered the configuration side of it …

read more

Docker networking with dedicated network containers

Mon 06 October 2014 by Lars Kellogg-Stedman Tags docker networking kubernetes

The current version of Docker has a very limited set of networking options:

  • bridge -- connect a container to the Docker bridge
  • host -- run the container in the global network namespace
  • container:xxx -- connect a container to the network namespace of another container
  • none -- do not configure any networking

If you …

read more