- ifconfig :查看网络配置,显示已启用的网络接口信息
(1)-a :查看所有网络接口
Ifconfig ens33 查看指定接口ens33信息 //centos7
Ifconfig eth0 查看指定接口eth0信息 //centos6
ens33/eth0:网卡接口 lo:回环网络接口
ether:MAC地址 inet:IP地址
broadcast:广播地址 netmask:子网掩码
TX:发送数据包个数及流量
RX:接受数据包个数及流量
(2)修改网卡地址、状态
修改网卡地址:ifconfig ens33 192.168.127.20
禁用、启用网络接口:ifconfig ens33 down/up
ifdown/ifup ens33
释放IP:win10:ipconfig /release
centos7:dhclient -r
获取IP:win10:ipconfig /renew
centos7:dhclient -d ens33
绑定虚接口,即一网卡多IP:ifconfig ens33:10 172.12.127.30 - ip/ethtool:指定参数查看网络接口,比ifconfig更详细
如:ip link:查看数据链路层信息 ip address:查看网络层信息
ethtool eth0 查看指定网络接口速率、模式等信息 - route:查看当前主机路由表信息
(1)destination:目标网段
linux基础网络设置和静态IP
最新推荐文章于 2024-07-25 15:50:18 发布