ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

redhat8中如何重启网络服务

2022-05-12 00:01:58  阅读:474  来源: 互联网

标签:66.14 网络服务 root 重启 PC1 bytes 64 39.156 redhat8


 

1、系统

[root@PC1 network-scripts]# hostnamectl
   Static hostname: PC1
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 7d8c7dacd42740ff9603a3e8bbf222da
           Boot ID: 2111150973e94f82bb5297c08639adf4
    Virtualization: vmware
  Operating System: Red Hat Enterprise Linux 8.5 (Ootpa)
       CPE OS Name: cpe:/o:redhat:enterprise_linux:8::baseos
            Kernel: Linux 4.18.0-348.el8.x86_64
      Architecture: x86-64

 

2、重启网络服务: nmcli c reload ens160 (ens160为网卡名称)

[root@PC1 network-scripts]# ifconfig | head
ens160: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 00:0c:29:a8:a2:ab  txqueuelen 1000  (Ethernet)
        RX packets 26  bytes 1847 (1.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        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>
[root@PC1 network-scripts]# nmcli c reload ens160               ## 重启网络服务
[root@PC1 network-scripts]# ifconfig | head
ens160: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.3.33  netmask 255.255.255.0  broadcast 192.168.3.255
        inet6 fe80::20c:29ff:fea8:a2ab  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:a8:a2:ab  txqueuelen 1000  (Ethernet)
        RX packets 29  bytes 2039 (1.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 28  bytes 3328 (3.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

 

3、测试网络

[root@PC1 network-scripts]# ping -c 3 www.baidu.com
PING www.a.shifen.com (39.156.66.14) 56(84) bytes of data.
64 bytes from 39.156.66.14 (39.156.66.14): icmp_seq=1 ttl=51 time=11.7 ms
64 bytes from 39.156.66.14 (39.156.66.14): icmp_seq=2 ttl=51 time=11.7 ms
64 bytes from 39.156.66.14 (39.156.66.14): icmp_seq=3 ttl=51 time=11.5 ms

--- www.a.shifen.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 11.548/11.648/11.700/0.143 ms

 

标签:66.14,网络服务,root,重启,PC1,bytes,64,39.156,redhat8
来源: https://www.cnblogs.com/liujiaxin2018/p/16260544.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有