Documentation

tunnelindex

Name

net node tunnel add -  add a tunnel

Synopsis

add [--oif] [--src] <end-point> <addr> 

Arguments

--oif
optional outgoing interface
--src
optional source address
end-point
the remote tunnel endpoint (an IP address)
addr
the local tunnel identifier (an IP address)

Description

This command adds a tunnel from one node towards the specified tunnel end-point which is an IP address. The tunnel end-point should normally identify the address of an existing network interface (though C-BGP will not perform this verification). The local tunnel entry takes the form of a virtual network interface which has the IP address specified with argument addr.

To make use of the tunnel, you will need to setup routing accordingly. This is usually done with a static route with the tunnel interface as outgoing interface. Messages that will be routed through the tunnel will be encapsulated in a packet whose destination is the end-point address. Such packets will therefore be forwarded to the end-point and decapsulated there.

Important note: The tunnel end-point must also be a tunnel interface in order for decapsulation to work.

Here is a "simple" example. The topology is composed of 4 nodes in a line. Nodes 1.0.0.1, 1.0.0.2 and 1.0.0.3 belong to the same domain and can reach each other thanks to IGP routes. Node 1.0.0.4 is only reachable from 1.0.0.3 (through static routes). Node 1.0.0.1 has a tunnel to 1.0.0.3 and a static route towards 1.0.0.4/32 that goes into the tunnel. net add node 1.0.0.1
net add node 1.0.0.2
net add node 1.0.0.3
net add node 1.0.0.4
net add link 1.0.0.1 1.0.0.2
net add link 1.0.0.2 1.0.0.3
net add link 1.0.0.3 1.0.0.4
net node 1.0.0.3 route add --oif=1.0.0.4 1.0.0.4/32 1
net node 1.0.0.4 route add --oif=1.0.0.3 0/0 1

net node 1.0.0.1 tunnel add 255.0.0.2 255.0.0.1
net node 1.0.0.3 tunnel add 255.0.0.1 255.0.0.2
net node 1.0.0.1 route add --oif=255.0.0.1 1.0.0.4/32 1

net add domain 1 igp
net node 1.0.0.1 domain 1
net node 1.0.0.2 domain 1
net node 1.0.0.3 domain 1
net link 1.0.0.1 1.0.0.2 igp-weight --bidir 1
net link 1.0.0.2 1.0.0.3 igp-weight --bidir 1
net domain 1 compute
Now if we perform a record-route from 1.0.0.1 to 1.0.0.4, we obtain the following output: cbgp> net node 1.0.0.1 record-route 1.0.0.4
1.0.0.1 1.0.0.4 SUCCESS 3 1.0.0.1 1.0.0.3 1.0.0.4
cbgp>
There seem to be a link between 1.0.0.1 and 1.0.0.3. This link does not exist: it is the tunnel. It is possible to trace within the tunnel by using the --tunnel option of record-route: cbgp> net node 1.0.0.1 record-route 1.0.0.4 --tunnel
1.0.0.1 1.0.0.4 SUCCESS 4 1.0.0.1 [1.0.0.1 1.0.0.2 1.0.0.3] 1.0.0.3 1.0.0.4
cbgp>
The tunnel trace appears between brackets.

See also

To add a static route through that tunnel, you will need command net node X route add.