插座& NAT [英] Socket & NAT

查看:83
本文介绍了插座& NAT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好!
我有一台PC,其中两个网卡(NIC)连接在两个不同的子网中,如何使用Winsock转发木地板?

致以最诚挚的问候,
Vunza.

Hello!
I have a PC with two netowrk cards (NIC) connected in two diferents sub net, how can i forward the paquets using winsock?

with best regards,
Vunza.

推荐答案

数据包转发可能通过代理在第2层(或桥接"),3层(或路由")或第4层(NAT)或更高级别发生应用程序协议.

桥接和路由是操作系统的一部分,它们是网络功能(作为TCP/IP cpnfiguration:查找IP转发或NIC配置-查找桥接").

请注意,启用IP转发对于路由是必要的,但这还不够:路由器"两侧的节点必须知道其存在,可能通过路由协议或通过静态配置(请查找路由添加"命令).
Packet forwarding may happen at layer 2 (or "bridging"), 3 (or "routing") or 4 (NAT) or above, by proxying an application protocol.

Bridging and Routing are networking functionalities that are part of the OS (either as TCP/IP cpnfiguration: look for IP-Forwarding or a NIC configuration - look for "bridging").

Note that IP forwarding enabled is necessary for routing, but it is not enough: nodes on the sides of the "router" must be aware of its existence, may be through a routing protocol, or may be via static configuration (look for the "route add" command).


好吧,我没有正确回答您的问题..但是我正在使用简单桥接在同一系统上的diff子网中进行数据包转发. jst尝试桥接两个nic卡,然后尝试使用您拥有的原始代码...应该可以使用..
您可以使用此链接进行桥接..
http://www.microsoft.com/资源/文档/windows/xp/all/proddocs/en-us/hnw_bridge_install.mspx?mfr=true [
well I dont get your question properly.. but I am doing packet fwding in diff subnet on same system using simply bridging. jst try to bridge both nic cards and then try original code you have... it should work..
you can use this link for bridging..
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/hnw_bridge_install.mspx?mfr=true[^]


这篇关于插座& NAT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆