0

I deploy a ethereum private network by geth, And I running three node on my computer, connect them by bootnode. The private network is working, But I'm confused about the results of the operation. My geth cmd is:
geth --datadir chain/node1 --networkid 15 --bootnodes $bootnode_address geth --datadir chain/node2 --networkid 15 --port 30304 --bootnodes $bootnode_address geth --datadir chain/node3 --networkid 15 --port 30305 --bootnodes $bootnode_address enter image description here

As is described in the picture,There are multiple ports launch, And Why do these ports(60077;60300;60089) appear? I think the connection should be :
30303 -> 30304;30305 30304 -> 30303;30305 30305 -> 30303;30304
But now the connection are:
30303 -> 60077; 60089 -> 30305 60077 -> 30303; 60300 -> 30305 30305 -> 60300; 30305 -> 60089
Does anyone know why? Thanks.

0

You have specified that your geth nodes listen on port 30303, 30304, and 30305 respectively, which is what they are doing.

When each node connects to the other, they open a socket connection that connects to the listening port on the peer. This socket is served on the local machine via a new port number, usually assigned by the OS (although you can attempt to use a specific port).

When traffic is exchanged with the remote peer, it is sent and received via this port, so that the networking stack knows which peer to send it to.

This is normal behaviour, and unrelated to ethereum. Any networking connection you make to will follow this pattern.

  • Thank you! Do you know what's the strategy of the geth node port in remote connection? In the results of my operation. Some connection use the init port and others use new port, Why node don't use init port first and use the new port when the init port not enough ? – sibo.wang Nov 23 '18 at 10:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.