[root@localhost 桌面]# ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 1760 bytes 314800 (307.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1760 bytes 314800 (307.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@localhost 桌面]# dhclient -v
Internet Systems Consortium DHCP Client 4.2.5
Copyright 2004-2013 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eno16777736/00:0c:29:10:0a:e3
Sending on LPF/eno16777736/00:0c:29:10:0a:e3
Sending on Socket/fallback
DHCPREQUEST on eno16777736 to 255.255.255.255 port 67 (xid=0xfb599af)
DHCPREQUEST on eno16777736 to 255.255.255.255 port 67 (xid=0xfb599af)
DHCPNAK from 192.168.203.17 (xid=0xfb599af)
DHCPDISCOVER on eno16777736 to 255.255.255.255 port 67 interval 8 (xid=0x48d1388)
DHCPREQUEST on eno16777736 to 255.255.255.255 port 67 (xid=0x48d1388)
DHCPOFFER from 192.168.203.17
DHCPACK from 192.168.203.17 (xid=0x48d1388)
bound to 192.168.201.172 -- renewal in 13977 seconds.
[root@localhost 桌面]#
[root@localhost 桌面]# ifconfig
eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.201.172 netmask 255.255.252.0 broadcast 192.168.203.255
inet6 fe80::20c:29ff:fe10:ae3 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:10:0a:e3 txqueuelen 1000 (Ethernet)
RX packets 184 bytes 16340 (15.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 41 bytes 5589 (5.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 1870 bytes 329618 (321.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1870 bytes 329618 (321.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
VMware ip变成127.0.0.1
最新推荐文章于 2024-07-02 09:49:38 发布
本文展示了如何在Linux环境下查看网络接口状态并使用DHCP客户端获取IP地址的过程。通过ifconfig命令检查本地回环及以太网接口详情,并记录了dhclient工具交互过程,最终成功获得192.168.201.172的IP地址。
1万+

被折叠的 条评论
为什么被折叠?



