Linux command
bootnode 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Generate a node key
bootnode -genkey [node.key]
Run a bootnode
bootnode -nodekey [node.key]
Run on specific address
bootnode -nodekey [node.key] -addr [192.168.1.1:30301]
Write node URL
bootnode -nodekey [node.key] -writeaddress
Run with verbosity
bootnode -nodekey [node.key] -verbosity [4]
说明
bootnode runs a bootstrap node for the Ethereum Discovery Protocol. Bootstrap nodes help new nodes discover and connect to peers in the Ethereum network without being full nodes themselves. The tool is part of the go-ethereum (geth) project and implements the Node Discovery Protocol v4 and v5, enabling peer-to-peer network formation.
参数
- -genkey _file_
- Generate a new node key and save to file
- -nodekey _file_
- Path to the node's private key file
- -addr _ip:port_
- Listen address (default: :30301)
- -writeaddress
- Write the node's public key/URL to stdout
- -verbosity _level_
- Logging verbosity (0=silent, 5=detail)
- -nat _method_
- NAT port mapping mechanism (none, upnp, pmp, extip:IP)
- -netrestrict _CIDR_
- Restrict network communication to given CIDR
- -v5
- Enable Discovery v5 protocol
FAQ
What is the bootnode command used for?
bootnode runs a bootstrap node for the Ethereum Discovery Protocol. Bootstrap nodes help new nodes discover and connect to peers in the Ethereum network without being full nodes themselves. The tool is part of the go-ethereum (geth) project and implements the Node Discovery Protocol v4 and v5, enabling peer-to-peer network formation.
How do I run a basic bootnode example?
Run `bootnode -genkey [node.key]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -genkey _file_ do in bootnode?
Generate a new node key and save to file