Ale*_*lex 1 networking ethernet
我需要创建本地环回,如下所示:Performing Loopback Testing for Fast Ethernet and Gigabit Ethernet Interfaces。
摘抄配置本地环回操作
要在不将传输端口物理连接到接收端口的情况下配置本地环回,请执行以下步骤:
在配置模式下,转到以下层次结构级别:
[编辑]
user@host# 编辑接口接口名称(fastether-options | gigether-options)
配置本地环回:
[编辑接口接口名称(fastether-options | gigether-options)]
user@host# 设置环回
小智 5
这是他们关于接口创建的文档,标题为:Red Hat Enterprise Linux 3:参考指南 - 第 8 章网络接口。
如果它不存在,请添加此行 /etc/hosts
127.0.0.1 localhost localhost.localdomain
Run Code Online (Sandbox Code Playgroud)以 root 身份运行以下命令
# ifconfig lo 127.0.0.1
# route add 127.0.0.1
Run Code Online (Sandbox Code Playgroud)测试接口
# ifconfig lo
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:60 errors:0 dropped:0 overruns:0 frame:0
TX packets:60 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
# ping localhost
PING localhost (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=0.3 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=255 time=0.2 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=255 time=0.1 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=255 time=0.1 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=255 time=0.2 ms
64 bytes from 127.0.0.1: icmp_seq=5 ttl=255 time=0.1 ms
--- localhost ping statistics ---
6 packets transmitted, 6 packets received, 0% packet loss
round-trip min/avg/max = 0.1/0.1/0.3 ms
Run Code Online (Sandbox Code Playgroud)