This is a discussion on Linux server programming within the Linux Networking forums, part of the Linux Forums category; Dear all, I wrote a server to service requests from client, everything works fine. However, if I type the command &...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Dear all,
I wrote a server to service requests from client, everything works fine. However, if I type the command "ifup lan" and "ifdown lan", the server can not receive any messages from client. More specific, the RX counter of "lan" interface did increased, but my server receive nothing. One of my friend said this is may cased by "ifdown lan", after "ifdown", the socket descriptors will be cleared. I am not sure..so Please give me some advices if you might know the answer. Really appreciate!! |
|
|||
|
gooog77@hotmail.com (Tes) wrote in message news:<32475916.0404220249.249874e1@posting.google. com>...
> Dear all, > > I wrote a server to service requests from client, everything works > fine. However, if I type the command "ifup lan" and "ifdown lan", the > server can not receive any messages from client. More specific, the RX > counter of "lan" interface did increased, but my server receive > nothing. > One of my friend said this is may cased by "ifdown lan", after > "ifdown", the socket descriptors will be cleared. I am not sure..so > Please give me some advices if you might know the answer. > > > Really appreciate!! Sorry, I don't understand what it is you're trying to ask? However, ifconfig down <interface> "temporarily" takes an interface down (it can be brought backup up again without having to reconfigure the interface using ifconfig up <interface>). i.e. The interface still holds it IP details, etc. If you want to totally remove the interface, you can use ifconfig delete <interface>. |
|
|||
|
On 22 Apr 2004 03:49:25 -0700, Tes <gooog77@hotmail.com> wrote:
> Dear all, > > I wrote a server to service requests from client, everything works > fine. However, if I type the command "ifup lan" and "ifdown lan", the > server can not receive any messages from client. More specific, the RX > counter of "lan" interface did increased, but my server receive > nothing. > One of my friend said this is may cased by "ifdown lan", after > "ifdown", the socket descriptors will be cleared. I am not sure..so > Please give me some advices if you might know the answer. Per another reply your question is confusing (maybe your up and down are in wrong order). Certainly you cannot expect your server to respond after you have done "ifdown" on its interface. But even if you "ifup" it after that, it is possible that the ifdown disabled your service if it was only bound to that specific interface or IP instead of "any". -- David Efflandt - All spam ignored http://www.de-srv.com/ |
|
|||
|
efflandt@xnet.com (David Efflandt) wrote in message news:<slrnc8g2gr.l3l.efflandt@typhoon.xnet.com>...
> On 22 Apr 2004 03:49:25 -0700, Tes <gooog77@hotmail.com> wrote: > > Dear all, > > > > I wrote a server to service requests from client, everything works > > fine. However, if I type the command "ifup lan" and "ifdown lan", the > > server can not receive any messages from client. More specific, the RX > > counter of "lan" interface did increased, but my server receive > > nothing. > > One of my friend said this is may cased by "ifdown lan", after > > "ifdown", the socket descriptors will be cleared. I am not sure..so > > Please give me some advices if you might know the answer. > > Per another reply your question is confusing (maybe your up and down are > in wrong order). Certainly you cannot expect your server to respond after > you have done "ifdown" on its interface. But even if you "ifup" it after > that, it is possible that the ifdown disabled your service if it was only > bound to that specific interface or IP instead of "any". Thank you for your reply. You were right, my up and down are in wrong order. I issue ifdown first then ifup, the server can not receive any messages from client. I didnt bind specific interface or IP. By the way, I also join multicast group to receive multicast packet. |