This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
networking:tunneling [2017/04/24 07:51] GreenReaper [Contents] Fix broken links to internal anchors for DokuWiki format. |
networking:tunneling [2019/09/21 12:14] (current) soren Use full ip commands. If you're just trying to learn, it doesn't help that you have to make sense of the short forms. |
||
---|---|---|---|
Line 37: | Line 37: | ||
==== Manual configuration example==== | ==== Manual configuration example==== | ||
<code> # modprobe ipip | <code> # modprobe ipip | ||
- | # ip tu ad ipiptun mode ipip local 10.3.3.3 remote 10.4.4.4 ttl 64 dev eth0 | + | # ip tunnel add ipiptun mode ipip local 10.3.3.3 remote 10.4.4.4 ttl 64 dev eth0 |
- | # ip ad ad dev ipiptun 10.0.0.1 peer 10.0.0.2/32 | + | # ip addr add dev ipiptun 10.0.0.1 peer 10.0.0.2/32 |
- | # ip li se dev ipiptun up | + | # ip link set dev ipiptun up |
- | # ip ro ad 10.4.10.0/24 via 10.0.0.2 | + | # ip route add 10.4.10.0/24 via 10.0.0.2 |
- | # ip ro ad 10.4.20.0/24 via 10.0.0.2 | + | # ip route add 10.4.20.0/24 via 10.0.0.2 |
- | # ip ro ad 10.4.30.0/24 via 10.0.0.2 | + | # ip route add 10.4.30.0/24 via 10.0.0.2 |
- | # ip ro ad 10.4.40.0/24 via 10.0.0.2</code> | + | # ip route add 10.4.40.0/24 via 10.0.0.2</code> |
==== /etc/net configuration example ==== | ==== /etc/net configuration example ==== | ||
Line 70: | Line 70: | ||
==== Manual configuration example==== | ==== Manual configuration example==== | ||
<code> # modprobe ip_gre | <code> # modprobe ip_gre | ||
- | # ip tu ad gretun mode gre local 10.5.5.5 remote 10.6.6.6 ttl 64 dev eth0 | + | # ip tunnel add gretun mode gre local 10.5.5.5 remote 10.6.6.6 ttl 64 dev eth0 |
- | # ip ad ad dev gretun 10.0.0.3 peer 10.0.0.4/32 | + | # ip add add dev gretun 10.0.0.3 peer 10.0.0.4/32 |
- | # ip li se dev gretun up | + | # ip link set dev gretun up |
- | # ip ro ad 10.6.10.0/24 via 10.0.0.4 | + | # ip route add 10.6.10.0/24 via 10.0.0.4 |
- | # ip ro ad 10.6.20.0/24 via 10.0.0.4</code> | + | # ip route add 10.6.20.0/24 via 10.0.0.4</code> |
==== /etc/net configuration example ==== | ==== /etc/net configuration example ==== | ||
Line 99: | Line 99: | ||
==== Manual configuration example==== | ==== Manual configuration example==== | ||
<code> # modprobe ipv6 | <code> # modprobe ipv6 | ||
- | # ip tu ad sittun mode sit local 10.7.7.7 remote 10.8.8.8 ttl 64 dev eth0 | + | # ip tunnel add sittun mode sit local 10.7.7.7 remote 10.8.8.8 ttl 64 dev eth0 |
- | # ip ad ad dev sittun 2001:0DB8:1234::000e/127 | + | # ip addr add dev sittun 2001:0DB8:1234::000e/127 |
- | # ip li se dev sittun up | + | # ip link set dev sittun up |
- | # ip -6 ro ad 2001:0DB8:5678::/48 via 2001:0DB8:1234::000f | + | # ip -6 route add 2001:0DB8:5678::/48 via 2001:0DB8:1234::000f |
- | # ip -6 ro ad 2001:0DB8:5679::/48 via 2001:0DB8:1234::000f | + | # ip -6 route add 2001:0DB8:5679::/48 via 2001:0DB8:1234::000f |
- | # ip -6 ro ad 2001:0DB8:567a::/48 via 2001:0DB8:1234::000f</code> | + | # ip -6 route add 2001:0DB8:567a::/48 via 2001:0DB8:1234::000f</code> |
==== /etc/net configuration example ==== | ==== /etc/net configuration example ==== |