I'm running a full node with LES protocol enabled which I want my light clients to connect to and sync from.

I tried to do this by starting the light client with geth --light --bootnodes <my_enode>. Doesn't connect. With --verbosity 4 set, it gives me
DEBUG[08-23|16:05:24] Bad packet from <my_ip>:<my_port>: rlp: too few elements for discv5.pong

I also tried with geth --light --bootnodesv4 <my_enode>. Still doesn't connect. In this case there's no debug entry.

When attaching to the light client node and issuing `admin.addPeer(), it successfully connects.

Am I misunderstanding what the --bootnodes param is for?
If not this way, how can I tell geth to connect to my full node on startup?

I just noticed that adding manually with admin.addPeer doesn't always work, probably because the full node has already maxPeers connected. Is it possible to configure the full node such that a given list of nodes is always allowed to connect (e.g. via reserved slots or higher priority)?

1 Answer 1


My understanding is that with --bootnodes you only specify the nodes to gossip with in order to find actual peers to exchange data with. So it's a pre-step before you start exchanging any useful blockchain data.

If you want to save a static peer connection (instead of adding it manually via admin.addPeer everytime), you need to create a config.toml file with the following content:

StaticNodes = ["<your-enode-goes-here>"]

and then run geth with --config /path/to/config.toml

As you have already observed though, this won't be enough to ensure the light client doesn't get kicked out by the server. Unfortunately there doesn't seem to be any (documented) way of achieving this currently.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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