|
|
我按北南南北兄所说的方法(http://www.linuxsir.cn/main/?q=n ... 系统是:CentOS X86_64 4.2
ifconfig
- [root@alfa network-scripts]# /sbin/ifconfig
- eth0 Link encap:Ethernet HWaddr 00:00:E8:AE:14:5B
- inet addr:192.168.0.2 Bcast:192.168.0.2 Mask:255.255.255.255
- inet6 addr: fe80::200:e8ff:feae:145b/64 Scope:Link
- UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
- RX packets:1815 errors:0 dropped:0 overruns:0 frame:236
- TX packets:849 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:1000
- RX bytes:352137 (343.8 KiB) TX bytes:51202 (50.0 KiB)
- Interrupt:217 Base address:0xe000
- lo Link encap:Local Loopback
- inet addr:127.0.0.1 Mask:255.0.0.0
- inet6 addr: ::1/128 Scope:Host
- UP LOOPBACK RUNNING MTU:16436 Metric:1
- RX packets:1662 errors:0 dropped:0 overruns:0 frame:0
- TX packets:1662 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:0
- RX bytes:1924588 (1.8 MiB) TX bytes:1924588 (1.8 MiB)
- ppp0 Link encap:Point-to-Point Protocol
- inet addr:221.223.96.192 P-t-P:221.223.96.1 Mask:255.255.255.255
- UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
- RX packets:918 errors:0 dropped:0 overruns:0 frame:0
- TX packets:417 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:3
- RX bytes:108031 (105.4 KiB) TX bytes:17234 (16.8 KiB)
复制代码
netstat -nr
- [root@alfa network-scripts]# netstat -nr
- Kernel IP routing table
- Destination Gateway Genmask Flags MSS Window irtt Iface
- 221.223.96.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
- 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
- 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
- 0.0.0.0 221.223.96.1 0.0.0.0 UG 0 0 0 ppp0
复制代码
ping 网关
- [root@alfa network-scripts]# ping 221.223.96.1
- PING 221.223.96.1 (221.223.96.1) 56(84) bytes of data.
- 64 bytes from 221.223.96.1: icmp_seq=0 ttl=255 time=11.7 ms
- wrong data byte #22 should be 0x16 but was 0x0
- #16 10 11 12 13 14 15 0 87 36 99 0 87 36 99 0 87 36 99 0 87 36 99 16 17 18 19 16 17 18 19 16 17
- #48 18 19 95 ea 0 0 95 ea
- 64 bytes from 221.223.96.1: icmp_seq=1 ttl=255 time=20.5 ms
- wrong data byte #22 should be 0x16 but was 0x0
- #16 10 11 12 13 14 15 0 0 e8 ae 0 0 e8 ae 0 0 e8 ae 16 17 18 15 16 17 18 19 16 17 18 19 16 17
- #48 18 19 14 5b 0 e0 14 5b
- 64 bytes from 221.223.96.1: icmp_seq=2 ttl=255 time=20.0 ms
- wrong data byte #22 should be 0x16 but was 0xb6
- #16 10 11 12 13 14 15 b6 21 0 0 b6 21 0 0 b6 21 0 0 16 17 18 15 16 17 18 19 16 17 18 19 16 17
- #48 18 19 0 0 70 2 0 0
- 64 bytes from 221.223.96.1: icmp_seq=3 ttl=255 time=19.8 ms
- wrong data byte #22 should be 0x16 but was 0x0
- #16 10 11 12 13 14 15 0 0 68 11 0 0 68 11 0 0 68 11 16 17 18 15 16 17 18 19 16 17 18 19 16 17
- #48 18 19 42 18 58 49 42 18
- --- 221.223.96.1 ping statistics ---
- 4 packets transmitted, 4 received, 0% packet loss, time 3003ms
- rtt min/avg/max/mdev = 11.788/18.049/20.521/3.623 ms, pipe 2
复制代码
ping sina
- [root@alfa network-scripts]# ping www.sina.com.cn
- ping: unknown host www.sina.com.cn
复制代码 |
|