centos7网络问题解决命令:

小伙伴肯定经常在装了Linux系统以后出现网络一系列的网络问题:

	比如设置静态网络以后网卡需要重启,重启后发现还是不能远程连接等等;
	这种情况就必须去看你windows的网络配置,VMnet8是否开启,然后去cmd界面ping你的虚拟机IP是否能ping通,然后虚拟机去ping主机(windows)的ip看是否能ping通,如果都能通,那说明远程连接应该是没有问题的。
	
	附上一些centos的关于网卡的命令:
		(1)查看网卡状态:systemctl status network
		(2)启动网卡:systemctl start network
		(3)重启网卡:systemctl restart network 或者 service network restart
		(4)指定网卡启动:ifup [网卡名称]
	防火墙命令:	
		(1)设置开机启用防火墙:systemctl enable firewalld.service
		(2)设置开机禁用防火墙:systemctl disable firewalld.service
		(3)启动防火墙:systemctl start firewalld
		(4)关闭防火墙:systemctl stop firewalld
		(5)检查防火墙状态:systemctl status firewall
	修改临时IP命令(重启网卡或者重启系统会失效):
			8.修改 临时IP 地址	 ifconfig eth0 192.168.0.2   netmask 255.255.255.0
Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐