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

Why does ifconfig not display the corresponding IP information?

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

Share

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

This article will explain in detail why ifconfig does not display the corresponding IP information, and the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

The server used to be able to reach 192.167.10.11, but now suddenly the ping is different.

1. Neither ifconfig nor ip addr can see the IP of the native network segment 192.168.10.

2. Cat / etc/sysconfig/network-scripts/ifcfg-em2 found the IP of 192.168.10 network segment, thought the network cable had been unplugged, and then went to the computer room to see that the network cable was plugged in.

3. Continue the query to find the ONBOOT=no corresponding to the IP of the 192.168.10 network segment. Solve the problem after re-ifconfig em2 up.

[root@ebsdev ~] # history | grep mount

704 mount 192.167.10.11:/volume1/dbsbak / dbsbak

742 umount / dbsbak

-- ifconfig does not show IP of the 192.168.10 network segment

[root@ebsdev vbpbak] # ifconfig

Em2 Link encap:Ethernet HWaddr A4:BA:DB:36:9B:38

Inet6 addr: fe80::a6ba:dbff:fe36:9b38/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:31624404 errors:0 dropped:0 overruns:0 frame:0

TX packets:3 errors:0 dropped:0 overruns:0 carrier:0

Collisions:0 txqueuelen:1000

RX bytes:2783785598 (2.5GiB) TX bytes:270 (270.0 b)

128 Link encap:Ethernet HWaddr A4:BA:DB:36:9B:37

Inet addr:192.168.128.172 Bcast:192.168.128.255 Mask:255.255.255.0

Inet6 addr: fe80::a6ba:dbff:fe36:9b37/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:139452228 errors:0 dropped:0 overruns:0 frame:0

TX packets:31576165 errors:0 dropped:0 overruns:0 carrier:0

Collisions:0 txqueuelen:1000

RX bytes:38000646597 (35.3 GiB) TX bytes:24891534426 (23.1 GiB)

Lo Link encap:Local Loopback

Inet addr:127.0.0.1 Mask:255.0.0.0

Inet6 addr: 1/128 Scope:Host

UP LOOPBACK RUNNING MTU:16436 Metric:1

RX packets:731881261 errors:0 dropped:0 overruns:0 frame:0

TX packets:731881261 errors:0 dropped:0 overruns:0 carrier:0

Collisions:0 txqueuelen:0

RX bytes:116710422261 (108.6 GiB) TX bytes:116710422261 (108.6 GiB)

-- ip addr does not show IP of the 192.168.10 network segment

[root@ebsdev vbpbak] # ip addr

1: lo: mtu 16436 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

Inet6:: 1/128 scope host

Valid_lft forever preferred_lft forever

2: 128: mtu 1500 qdisc mq state UP qlen 1000

Link/ether a4:ba:db:36:9b:37 brd ff:ff:ff:ff:ff:ff

Inet 192.168.128.172/24 brd 192.168.128.255 scope global 128

Inet6 fe80::a6ba:dbff:fe36:9b37/64 scope link

Valid_lft forever preferred_lft forever

3: em2: mtu 1500 qdisc mq state UP qlen 1000

Link/ether a4:ba:db:36:9b:38 brd ff:ff:ff:ff:ff:ff

Inet6 fe80::a6ba:dbff:fe36:9b38/64 scope link

Valid_lft forever preferred_lft forever

[root@ebsdev vbpbak] # cat / etc/sysconfig/network-scripts/ifcfg-128

HWADDR=A4:BA:DB:36:9B:37

TYPE=Ethernet

BOOTPROTO=none

IPADDR=192.168.128.172

PREFIX=24

GATEWAY=192.168.128.1

DEFROUTE=yes

IPV4_FAILURE_FATAL=yes

IPV6INIT=no

NAME=128

UUID=4c153aa8-ab08-48d0-995a-87a8e0c681a9

ONBOOT=yes

DEVICE=128

USERCTL=no

NETMASK=255.255.255.0

IP with 192.168.10 network segment

[root@ebsdev vbpbak] # cat / etc/sysconfig/network-scripts/ifcfg-em2

DEVICE=em2

HWADDR=a4:ba:db:36:9b:38

TYPE=Ethernet

UUID=5de6d96b-6691-4a3d-ac3c-1eda48ca9db8

ONBOOT=no

NM_CONTROLLED=yes

BOOTPROTO=none

IPADDR=192.167.10.25

NETMASK=255.255.255.0

IPV6INIT=no

USERCTL=no

Solution method

Ifconfig em2 up

About why ifconfig did not show the corresponding IP information to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

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