Linux deploying Ethereum
1.下载安装包:ethtool-3.15.tar.gz,将其放入自己的路径下,解压:tarzxvfethtool-3.15.tar.gz
2.编译安装:
cdethtool-3.15
sudo./configure
sudomake
sudomakeinstall
3.ethtool-sethX[speed10|100|1000]//设置网口速率10/100/1000M
[plexhalf|full]//设置网口半/全双工
[autonegon|off]//设置网口是否自协商
例如:ethtool-
In practical work, we often encounter the operation of restarting the network card in Linux system. There are three methods as follows:
1, service network restart
< UL >you can use CRT tools to connect to the Linux command line interface; You can also enter the operating system interface, and then select the terminal input:
3, ifconfig eth0 up can be used to start the network card
Ifconfig eth0 down can be used to disable the NICIt is a kind of optical fiber Ethernet interface card, which transmits signals according to Ethernet communication protocol. It is generally connected with optical fiber Ethernet switch through optical cable
eth0 and eth1 are used to distinguish network card names. They have the same meaning as windows local connection 1 and local connection 2
the subnet card here is not a practical network interface, but it can flash in the system as a collection interface, such as eth0:1, eth1:2
extended data:
linux operating system embeds TCP / IP protocol stack, and protocol software has routing and forwarding function. Routing and forwarding rely on the installation of multiple network cards in the host as routers
when a network card receives a degree packet, the system kernel will query the routing table according to the destination IP address of the degree packet, then send the degree packet to another network card according to the query result, and finally send the degree packet through the network card. The process of host is the core function of router
routing function is realized by modifying Linux kernel parameters. The sysctl command is used to configure and display kernel parameters in the / proc / sys directory
for security reasons, Linux kernel forbids packet routing and forwarding by default. In Linux system, there are two ways to enable forwarding function: temporary and permanent
for example, the existing / etc / sysconfig / network scripts / eth0
can be roughly as follows:
device = eth0
onboot = yes
bootproto = static
iPad Dr = 192.168.1.20
netmask = 255.255.255.0
gateway = 192.168.1.255
an existing configuration file and change it to eth1 iPad If Dr is changed to 192.168.1.21, an eth1 with IP 192.168.1.21 will appear
then VI ifcfg-eth1
according to the parameter settings in it, you can
the easiest way is if you have the installation of subset
use subset
If you set onboot = yes
ifconfig eth0, you can see IP
and the network of the virtual machine is set to bridge,
as shown in the figure:

how to set IP in Linux? How to set eth0
after setting, check whether the network is set successfully, and select ifconfig in the command
how to set IP in Linux? How to set eth0
you can view the IP information added to eth0 in iner addr: 192.168.1.12. It indicates that the setting is successful
how to set IP in Linux? How to set eth0
in order to continue to use the network after the next restart, you need to write the network to the file, count it into / etc / sysconfig / network scripts, and find the one named ifcfg-eth0
how to set IP in Linux? How to set eth0
VI ifcfg-eth0. Is entered into this file. Enter the file
Add configuration:
IPADDR = 192.168.1.101
netmask = 255.255.255.0
gateway = 192.168.1.1
Modify: onboot = yes
how to set IP in Linux? How to set eth0
6
after setting the network successfully, you need to restart the network, service network restart network. Then check the network again
how to set IP in Linux? How to set eth0
