第一步:通过数据线连接iphone和mac
第二步:打开iphone的个人热点并选择仅USB
如果没有选项,请关闭手机连接的Wi-Fi,用手机自己的移动网络
id="iframe_0.9325067354366183" src="data:text/html;charset=utf8,%3Cimg%20id=%22img%22%20src=%22http://cc.cocimg.com/api/uploads/20160612/1465723782342605.png?_=5600389%22%20style=%22border:none;max-width:690px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById('img');%20window.parent.postMessage(%7BiframeId:'iframe_0.9325067354366183',width:img.width,height:img.height%7D,%20'http://www.cnblogs.com');%7D%3C/script%3E" frameborder="0" scrolling="no" style="margin: 0px; padding: 0px; border-style: none; width: 321px; height: 569px;">
选择仅USB
第三步:打开网络偏好设置,确保你的Mac的Wi-Fi是打开的,并且没有连接任何网络
如果已有连接wifi可以在高级里删除之前的联网缓存
id="iframe_0.637368144467473" src="data:text/html;charset=utf8,%3Cimg%20id=%22img%22%20src=%22http://cc.cocimg.com/api/uploads/20160612/1465723789771115.png?_=5600389%22%20style=%22border:none;max-width:690px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById('img');%20window.parent.postMessage(%7BiframeId:'iframe_0.637368144467473',width:img.width,height:img.height%7D,%20'http://www.cnblogs.com');%7D%3C/script%3E" frameborder="0" scrolling="no" style="margin: 0px; padding: 0px; border-style: none; width: 460px; height: 329px;">
第四步:打开系统偏好设置,按住option(alt)键点击共享
如果不按住option键将不会出现ipv6选项
id="iframe_0.07203403161838651" src="data:text/html;charset=utf8,%3Cimg%20id=%22img%22%20src=%22http://cc.cocimg.com/api/uploads/20160612/1465723796979042.png?_=5600389%22%20style=%22border:none;max-width:690px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById('img');%20window.parent.postMessage(%7BiframeId:'iframe_0.07203403161838651',width:img.width,height:img.height%7D,%20'http://www.cnblogs.com');%7D%3C/script%3E" frameborder="0" scrolling="no" style="margin: 0px; padding: 0px; border-style: none; width: 597px; height: 528px;">
第五步:选择iPhone USB -> Wi-Fi -> 创建NAT64
如果没有出现创建NAT64网络请重复第四步
id="iframe_0.40763975912705064" src="data:text/html;charset=utf8,%3Cimg%20id=%22img%22%20src=%22http://cc.cocimg.com/api/uploads/20160612/1465723804188989.png?_=5600389%22%20style=%22border:none;max-width:690px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById('img');%20window.parent.postMessage(%7BiframeId:'iframe_0.40763975912705064',width:img.width,height:img.height%7D,%20'http://www.cnblogs.com');%7D%3C/script%3E" frameborder="0" scrolling="no" style="margin: 0px; padding: 0px; border-style: none; width: 463px; height: 329px;">
第六步:选择右下角的Wi-Fi选项,可以设置密码也可以不设置密码
最后别忘了勾选左侧的选项,不然不会打开共享,显示互联网共享:打开代表操作成功
id="iframe_0.5593513923231512" src="data:text/html;charset=utf8,%3Cimg%20id=%22img%22%20src=%22http://cc.cocimg.com/api/uploads/20160612/1465723823540620.png?_=5600389%22%20style=%22border:none;max-width:690px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById('img');%20window.parent.postMessage(%7BiframeId:'iframe_0.5593513923231512',width:img.width,height:img.height%7D,%20'http://www.cnblogs.com');%7D%3C/script%3E" frameborder="0" scrolling="no" style="margin: 0px; padding: 0px; border-style: none; width: 601px; height: 373px;">
勾选互联网共享
用你另一台iPhone链接你Mac所创建的IPv6测试网络
id="iframe_0.2774321411270648" src="data:text/html;charset=utf8,%3Cimg%20id=%22img%22%20src=%22http://cc.cocimg.com/api/uploads/20160612/1465723832944875.png?_=5600389%22%20style=%22border:none;max-width:690px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById('img');%20window.parent.postMessage(%7BiframeId:'iframe_0.2774321411270648',width:img.width,height:img.height%7D,%20'http://www.cnblogs.com');%7D%3C/script%3E" frameborder="0" scrolling="no" style="margin: 0px; padding: 0px; border-style: none; width: 321px; height: 571px;">
如果你的DNS如上图所示的格式一样的话就代表你的ipv6测试环境已经搭建好了,可以开始测试你的项目了