Centos6 不能与windows互ping问题 使用了桥连接,应用NET格式
Centos7
关闭防火墙:systemctl stop firewalld.service
systemctl disable firewlld
重启网卡:systemctl restart network
别的版本命令:service network restart
查看版本命令:
cat /etc/redhat-release
ip地址查询 ip addr
- 在ens33 中 的inet的值就是ip 如果没有,则查看ens33的网卡配置,命令: vi /etc/sysconfig/network-scripts/ifcfg-ens3
- 查看最后一行 ONBOOT=no 默认不启动
- 修改为ONBOOT=yes
- 重启网卡: sudo service network restart
- 查看IP地址:ip addr show 或 ip addr show ens33
- 设置IP地址:ip addr add 192.168.1.1/24 dev ens33
- 删除IP地址:ip addr del 192.168.1.1 dev ens33
Centos6
防火墙:service iptables stop service iptables start
chkconfig iptables off chkconfig iptables on
service iptables restart
ip地址查询 ifconfig