Score:0

Client Server socket applications on the same host but communication externally

kr flag

I need to test a 10 Gbits/sec high speed ethernet switch performance using a high end Ubuntu Server. I am trying to find out the time consuming externally in microseconds. So i have written a simple client socket app and server socket app for this purpose . When i run them in different hosts they are working fine but unfortunately i have a single 10 Gbit/sec network interface card with two ports residing in the same Ubuntu Server.

When I install and run the client and server app in this Ubuntu Server , socket communication stays in the Ubuntu host , external communication doesn't occur. How can i force Ubuntu not to communicate internally and use the external switch.

Thanks


Here is my client code

def init_client_socket():

    s1 = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

    server_addr = '192.168.1.34'

    s1.bind(('192.168.0.101',9999))

    s1.connect((server_addr, 9999))

    print('Connected as ', server_addr )

    return s1
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.