Author: eelco
Date: Wed Mar  9 14:06:19 2011
New Revision: 26230
URL: https://svn.nixos.org/websvn/nix/?rev=26230&sc=1

Log:
* Make cartman's 6to4 tunnel address different from its address
  on the local network.  Otherwise routing gets confused when
  talking to other machines on the network.

Modified:
   configurations/trunk/tud/cartman.nix

Modified: configurations/trunk/tud/cartman.nix
==============================================================================
--- configurations/trunk/tud/cartman.nix        Wed Mar  9 13:37:03 2011        
(r26229)
+++ configurations/trunk/tud/cartman.nix        Wed Mar  9 14:06:19 2011        
(r26230)
@@ -115,16 +115,16 @@
 
         # compute 6to4 address
         prefix6=$(printf "2002:%02x%02x:%02x%02x\n" $(echo ${myIP} | tr . ' '))
-        addr6="$prefix6"::1
+        addr6="$prefix6"::0 # our tunnel end-point on the tun6to4 interface
         
         # set up the tunnel
-        ip tunnel add tun6to4 mode sit remote any local ${myIP}
+        ip tunnel add tun6to4 mode sit remote any local ${myIP} ttl 64
         ip link set dev tun6to4 mtu 1472 up
-        ip -6 addr add $addr6/16 dev tun6to4
-        ip -6 route add ::/96 dev tun6to4 metric 1
+        ip -6 addr add $addr6/128 dev tun6to4
         ip -6 route add 2000::/3 via ::192.88.99.1 dev tun6to4 metric 1
 
         # enable forwarding for the rest of the network
+        ip -6 addr add $prefix6::1 dev eth0
         ip -6 route add $prefix6::/64 dev eth0
       '';
   };
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to