Md at debian.org

tales of a debian maintainer

Less widely known features of iproute

While iproute (AKA ip(8)) nowadays has become the ultimate Linux network configuration tool, it is also poorly documented: many features are not documented in the man page or even in the built-in help.

With this post I would like to raise the attention to some of its more recent features which are not getting the attention they deserve. And remember: every time you use ifconfig(8), Cthulhu eats a kitten. Please, think of the kittens.

VLANs management

ip link add link eth0 name eth0.2 type vlan id 2
ip link add link eth0 name myvlan type vlan id 2 loose_binding on
ip link delete myvlan type vlan
ip link add foo type vlan help

This replaces the obsolete vconfig(8) program and adds new features.

The loose_binding flag stops the VLAN interface from tracking the line protocol status of the underlying device.

Creation of TUN/TAP interfaces

ip tuntap add dev mytap mode tap user md

This replaces the obsolete tunctl(8) program.

Creation of dummy interfaces

ip link add mydummy type dummy

The only way to create more dummy interfaces after the dummy module has been loaded used to be loading it again with a different name, and they were all named dummyN. Since module-init-tools does not support anymore loading the same module multiple times, iproute fully replaced this method.

Ethernet in GRE tunnels

ip link add mygretun type gretap remote 192.0.2.1
ip link add foo type gretap help

A practical way to remotely bridge two Ethernet networks. The IP MTU is reduced of the expected 20 (IP) + 4 (GRE) + 14 (Ethernet II) bytes.

L2TPv3 static tunnels

See Documentation/networking/l2tp.txt for details, this requires kernels >= 2.6.34.

About

This is the blog of Marco d'Itri.

S M T W T F S
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        

See also:

My blogroll:


W3C HTML 4.01
W3C CSS 2.0     

Powered by Bryar.pm.