How to add a local loopback address for CentOS7
This article mainly introduces CentOS7 how to add local loopback address, the article is very detailed, has a certain reference value, interested friends must read it!
1. Add temporarily
Ip addr add 10.10.1.1/32 dev lo:1
Restart failure
2. Permanently add
Cd / etc/sysconfig/network-scripts
Cp ifcfg-lo ifcfg-lo:1
[root@localhost network-scripts] # cat ifcfg-lo:1
DEVICE=lo:1
IPADDR=10.10.1.1
NETMASK=255.255.255.255
ONBOOT=yes
NAME=loopback1
[root@localhost network-scripts] # ip addr
1: lo: mtu 65536 qdisc noqueue state UNKNOWN
Link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
Inet 127.0.0.1/8 scope host lo
Valid_lft forever preferred_lft forever
Inet 10.10.1.1/32 brd 10.10.1.1 scope global lo:1
Valid_lft forever preferred_lft forever
Inet6:: 1/128 scope host
Valid_lft forever preferred_lft forever
[root@localhost network-scripts] # ping-C1 10.10.1.1
PING 10.10.1.1 (10.10.1.1) 56 (84) bytes of data.
64 bytes from 10.10.1.1: icmp_seq=1 ttl=64 time=0.045 ms
The above is all the contents of the article "how to add a local loopback address in CentOS7". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!