- 论坛徽章:
- 0
|
Let\'s say you have 3 networks: Internal networks A and B, and intermediate network C (or let\'s say, Internet). So we have network A:\r\n\r\nnetwork 10.0.1.0\r\nnetmask 255.255.255.0\r\nrouter 10.0.1.1\r\n\r\nThe router has address 172.16.17.18 on network C.\r\n\r\nand network B:\r\n\r\nnetwork 10.0.2.0\r\nnetmask 255.255.255.0\r\nrouter 10.0.2.1\r\n\r\nThe router has address 172.19.20.21 on network C.\r\n\r\nAs far as network C is concerned, we assume that it will pass any packet sent from A to B and vice versa. You might even use the Internet for this.\r\n\r\nHere\'s what you do:\r\n\r\nFirst, make sure the modules are installed:\r\n\r\ninsmod ipip.o\r\ninsmod new_tunnel.o\r\n\r\nThen, on the router of network A, you do the following:\r\n\r\nifconfig tunl0 10.0.1.1 pointopoint 172.19.20.21\r\nroute add -net 10.0.2.0 netmask 255.255.255.0 dev tunl0\r\n\r\nAnd on the router of network B:\r\n\r\nifconfig tunl0 10.0.2.1 pointopoint 172.16.17.18\r\nroute add -net 10.0.1.0 netmask 255.255.255.0 dev tunl0\r\n\r\n\r\n\r\n我没有搞混吧,上面的例子,对于我来说,就是如何\r\nroute add -net default dev tunl0\r\n\r\n是否可行的问题。 |
|