由买买提看人间百态

topics

全部话题 - 话题: udp
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
s********k
发帖数: 6180
1
那这个unfairness应该准确的说是UDP相对TCP而言,那么实际系统中怎么使用UDP使得
UDP和TCP能够尽量公平?UDP是否也会做一些类似TCP的控制?一般来说怎么做的(UDP
一般没有接收端的反馈)
j***i
发帖数: 3096
2
来自主题: Programming版 - 有没有人在Vista下试过UDP广播
在XP下发UDP广播是从所有的网卡发出去,怎么在Vista下只从优先级最高的网卡发出去?
为了实现XP下一样的UDP广播, 在Vista下,我只好找到每一个网卡,挨个挨个发UDP
Sub Broadcast。
是不是我哪地方用的不对?或者哪里要改一下设置?
用正常UDP广播(不用UDP Sub Broadcast)的client socket初始化源代码如下:
BOOL CreateFwDhcp67Client()
{
int ra = 1;
unsigned long block_flag = TRUE;
FwDhcp67ClientSock = socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP);
if ( FwDhcp67ClientSock == INVALID_SOCKET)
{
return FALSE;
}
ioctlsocket ( FwDhcp67ClientSock, FIONBIO, &block_flag );

if (setsoc
b***y
发帖数: 2799
3
来自主题: Programming版 - [合集] Unix UDP 一问。
☆─────────────────────────────────────☆
DongCunrui (LIG) 于 (Wed Sep 21 17:23:32 2005) 提到:
We can use setsockopt to set the maximal buffer size of a UDP socket.
What I understand is this size is the max size of the UDP datagrams a UDP
socket could receive or send, this buffer is not used to buffer multiple UDP
datagrams, do I misunderstand this? If I'm right, is there anyway to buffer
multiple UDP datagrams? If so, how?
Thanks a lot.
☆─────────────────────────────────────☆
crystalike (Vad
z*****n
发帖数: 7639
4

我认为这个问题本身是个伪问题。
tcp,udp都是操作系统的不同进程下的任务。在多任务
操作系统中,各个进程被轮流调用,不管是tcp还是udp,
都是向网络层即IP deamon写入tcp或者udp包。IP的工作
方式是fifo,谁先来谁排在前面被推出去。所以,如果
你有两个进程,同时向外发送,tcp和udp的发送速率一
样,包大小一样,进程优先度一样,它们会有相同的传
输结果。
下面的链路和物理层跟这个先后次序没有任何关系。
s****e
发帖数: 282
5
来自主题: EmergingNetworking版 - UDP packets dropping
Several application processes run on the same machine. They communicate with
each other with UDP packets. Why some UDP packets are lost? The destination
address of the UDP packets is the machine's IP address, not 127.0.0.0.
Since the application processes are on the same machine, the UDP packets go
from application layer to network layer, then back to the application layer.
They will not reach link layer, right?
Thanks.
c*********f
发帖数: 4
6
功能要求:将UDP传输模拟成TCP,解决UDP丢包、重包、丢包重传、流量控制、拥塞控制
等问题,并在Internet网上达到近似TCP的传输速度。 实现要求: win32,C++ 封装成类
似CAsyncSocket 一样的调用和事件通知要求像TCP一样,完全按照顺序字节流发送和接收
数据,并将发送时的数据 按最优大小分包或并包(即可以将短时间内几次调用发送的小数
量数据合并成一个UDP包发送) 支持多种线程模型,单一线程/每个Socket一个线程/运行
在调用线程支持多种事件模型,窗口消息/事件/线程消息
具体要求是:首先数据要正确、然后是速度达到差不多TCP的速度,时间大约半个月到一
个月。在win32环境下运行,用V C++编写。
做这个软件的目的是为了穿透防火墙/NAT,就是让不同的内网可以直接通讯.
有意者请联系:y*[email protected]
MSN: y*********[email protected]
s********k
发帖数: 6180
7
【 以下文字转载自 EE 讨论区 】
发信人: silverhawk (silverhawk), 信区: EE
标 题: UDP能否和TCP在wireless 情况下公平分享信道资源?
发信站: BBS 未名空间站 (Thu Jun 11 15:23:54 2009, 美东)
比如802.11情况下,UDP是否一点rate control都不做,而且UDP对packet loss没有TCP
敏感。最后会不会dominate整个MAC资源?实际系统中是怎么操作的呢?
z*****n
发帖数: 7639
8
you mixed MAC layer and transport layer.
If there are two processes, 1 tcp 1 udp, they are both sending
to the network layer with same rate. How come a "channel collision"
will affect only tcp?
If the udp process keeping pushing packets to the network layer,
it will blow the IP packet buffer, not the channel. But we are
not talking that the UDP process is greedy and the tcp is not,
right?
silverhawk (silverhawk) 的大作中提到: 】
s********k
发帖数: 6180
9
比如两个laptop共享一个PHY为1M的无线带宽,其中一个用UDP按照500K/s发送(buffer
无限大并且只有UDP一个session)。另外一个开TCPsession(同样buffer无限大并且只
有TCP一个session),没有RTS/CTS,其中TCP和UDP的包collision之后掉包,
congestion window 减半,或者超时之后congestion window重启,从TCP层面来看,
有效带宽(goodput)只有100K(去掉各种其他开销,比如包头的overhead)。这种情
况可能出现吗?
n********e
发帖数: 30
10
According to my old knowledge:
When congestion occurs:
TCP vs TCP is fair.
TCP vs UDP is not fair because UDP doesn't have congestion control. The
degree of unfairness is decided by the process that generates the UDP
datagrams.
There are many reasons for congestion. It doesn't matter the physical
network is wifi or ethernet or PPP.Even if you have super fast wifi,
congestion can still happen.
c*********f
发帖数: 4
11
功能要求:将UDP传输模拟成TCP,解决UDP丢包、重包、丢包重传、流量控制、拥塞控制
等问题,并在Internet网上达到近似TCP的传输速度。 实现要求: win32,C++ 封装成类
似CAsyncSocket 一样的调用和事件通知要求像TCP一样,完全按照顺序字节流发送和接收
数据,并将发送时的数据按最优大小分包或并包(即可以将短时间内几次调用发送的小数
量数据合并成一个UDP包发送) 支持多种线程模型,单一线程/每个Socket一个线程/运行
在调用线程支持多种事件模型,窗口消息/事件/线程消息
具体要求是:首先数据要正确、然后是速度达到差不多TCP的速度,时间大约半个月到一
个月。在win32环境下运行,用V C++编写。
做这个软件的目的是为了穿透防火墙/NAT,就是让不同的内网可以直接通讯。
有消息请联系:y*[email protected]
MSN: y*********[email protected]
j*******e
发帖数: 674
12
什么叫“成功连接”?UDP本身是无连接的。
是不是你自己在UDP上有自己的应用层协议?你自己的应用层协议“成功链接”?
在ARM9 debian 里tcpdump能看到收到UDP packet? debian里有防火墙之类吗?
另外很有可能你的ARM设成big endian,你的服务器端没有做endianess转换。
s******n
发帖数: 34
13
来自主题: Programming版 - UDP广播老是接收不到
做了一个UDP广播, 但是服务器总是收不到消息。
我要实现的是客户端不知道服务器的IP, 想要通过广播取得。
1. 客户端发送广播
2.服务器收到广播后发自己的IP给这个客户端
3.客户端收到服务器发来的IP
以上都是通过UDP的
4.客户端和服务器端建立TCP连接
我现在的问题是, 第二步, 服务器总是没有收到这个广播, recvfrom一直没有返
回。
UDP包不稳定, 服务器可能会收不到。
那应该怎么解决呢?
谢谢
b***y
发帖数: 2799
14
☆─────────────────────────────────────☆
alfven (rik) 于 (Fri Sep 5 15:19:15 2008) 提到:
还是有关udp的问题,Filter的部分已经解决了,现在问题是udp数据很快,不能完全接
收。
我尝试了两个方式:
1。接受数据thread写到deque做的buffer后面,然后让第二个thread读deque的前端,
一天下来能miss1百万条。
2。一接受到数据就直接写到Binary文件里面,一天下来Miss个6000条out of
400million条。
比较了一下两个的时间,第一个插入buffer通常要1微秒,第二个直接写才要~400ns,
觉得有点意外,是不是这个file stream的buffer要更好?
由于以后要加入real time的filter,肯定是要写在内存里面,怎么才能提高速度,不
让数据丢失呢?考虑过增加udp socket的buffer size,但是速度跟不上还是不行的。
考虑提高写buffer的速度,尝试了一下用大数组做buffer,假如不考虑thread safe,
n********e
发帖数: 30
15
according to my old knowledge, the application controls UDP rate. UDP will
win against TCP.

TCP
n******t
发帖数: 4406
16
这个和wireless没什么关系吧。。。
TCP和UDP肯定没得抢的,如果udp想抢的话。

TCP
s********k
发帖数: 6180
17
那比如两个laptop同时连接到一个AP,一个发送TCP一个发送UDP,发送UDP的是怎么控
制它的速率避免完全挤占TCP的信道资源?
z*****n
发帖数: 7639
18
这个跟上层是udp还是tcp完全没有关系。发udp的那个laptop在
信道竞争上没有任何优势。
n******t
发帖数: 4406
19
UDP will win over TCP when both of them try to saturate the bandwidth. But i
f you limit the udp sending rate, this is another story.

buffer
S*******s
发帖数: 13043
20
来自主题: Database版 - [转载] Outbound 1434 UDP
【 以下文字转载自 Security 讨论区,原文如下 】
发信人: StarVenus (参商), 信区: Security
标 题: Outbound 1434 UDP
发信站: Unknown Space - 未名空间 (Fri Dec 5 14:10:56 2003) WWW-POST
my machine keeps sending out UDP packet to 1434 port of different machines.
what could cause this? thanks.
s*****g
发帖数: 1055
21
来自主题: EmergingNetworking版 - question on TCP and UDP header
Good question! I searched Google, the consensus of all answers is that the
length field in either TCP or UDP (or lack there of) is redundant, because
the length can always be inferred from IP payload length minus UDP/TCP
header size.
l***h
发帖数: 139
22
来自主题: Internet版 - Re: 一个关于TCP/UDP的问题
TCP: connection oriented.
UDP: connection less.
that's the major difference.
adv disadv
TCP no lost not real time. slow
UDP stable speed packet lost
I think they are the very basic knowledge on any network course.
I give you a simple question: what's is IPC?
l*****b
发帖数: 82
23
来自主题: Java版 - JBoss UDP exception
When I start Jboss 4.0.4, it keep throwing UDP exceptions. However, it never
happened before. Do you know what is root cause? There is also some issue
about the naming server port: 1099. When I use program to check the port
1099, it always return true even the JBoss is not up yet. I am not sure they
are relative.
2008-12-10 10:27:57,311 WARN [org.jgroups.protocols.UDP] packet from /193.32
.21.76:32793 has different version (") from ours (0227). This may cause
problems
2008-12-10 10:27:57,311
B***G
发帖数: 109
24
写了一个c程序,收集了数据然后送到服务器的 UDP端口,服务器目前在一个局域网内
,但今后会有一个单独的外网IP。这个程序在笔记本上用光盘安装的Debian和Utuntu都
成功连接。但当我把同样的程序放到了一个ARM9单片机上的debian上的时候,就怎么也
连不上去UDP服务器了。单片机上的Debian是一个完全版(2.6.21),除了没有xwindow.
达人们是否能够给会诊一样?多谢
z***e
发帖数: 5393
25
来自主题: Programming版 - 请教一下,怎么控制发送UDP的速度?
大概的目的是要测试另外一边的负载能力,所以要程序按照不同速度发送udp过去,比
如:
100 packets/sec
1000 packets/sec
10K packets/sec
100K packets/secu1
...
现在我的solution大概是:
while(true)
{
SendPacket(N); //发N个UDP出去
Sleep(M);
}
每次跑不同的test,就设不同的N和M,比如 M=10, N=100,就差不多是预计每0.01秒送
100个,基本上是10000/sec(send packet本身还要时间,实际差不多是9k);
但是问题在于,M=10,N=100,和M=100,N=1000这样不同搭配出来,理论上都是平均
10000/sec,但实际上差别有点大,毕竟sleep本身有误差(windows最小单位好像是
15ms),thread本身switch也有影响。最后接受那边的CPU usage也不是很对,比如理
论上同样是收到100K/sec,但是一种搭配下的CPU usage是50%,另一种搭配可能就变成
40%。
所以关键是怎么让sende
l***e
发帖数: 35
26
来自主题: Security版 - [转载] UDP 137... Worm?
【 以下文字转载自 Hardware 讨论区,原文如下 】
发信人: lokee (龚天下), 信区: Hardware
标 题: UDP 137... Worm?
发信站: The unknown SPACE (Tue Mar 11 12:26:02 2003) WWW-POST
Just used edonkey for couple of days for movies, and set my PC behind the SMC
router (7004AWBR) to DMZ.
From yesterday, my router frequently turned inaccessiable (can't ping to the
router from the LAN behind it) every 10 minutes or so.
checked the log of the router, found "unregonized access from xx.xx.xx.xx:xxx
to UDP 137", 2~3 times per minute. Googled
v****x
发帖数: 34
27
来自主题: Security版 - [转载] UDP 137... Worm?
port 137 service and worm,
tcp netbios-ns NETBIOS Name Service
udp netbios-ns NETBIOS Name Service
tcp Chode [trojan] Chode
tcp Qaz [trojan] Qaz
udp Msinit [trojan] Msinit
h****n
发帖数: 198
28
是53, 这是DNS server的口。
偶装了绿色警戒防火墙,每当有查询域名的动作时会看到连往DNS server:53的UDP连接,
本地的端口号则是1030,1031....这样的端口号,每次不同。
如果把UDP ports设为permit only, 又不add任何口, 则无法查询域名(但这时从绿色警
戒的监视窗口里仍可见到DNS server:53的连接,显然返回的信息给block了).
可是我把TCP ports设为permit only后,用IE/telnet访问网站就都没问题, 返回的信息
没有被block, 不知是怎么回事?
s********k
发帖数: 6180
29
比如802.11情况下,UDP是否一点rate control都不做,而且UDP对packet loss没有TCP
敏感。最后会不会dominate整个MAC资源?实际系统中是怎么操作的呢?
s********k
发帖数: 6180
30
来自主题: JobHunting版 - 嵌入式 TCP/IP. TCP, UDP 面试题???
一般也就是TCP,UDP区别,分别用在什么场合,详细点会问TCP header里面内容和意义
.socket基本用法之类
m******e
发帖数: 59
31
来自主题: JobHunting版 - 嵌入式 TCP/IP. TCP, UDP 面试题???
我面过不少网络职位。
TCP/UDP区别,这个问得超多,这里接下去可能会问ACK的机制,congestion control和
flow control的机制和细节,fast recovery,slow start.总之TCP这块是重点
可能会问一些常见的协议比如ARP,HTTP
socket programming
IPV4 VS IPV6
另外你是嵌入式最好准备一下OS的东西,比如deadlock
t**r
发帖数: 3428
32
u面试问NODE.JS实现UDP SERVER.。。这也太难了吧。汉。。
没做过的根本就是挂的节奏。
c*g
发帖数: 634
33
如题,在G的team match阶段。
希望能得到大牛帮助,比如直接推荐给要招人的hm。可以帮忙内推Amazon,UDP
谢谢!
s********k
发帖数: 6180
34
【 以下文字转载自 EE 讨论区 】
发信人: silverhawk (silverhawk), 信区: EE
标 题: 在线听歌一类的应用是用TCP吗?还是UDP?
发信站: BBS 未名空间站 (Sat Oct 11 10:11:43 2008)
感觉应该是TCP,不是很确定。另外比如文件传输,这个应该是标准的TCP应用,但是比
如我用QQ传输比用MSN传输快很多,难道是两者做了不同优化,还是什么其他原因?
j********x
发帖数: 2330
35
没理由用tcp,tcp的延迟抖动会严重影响播放质量。当然现在网络条件好,也可以采用
大缓冲的tcp;其实udp可以方便定制,开发的产品的质量综合要比tcp好才对
v****s
发帖数: 1112
36
i think the connection is by tcp, and after u get the ip from content server
and established, the streaming is by udp
m*****o
发帖数: 147
37
make no sense to use TCP for streaming. If a packet lost, then lost. It will
make the feeling suffering to wait and resent. I think it should be UDP
s********k
发帖数: 6180
38
那实际系统中UDP是怎么控制避免过多占用TCP带宽呢?
z***e
发帖数: 5393
39
嗯,差不多是这样。
如果说实现的话,差不多是:
if (packetToSend.Protocol == UDP)
{ }
else
if (packetToSend.Protocol == TCP)
{}
这两者没有优先级。
s********k
发帖数: 6180
40
从MAC信道分配上来看,如果两者尝试发送几率相等,确实两个完全公平,但是TCP会因
为信道冲突掉包减少自己的发送窗口甚至重置为1从而减少MAC层尝试发送的概率,这样
的话UDP岂不是逐渐会dominate整个信道。TCP要想再抢回来非常困难
z*****n
发帖数: 7639
41
In that case it is totally fair for 2 stations...
802 MAC works in such a way:
if a transmission is sensed when counting down the
backoff slots, halt the counting until the channel
is clear again.
if collision happens, double the contention window.
if a successful transmission confirmed, contention
window resets to minimum.
All the nodes have equal chance to access the channel,
no matter how many packets are pending in upper layer.

UDP
z*****n
发帖数: 7639
42
where is unfairness? I don't think there is any
and never said it.

UDP
z*****n
发帖数: 7639
43
I think it won't happen.
If the UDP station has a Constant Bit Rate (CBR) of 500kbps, and the
radio channel capacity is 1Mbps, then it will leave about 50% of
time that the channel is idle. Collision will not occur frequently
and both stations will stay in small contention-window state.
Even both the stations have an application layer bit rate of 1Mbps,
the channel is still fair for both of them, i.e., they will get
500kbps each. The TCP one will shrink the rate according to
the ACK arrival rate
n******t
发帖数: 4406
44

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So it will slow down while udp does not care.
s****e
发帖数: 282
45
来自主题: EmergingNetworking版 - UDP packets dropping
I checked my system. The default UDP buffer setting is about 250K. If I make
it larger, like 10M, is there any problem? Assume memory is enough. THX.
s****e
发帖数: 282
46
来自主题: EmergingNetworking版 - UDP packets dropping
I wrote two small programs. One is server, one is client. Both the server
and client run on the same machine. Each time the client runs, it sends out
100000 UDP packets within 2 min. The size of each packet is 1KB. Maybe it is
too much, right?
I use setsockopt() to change the SO_RCVBUF. I found that even if I make the
buffer very larger, it does not help, on the contrary, more packets are
dropped. Even for the same buffer size, the result varies.
Do I need to adjust SO_SNDBUF? If SO_SNDBUF is to
c****d
发帖数: 116
47
来自主题: EmergingNetworking版 - UDP packets dropping
你的最终目的是什么? 测试UDP? 还是有其它指标你要测试?
为什么你要确保no packet drop? 如果是这样, 你可以自己做
flow control 呀. 在做Emulation?
v**n
发帖数: 951
48
来自主题: EmergingNetworking版 - UDP packets dropping
if on the same machine, why not using domain socket instead of UDP?
Anyway, you are still gonna run into message drop problem, if the receving
process can't keep up with the sending rate.....
In your case, the data is probably dropped even before reach the net stack.
i mean the syscall has rate upper limit.

with
destination
go
layer.
s********k
发帖数: 6180
49
【 以下文字转载自 EE 讨论区 】
发信人: silverhawk (silverhawk), 信区: EE
标 题: 在线听歌一类的应用是用TCP吗?还是UDP?
发信站: BBS 未名空间站 (Sat Oct 11 10:11:43 2008)
感觉应该是TCP,不是很确定。另外比如文件传输,这个应该是标准的TCP应用,但是比
如我用QQ传输比用MSN传输快很多,难道是两者做了不同优化,还是什么其他原因?
z**r
发帖数: 17771
50
用wireshark抓几个包不就知道了?一般这种应用都是UDP,因为第一不要求纠错,第二
要求迅速。
QQ怎么传文件不太清楚,msn俺很久以前sniff过,中间要传到msn的server上,再传到
对方
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)