OS1:Linux
Network Interface: eth0
IP: 61.152.1.1

OS2: FreeBSD
Network Interface: fxp0
IP: 210.51.1.1

预配置:
OS1: 10.0.0.1 / 255.255.255.252
OS2: 10.0.0.2 / 255.255.255.252

OS1上配置
配置ipip隧道
Quotation
#ip tunnel add tun0 mode ipip remote 210.51.1.1 local 61.152.1.1 dev eth0
#ifconfig tun0 10.0.0.1 netmask 255.255.255.252 pointopoint 10.0.0.2
#ifconfig tun0 mtu 1500 up


OS2配置隧道

Quotation
#ifconfig gif0 create
#gifconfig gif0 inet 210.51.1.1 61.152.1.1
#ifconfig gif0 10.0.0.2 netmask 255.255.255.252 10.0.0.1
#ifconfig gif0 mtu 1500 up


OS1测试:
#ping -c 4 10.0.0.2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.139 ms
64 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=0.138 ms
64 bytes from 10.0.0.2: icmp_seq=3 ttl=64 time=0.138 ms
64 bytes from 10.0.0.2: icmp_seq=4 ttl=64 time=0.136 ms

作者:askwan@『AskWan』
地址:http://www.askwan.com/post/113/
可以转载,转载时请以链接形式注明作者和原始出处及本声明!

Oprating System | Comments(0) | Trackbacks(0) | Reads(1307)
收藏到网摘:百度搜藏 Google书签 Yahoo收藏 新浪ViVi收藏夹 365天天网摘 天极网摘 我摘·网摘·网络书签 POCO网摘 和讯网摘 Bolaa博拉博客收录中心 天下图摘
Add a comment
Emots
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
Enable HTML
Enable UBB
Enable Emots
Hidden
Remember
Nickname   Password   Optional
Site URI   Email   [Register]