其实简单,,,我看了网上很多人都在问这个事,,, 现在,贴出个小代码,,给大家,udp 的 using System; using System.Collections.Generic; using System.Text; using System.Net.Sockets; using System.Net; namespace udpTest { class Program { static void Main(string[] args) { //网卡1 IPEndPoint ipe= new IPEndPoint(IPAddress.Parse("192.168.1.65"),5212); //网卡2 IPEndPoint ipe1 = new IPEndPoint(IPAddress.Parse("192.168.1.67"), 5213); //目标服务器 IPEndPoint ipe2= new IPEndPoint(IPAddress.Parse("192.168.1.17"),5000); //用网卡1发 UdpClient udp = new UdpClient(ipe); byte[] by = { 0x01, 0x02 }; udp.Send(by, by.Length,ipe2); //用网卡2发 UdpClient udp1 = new UdpClient(ipe1); udp1.Send(by, by.Length, ipe2); } } }