Chinaunix首页 | 论坛 | 博客
  • 博客访问: 30113
  • 博文数量: 31
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 330
  • 用 户 组: 普通用户
  • 注册时间: 2015-01-12 10:38
文章分类

全部博文(31)

文章存档

2015年(31)

我的朋友

分类: LINUX

2015-01-13 15:34:28

临时更改ip地址,重启后无效。
ifconfig eth0 192.168.4.7
IP:
子网掩码: 255.255.255.0
默认网关:
DNS:

更改生效网络
service network restart

traceroute某个网站的网络路径。
css@csc:~/test$ traceroute
traceroute to (202.108.33.60), 30 hops max, 60 byte packets
 1  * * *
 2  localhost (192.168.100.253)  0.569 ms  0.576 ms  0.706 ms
 3  124.65.133.153 (124.65.133.153)  2.025 ms  2.256 ms  2.437 ms
 4  124.65.236.249 (124.65.236.249)  2.046 ms  2.747 ms  3.747 ms
 5  61.51.113.89 (61.51.113.89)  5.137 ms  5.243 ms  5.069 ms
 6  61.51.112.33 (61.51.112.33)  3.669 ms 61.51.112.45 (61.51.112.45)  4.337 ms 124.65.56.117 (124.65.56.117)  5.321 ms
 7  61.148.143.22 (61.148.143.22)  1.680 ms 61.148.143.26 (61.148.143.26)  17.453 ms 61.148.143.22 (61.148.143.22)  1.553 ms
 8  210.74.176.138 (210.74.176.138)  1.906 ms  1.812 ms  1.974 ms
 9  202.108.33.53 (202.108.33.53)  1.633 ms  1.520 ms  1.664 ms
10  * * *
11  * * *
12  * * *
13  * * *
14  * * 202.108.33.53 (202.108.33.53)  1.775 ms !H

netstat 查看网络, 
-t  tcp
-u udp
-l   监听
-r  路由
-n 显示IP地址

netstat -tlun  本机监听的端口
netstat -an     本机所有的网络链接
netstat -rn      本机路由表

Apache端口是80, 没有显示表示没有没有Apache。
css@csc:~/test$ netstat -tlun
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN     
tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     
tcp6       0      0 ::1:631                 :::*                    LISTEN     
tcp6       0      0 :::22                   :::*                    LISTEN     
udp        0      0 0.0.0.0:631             0.0.0.0:*                          
udp        0      0 0.0.0.0:5353            0.0.0.0:*                          
udp        0      0 127.0.1.1:53            0.0.0.0:*                      

查看网关-rn。
css@csc:~/test$ netstat -rn
内核 IP 路由表
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.4.254   0.0.0.0         UG        0 0          0 eth0
192.168.4.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0




阅读(734) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~