1

In my WSL instance, the ip addr output looks like this:

ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 62:7d:94:c7:52:0b brd ff:ff:ff:ff:ff:ff
3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether aa:20:18:64:a4:89 brd ff:ff:ff:ff:ff:ff
4: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/ipip 0.0.0.0 brd 0.0.0.0
5: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0
6: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:15:5d:f7:c6:4d brd ff:ff:ff:ff:ff:ff
    inet 172.25.42.162/20 brd 172.25.47.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::215:5dff:fef7:c64d/64 scope link
       valid_lft forever preferred_lft forever

What are all these. I know what lo and eth0 are. But what are others and what should I do about them?

1
  • Start here: "docs.microsoft.com/en-us/windows/wsl/enterprise". This is actually a Windows configuration question The interfaces to support are any enterprise linux distribution. Only 2 of the interfaces appear to be configured - the lo with is the localhost interace, and the eth0 which is the network interface. Aug 20, 2021 at 20:20

1 Answer 1

1

What should I do about them?

To borrow a line from Avengers: Endgame -- "We handle it by not handling it." In other words, don't worry about these interfaces. They are harmless, and you likely won't need them. More detail below.

What are all these?

I'm not a kernel expert by any means, but from what I can tell, most of these are pretty standard interfaces that are created by Linux kernel modules. I'm going to take a guess here that Microsoft chose to leave them compiled in rather than remove them from the config for two possible reasons:

  • Compatibility -- There may be apps out there that assume their presence, and having them at least be present makes for a smoother WSL experience.
  • Developer use -- Since WSL is designed for Linux developers, it may be useful to have those interfaces present for testing some applications.

The interfaces themselves:

  • bond0 is for bonding multiple interfaces together for increased link speed or failover, neither which is likely going to be applicable in WSL. That said, in theory it would be possible, using Hyper-V (if you have Windows Pro or higher), to create an additional virtual NIC which could then be bonded. While most of us are not likely to run into this use case, certain developers may need to test that functionality.

  • dummy0 is also typically used for testing purposes, according to this Redhat doc.

  • sit0 is used for forwarding IPv6 packets over IPv4 (see this answer for more detail). Again, something that most of us aren't going to run into.

You can see that all three of those modules are enabled in the Microsoft WSL kernel config (sit, bond, and dummy).

  • tunl: I don't have a tunl interface on my systems, so I believe that is being created during the WSL init process. init is responsible for (along with many other tasks) bringing up the WSL network interfaces, and unfortunately it is a black box (Microsoft hasn't yet released the source, to my knowledge). Perhaps you have a VPN on your system that is causing that interface to get mapped by init.

So could you get rid of them if you really wanted? Most likely, but it would require building your own Linux kernel using the source linked above. Personally, I'm going with the "not handling it" approach. Still, the fact that we can customize and compile our own WSL kernel if we want to is, IMHO, pretty amazing.

2
  • 1
    Thank you for the amazing explanation (and the Okoye quote)!. I have tried using hyper-v to edit my wsl network adapters (to convert the NAT to a Bridged) but it gives a no permission error. Idk. I do have openvpn client on wsl but thats the only vpn. It usually uses tun0 but whatever. If they won't interfere I guess I will not bother with them
    – VidathD
    Aug 21, 2021 at 12:37
  • tunl0: Linux' kernel module ipip
    – A.B
    Aug 30, 2021 at 0:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .