It was not the first time to configure the Ubuntu network. I encountered an error today. I have never encountered it before. I feel very depressed! When/etc/init. d/networkingrestart is used, RTNETLINKanswers: Fileexists is displayed, which means it is very depressing. Then, ping it and the system prompts that the network is inaccessible. After reading the route table and finding that there is no gateway, run the command to add the gateway # routeadddefaultgw1.1.1.
It was not the first time to configure the Ubuntu network. I encountered an error today. I have never encountered it before. I feel very depressed!
When/etc/init. d/networking restart is used
RTNETLINK answers: File exists
It means it is very depressing, and then ping it, prompting that the network is inaccessible. After reading the route table and finding that there is no gateway, run the command to add the gateway.
# Route add default gw 1.1.1.254
Result, an error is returned.
SIOCADDRT: no such process. frustrating error.
I found some information on the Internet and did not solve the problem. Finally, I found that the configuration file was wrong.
- Root @ node1:/etc/network # cat interfaces
- # This file describes the network interfaces available on your system
- # And how to activate them. For more information, see interfaces (5 ).
-
- # The loopback network interface
- Auto lo
- Iface lo inet loopback
-
- # The primary network interface
- Auto eth0
- Iface eth0 inet static
- Address 1.1.1.1
- Metmask 255.0.0.0
- Gateway 1.1.1.254
- Dns-nameservers 1.1.1.254
The input may be too fast. I wrote netmask as metmask and noted it down!