|
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.
- U3 I4 g4 i7 m; j z; j2 qRequest timed out.
* ^- b5 t- W4 C. h7 z$ @Request timed out.
8 }. u- a+ f* u) R' F# F; d& mRequest timed out. Ping statistics for 10.1.1.2:
; D+ T' v5 j) \2 I: Z" m 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.- H" P) t4 |& t0 P0 ]( t) e- W
Request timed out.
8 s/ K2 x- F. a- `Request timed out.
& @, k# v1 w* z7 z1 YRequest timed out. Ping statistics for 192.168.3.2:
2 \/ q5 K7 o+ ]- d7 m 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
+ ^3 O/ W1 P% \Routing Tables: Public
$ U8 t- [, x1 G9 K3 c: f6 i 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
& d: A3 u" ]; O3 o2 U10.1.1.1/32 Direct 0 0 127.0.0.1 InLoop0* P+ x& s0 u$ Q5 w$ n, F
10.1.1.2/32 Direct 0 0 10.1.1.2 S0/0/0
9 G' [! Y0 g$ w& t$ a" s8 E9 d* E, P127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
* m* R( z. h3 R q9 p w/ v4 W127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
: t4 W+ G) u9 T: V/ y' Q192.168.2.0/24 Direct 0 0 192.168.2.1 Eth0/1/0
2 s3 ^# s: K1 w3 o( n8 j, y192.168.2.1/32 Direct 0 0 127.0.0.1 InLoop0
* ^- N+ U* w4 X9 m8 P5 v6 {192.168.3.0/24 Static 60 0 10.1.1.2 S0/0/0
2 j7 I1 N2 E% e* j; }9 i# p* j [h3c2]disp ip routing-table 6 d6 `: i$ @8 d8 u
Routing Tables: Public$ f' G4 H. r7 s7 Q; x$ c9 u
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/00 ?% R% l7 _1 g! i6 s
10.1.1.1/32 Direct 0 0 10.1.1.1 S0/0/0& a6 `' ?# R5 j. t$ m8 I3 [- C, a
10.1.1.2/32 Direct 0 0 127.0.0.1 InLoop0. d5 D' Q: o2 |, X
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0/ A1 M, E4 S8 R2 y b
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
- |' ]9 V" i+ X1 M: }& o& H, @192.168.2.0/24 Static 60 0 10.1.1.1 S0/0/02 @) F( e# N% f% L, s
192.168.3.2/32 Direct 0 0 127.0.0.1 InLoop0
" x0 h l3 Q& u' Y ^) |, V 此时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* N2 T( r( z3 p
Reply from 192.168.3.2: bytes=32 time=1ms TTL=254
- U( n4 }+ W1 ~; ^! j% m6 MReply from 192.168.3.2: bytes=32 time=3ms TTL=254* T( q& a; c4 l# I5 w/ m% U
Reply from 192.168.3.2: bytes=32 time=1ms TTL=254 Ping statistics for 192.168.3.2:$ Y8 g# z/ u# |) `
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
j$ i/ Z6 p% u# \Approximate round trip times in milli-seconds:
' F2 g! f' V! Z: E/ M( V& w5 e Minimum = 1ms, Maximum = 3ms, Average = 1ms* v! i0 u4 A+ H
RTA试用扩展PING从源地址ping目标成功。
% |5 }+ E S5 |3 y[h3c1]ping -a 192.168.2.1 192.168.3.2
% Z/ \" o* _$ t. W, O4 z3 W- l9 w PING 192.168.3.2: 56 data bytes, press CTRL_C to break- x8 l4 b# P D
Reply from 192.168.3.2: bytes=56 Sequence=1 ttl=255 time=5 ms
' E% y! a. D) |0 l Reply from 192.168.3.2: bytes=56 Sequence=2 ttl=255 time=20 ms
! F% k0 p1 D% ~9 Y8 y3 _ Reply from 192.168.3.2: bytes=56 Sequence=3 ttl=255 time=1 ms) \) t2 H* F8 d# J2 x4 w. v
Reply from 192.168.3.2: bytes=56 Sequence=4 ttl=255 time=1 ms: _" V5 Q3 j7 ?% t' L/ F) E
Reply from 192.168.3.2: bytes=56 Sequence=5 ttl=255 time=10 ms --- 192.168.3.2 ping statistics ---
, g! a0 O' \8 b 5 packet(s) transmitted
. w+ w! |1 I' [5 e* B/ d 5 packet(s) received/ Y1 B/ s9 w+ z/ K5 x; M$ A0 a
0.00% packet loss
6 K @2 @! q2 y/ e2 t 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.1
! Y5 g- u5 Z9 b6 ` 2 1 ms <1 ms <1 ms 192.168.3.2 Trace complete. 9 k$ f5 }/ s7 |$ t
|