Monday, November 3, 2014

How to run IPv4 over IPv6 on linux VMs?


here is what you need to do:

on VM 1:
1.  modprobe ip6_tunnel
2.  ip -6 tunnel show mode any
3.  ip -6 tunnel add ip6tnl1 mode ip4ip6 remote 2003:1b39:110:1::133d/64 local 2003:1b39:110:1::133e/64
4.  ip -6 tunnel show mode any
5.  ip link set dev ip6tnl1 up
6.  ifconfig
7.  ip addr add 10.0.0.1/24 dev ip6tnl1


on VM 2:
1.  modprobe ip6_tunnel
2.  ip -6 tunnel show mode any
3.  ip -6 tunnel add ip6tnl1 mode ip4ip6 remote 2003:1b39:110:1::133e/64 local 2003:1b39:110:1::133d/64
4.  ip -6 tunnel show mode any
5.  ip link set dev ip6tnl1 up
6.  ifconfig
7.  ip addr add 10.0.0.2/24 dev ip6tnl1
9.  now from VM2 run: ping 10.0.0.1

##############################################################
Dont forget the "modprobe ip6_tunnel" which start up things!
Make sure your distro is with kernel version 2.6.22 or above!
##############################################################

p.s - if its already configured on the 2 VMs(you can see it if you run ifconfig or #ip a):
#################################################
VM1(13.1.1.62  62.225.0.59):
9: ip6tnl1: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1460 qdisc noqueue state UNKNOWN
    link/tunnel6 2003:1b39:110:1::133d peer 2003:1b39:110:1::133e
    inet 10.0.0.1/24 scope global ip6tnl1
    inet6 fe80::463:ccff:fe00:5169/64 scope link
       valid_lft forever preferred_lft forever

VM2(13.1.1.63,  62.225.0.60):
7: ip6tnl1: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1460 qdisc noqueue state UNKNOWN
    link/tunnel6 2003:1b39:110:1::133e peer 2003:1b39:110:1::133d
    inet 10.0.0.2/24 scope global ip6tnl1
    inet6 fe80::47b:a8ff:fe00:516a/64 scope link
       valid_lft forever preferred_lft forever

1 comment:

  1. Nice and good article. It is very useful for me to learn and understand easily. Thanks for sharing your valuable information and time. Please keep updating Hadoop Admin Online Training

    ReplyDelete