Policy Routing Using Linux

   

ip tunnel ” IP Tunnelling Configuration

Abbreviations: tunnel, tunl

The tunnel objects encapsulate packets within IPv4 packets and sends them over the IP infrastructure.

As with the other sections this will make more sense if you understand the logic of the command line. The output of ip tunnel help is as follows :

Usage: ip tunnel { add change del show } [ NAME ] [ mode { ipip gre sit } ] [ remote ADDR ] [ local ADDR ] [ [io]seq ] [ [io]key KEY ] [ [io]csum ] [ ttl TTL ] [ tos TOS ] [ [no]pmtudisc ] [ dev PHYS_DEV ] Where: NAME := STRING ADDR := { IP_ADDRESS any } TOS := { NUMBER inherit } TTL := { 1..255 inherit } KEY := { DOTTED_QUAD NUMBER }

ip tunnel add ” Creating Tunnels

Use this command to create IPIP, GRE, or SIT tunnels.

Abbreviations: add, a

Arguments

These options define how to setup a tunnel.

ip tunnel add Examples

To create POINTOPOINT IPv6 tunnel with maximum TTL of 32:

ip tunl add Cisco mode sit remote 192.31.7.104 local 192.203.80.142 ttl 32

ip tunnel show ” List Tunnel Attributes

Use this command to list tunnel attributes.

Abbreviations: show, list, sh, ls, l

Example

kuznet@amber~ $ ip tunl ls Cisco Cisco: ipv6/ip remote 192.31.7.104 local 192.203.80.142 ttl 32

The line starts with the tunnel device name terminated by a colon , then the tunnel mode follows. The parameters of the tunnel are listed with the same keywords used at tunnel creation.

kuznet@amber~ $ ip -s tunl ls Cisco Cisco: ipv6/ip remote 192.31.7.104 local 192.203.80.142 ttl 32 RX Packets Bytes Errors CsumErrs OutOfSeq Mcasts 12566 1707516 0 0 0 0 TX Packets Bytes Errors DeadLoop NoRoute NoBufs 13445 1879677 0 0 0 0

Essentially these numbers are the same as those printed using ip -s link show , but the tags are different to reflect tunnel-specific features. These features are


   
Top

Категории