测试网络的连通性:
[root@localhost ~]# ping -c 3 a.b.c.d
检查网络接口状态:
[root@localhost ~]# ifconfig -a
关闭网络接口eth0:
[root@localhost ~]# ifconfig eth0 down
打开网络接口eth0:
[root@localhost ~]# ifconfig eth0 up
为网络接口eth0设置网址:
[root@localhost ~]# ifconfig eth0 a.b.c.d netmask 255.255.255.0
查看内核路由表的配置:
[root@localhost ~]# route
添加默认网关:
[root@localhost ~]# route add default gw a.b.c.d
显示数据包所经过的路由:
[root@localhost ~]# traceroute a.b.c.d
显示网络端口状态:
[root@localhost ~]# netstat -penal
No comments:
Post a Comment
Note: only a member of this blog may post a comment.