VMware ip变成127.0.0.1

本文展示了如何在Linux环境下查看网络接口状态并使用DHCP客户端获取IP地址的过程。通过ifconfig命令检查本地回环及以太网接口详情,并记录了dhclient工具交互过程,最终成功获得192.168.201.172的IP地址。
[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

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值