马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
x
https://www.bbs168x.cn/forum.php?mod=attachment&aid=MTk3fDlhZTJiZjg3fDE3NzU2NTA5MTR8MHw%3D C:\Documents and Settings\xiaofei>ping 10.1.1.2 Pinging 10.1.1.2 with 32 bytes of data: Request timed out., \* g p7 R6 O$ }4 P$ T8 [- o
Request timed out.0 @1 o0 p- x4 E" j D
Request timed out.4 d3 R \# J, Q! {1 |3 T h/ X/ _
Request timed out. Ping statistics for 10.1.1.2:& F) T- H% k5 |5 A0 f1 B
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.
1 l {7 H. _+ J/ u' L5 ^( ^5 j zRequest timed out.
/ z8 u2 b+ S% i" a, l rRequest timed out.
+ J9 {8 ^; O: e$ }Request timed out. Ping statistics for 192.168.3.2:
6 ~8 p9 R) @3 S. h: t. F. Y 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
# c6 J% i3 m5 o7 V6 g3 MRouting Tables: Public
" ?/ |7 ]* W, D: H 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/05 W5 A0 c) N2 O5 J% g
10.1.1.1/32 Direct 0 0 127.0.0.1 InLoop07 l4 q S$ \/ g& w& L" p
10.1.1.2/32 Direct 0 0 10.1.1.2 S0/0/03 Q9 y# V6 g1 {# Y
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
: p- `+ P3 J J6 T127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0/ a6 @' y. f- j# o. y' k2 I9 v
192.168.2.0/24 Direct 0 0 192.168.2.1 Eth0/1/0
3 i$ q8 x* D* ~6 l' |2 p192.168.2.1/32 Direct 0 0 127.0.0.1 InLoop0
# G9 \- |* C( J7 h' y! V' c3 Q6 o+ K192.168.3.0/24 Static 60 0 10.1.1.2 S0/0/0
7 _) n( N" Z2 h [h3c2]disp ip routing-table % M6 B0 X# T" r' i: v
Routing Tables: Public
+ F, d3 z, K, R$ p# g# N 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$ f( r/ x. \' V, B
10.1.1.1/32 Direct 0 0 10.1.1.1 S0/0/0
: M& ?. k& s7 ?) x6 D4 {) b10.1.1.2/32 Direct 0 0 127.0.0.1 InLoop0. H! T/ f8 v; y# I% r( L) l
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
, }- w+ k8 T/ I6 { D% |127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop00 Q3 e, j v2 T( G0 ^4 g! {+ M
192.168.2.0/24 Static 60 0 10.1.1.1 S0/0/0+ B3 Z+ }/ I4 E* k
192.168.3.2/32 Direct 0 0 127.0.0.1 InLoop0' K: ~; y9 r) V0 Q
此时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$ |6 K) ]9 W' i
Reply from 192.168.3.2: bytes=32 time=1ms TTL=254& j% e0 o( s3 m3 N
Reply from 192.168.3.2: bytes=32 time=3ms TTL=254& [+ A8 l: \% t; w4 w
Reply from 192.168.3.2: bytes=32 time=1ms TTL=254 Ping statistics for 192.168.3.2:
+ G/ F0 v. O2 z& ~ n; o7 W" I( q Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),8 H0 X2 q, v* Z
Approximate round trip times in milli-seconds:
5 M+ A* q# v9 ^, O/ h" r* h" O Minimum = 1ms, Maximum = 3ms, Average = 1ms X! s2 q6 ^8 |* A# [" P
RTA试用扩展PING从源地址ping目标成功。4 t" C7 f: J0 s: a+ N" h
[h3c1]ping -a 192.168.2.1 192.168.3.2- \" V; x& G5 i& Q; h% n* ^
PING 192.168.3.2: 56 data bytes, press CTRL_C to break* F$ r' i7 w7 O4 `0 [
Reply from 192.168.3.2: bytes=56 Sequence=1 ttl=255 time=5 ms
" Y; t9 I: `/ E9 C. B2 _ Reply from 192.168.3.2: bytes=56 Sequence=2 ttl=255 time=20 ms: r( i$ i/ t$ V. W
Reply from 192.168.3.2: bytes=56 Sequence=3 ttl=255 time=1 ms4 M! R/ B- @* }/ Z8 v5 `) H, ^
Reply from 192.168.3.2: bytes=56 Sequence=4 ttl=255 time=1 ms
0 s6 \4 @& L1 }! N( }( k4 q Reply from 192.168.3.2: bytes=56 Sequence=5 ttl=255 time=10 ms --- 192.168.3.2 ping statistics ---
+ m& I/ I3 k& x! ]' n& y 5 packet(s) transmitted
2 v E: [& P' q- G2 u! m 5 packet(s) received6 `6 _0 `. G" h0 y
0.00% packet loss# D$ K) M7 W' [2 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.1
# x: F3 d3 P* l3 Q) ?# C! M* ] 2 1 ms <1 ms <1 ms 192.168.3.2 Trace complete. # o( v. a4 E0 J$ r
|