|
attach://197.png C:\Documents and Settings\xiaofei>ping 10.1.1.2 Pinging 10.1.1.2 with 32 bytes of data: Request timed out.( J$ D" n1 e" t& E: x1 P
Request timed out.0 J! B0 |. {4 [" c& u4 n4 w+ j g
Request timed out.# r# m6 H- A1 ?3 Q( q
Request timed out. Ping statistics for 10.1.1.2:1 f# U5 v& t" J
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss), C:\Documents and Settings\xiaofei>ping 192.168.3.2 Pinging 192.168.3.2 with 32 bytes of data: Request timed out.. f) ~7 V) L! x; f" A
Request timed out.! D8 T7 b0 X# J! b5 H
Request timed out.
% @9 M: e/ d+ N9 g) ~. k$ b+ w7 ARequest timed out. Ping statistics for 192.168.3.2: s3 h) q9 j5 G! G4 L
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss), C:\Documents and Settings\xiaofei> PCA处于单独一个网段,想要访问PCB,通过路由转发数据跨网段需要做路由,此时可以使用静态路由来实现。 [RTA]ip route-static 192.168.3.0 255.255.255.0 10.1.1.2 指定目标网段以及下一跳出口 [RTB]ip route-static 192.168.2.0 255.255.255.0 10.1.1.1 此时RTA,B上都有对端网段的路由: [h3c1]disp ip routing-table
% p% I' J4 a# x2 @! PRouting Tables: Public
0 [3 l7 P1 m$ M# Z, d8 H0 M Destinations : 8 Routes : 8 Destination/Mask Proto Pre Cost NextHop Interface 10.1.1.0/24 Direct 0 0 10.1.1.1 S0/0/0
6 M$ t5 y, M$ J- S10.1.1.1/32 Direct 0 0 127.0.0.1 InLoop0& e$ n+ d) X/ q% v
10.1.1.2/32 Direct 0 0 10.1.1.2 S0/0/0
\, O: d0 e& H _- z4 f M127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
( z2 g! F- \6 u, P& O7 L. \127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
. t. ^3 X( S$ V# y: Z$ z192.168.2.0/24 Direct 0 0 192.168.2.1 Eth0/1/03 a% {+ N9 w) ?9 T, J4 z' H3 R6 b
192.168.2.1/32 Direct 0 0 127.0.0.1 InLoop0
+ H/ B7 n% c, [/ S' ?" V# N192.168.3.0/24 Static 60 0 10.1.1.2 S0/0/0
+ ?2 O0 P% t. m4 T [h3c2]disp ip routing-table
* h: R$ B9 a2 q2 R6 ~" t" Y7 QRouting Tables: Public
9 A; }' @ H/ O. b% ]$ K4 c Destinations : 7 Routes : 7 Destination/Mask Proto Pre Cost NextHop Interface 10.1.1.0/24 Direct 0 0 10.1.1.2 S0/0/0
}4 ~. N- v5 c0 e8 Y$ U$ q2 W7 l$ c0 A10.1.1.1/32 Direct 0 0 10.1.1.1 S0/0/0
6 R# p+ l/ f( {( A. i5 H3 ~10.1.1.2/32 Direct 0 0 127.0.0.1 InLoop03 I* {- l6 S6 X" m" `6 N
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0+ {* ]; @7 G7 j* d7 ?2 w
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0& o9 M. m* j# E6 P& g2 m
192.168.2.0/24 Static 60 0 10.1.1.1 S0/0/0
9 b' H& _2 E* r$ a2 s( _0 V9 p$ N4 d192.168.3.2/32 Direct 0 0 127.0.0.1 InLoop0) A( X; B4 ]1 g K
此时PCAPCB可以相互访问; C:\Documents and Settings\xiaofei>ping 192.168.3.2 Pinging 192.168.3.2 with 32 bytes of data: Reply from 192.168.3.2: bytes=32 time=1ms TTL=254
: Q% T; `8 }3 o, k! Y/ @Reply from 192.168.3.2: bytes=32 time=1ms TTL=254
" I+ F& N/ p% E# }0 U/ S* MReply from 192.168.3.2: bytes=32 time=3ms TTL=254 u0 K0 ]1 T( Y% G' k3 l7 p
Reply from 192.168.3.2: bytes=32 time=1ms TTL=254 Ping statistics for 192.168.3.2:
0 T- n3 ?6 p+ e1 g Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),4 X- L: X# d" m/ E8 ~" Z
Approximate round trip times in milli-seconds: j" D/ p4 X+ t
Minimum = 1ms, Maximum = 3ms, Average = 1ms
7 `9 F0 N& N/ ]* y# c5 A1 X RTA试用扩展PING从源地址ping目标成功。 z1 Z# F; W9 _; ^1 L ] J" n
[h3c1]ping -a 192.168.2.1 192.168.3.2
+ b1 ^: E% M0 J7 g2 j5 |7 c, [ PING 192.168.3.2: 56 data bytes, press CTRL_C to break
$ Q4 @7 a& r- j* B Reply from 192.168.3.2: bytes=56 Sequence=1 ttl=255 time=5 ms
6 f7 H3 s6 R* ^% V% y3 f Reply from 192.168.3.2: bytes=56 Sequence=2 ttl=255 time=20 ms' N9 f! ?, P! L
Reply from 192.168.3.2: bytes=56 Sequence=3 ttl=255 time=1 ms
: o% U: _* H+ P6 a Reply from 192.168.3.2: bytes=56 Sequence=4 ttl=255 time=1 ms
& N7 a8 w0 Y) O% R Reply from 192.168.3.2: bytes=56 Sequence=5 ttl=255 time=10 ms --- 192.168.3.2 ping statistics ---
: D$ P% `; |' ]' W, Y 5 packet(s) transmitted% s9 |9 v+ x9 ^4 T: [
5 packet(s) received
9 K2 s8 \% t' Y8 y+ V 0.00% packet loss
& o* `! _* T3 \1 W round-trip min/avg/max = 1/7/20 ms 用路由追踪发现经过的路由到达目的网络。 C:\Documents and Settings\xiaofei>tracert 192.168.3.2 Tracing route to 192.168.3.2 over a maximum of 30 hops 1 <1 ms <1 ms <1 ms 192.168.2.16 v8 d0 B+ V9 B% J0 I
2 1 ms <1 ms <1 ms 192.168.3.2 Trace complete. 4 P# U9 t' m; x J* A. v/ p
|