Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to add a local loopback address for CentOS7

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report