找回密码
 注册
查看: 2419|回复: 0

H3C静态路由实验配置实验剖析

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2021-3-11 22:05:36 | 显示全部楼层 |阅读模式
attach://198.png
8 r& {2 _& W# @2 U* E实验需求
% f, u1 `; t+ D! t给PC5配置IP地址为100.6.1.2;PC5的网关为的r1路由器G0/0端口的IP地址100.6.1.1
& h  G5 }; t& {给PC6配置IP地址为100.6.5.2;PC6的网关为的r4路由器G0/0端口的IP地址100.6.5.1% v8 g0 V& i  r9 w9 }! m
如扑拓图所示,给路由器的各个端口配置相对应的IP地址
% l% G/ s0 p6 O" O+ v) M  F; d4 E& L实验解法$ j5 K! ^7 G- w" Q. i0 n! O
路由器配置IP地址  k6 n3 z& t. \
r1/ r& \$ d: _0 z9 `; F4 G+ ~' n& O9 a
<H3C>system-view
4 e. u" C; Q( u# A[H3C]sys r1
+ s- a0 G4 u; g! d! t[r1]interface GigabitEthernet 0/0
# o7 o( u, S* R8 O& C9 t[r1-GigabitEthernet0/0]ip address 100.6.1.1 24" _; z9 i8 L9 v5 `7 W! N
[r1-GigabitEthernet0/0]exit$ F( E/ H4 P" f% R" \; z: ~- p, k! H
[r1]interface GigabitEthernet 0/1
! h+ a6 I, |! ]& H2 K[r1-GigabitEthernet0/1]ip address 100.6.2.1 24
7 X" ^2 \, U' a, F<r1>system-view* Z8 h  h' a9 g. U
//ip route-static 目标网段 子网掩码 出口端口IP地址; U9 W( G( w3 ~6 P, f/ `6 d+ c
//出口端口IP地址是指当前网段进入其它网段,经过的最后的端口IP地址+ B# j+ T2 r; E' q% K
[r1]ip route-static 100.6.3.0 255.255.255.0 100.6.2.2
, i  s' L0 m: R[r1]ip route-static 100.6.4.0 255.255.255.0 100.6.2.2' a+ n7 T# E, c7 \0 x/ o$ J
[r1]ip route-static 100.6.5.0 255.255.255.0 100.6.2.2
, g& c; b% a2 q  S1 ]; H! {2 N( N6 t" o6 S% f8 e
r2
0 Q3 f! a3 ~) e, y3 S7 d<H3C>system-view3 }2 C" E( B- E2 Q6 V6 A( \4 m
[H3C]interface GigabitEthernet 0/0
5 o- \7 m) S: y( J) Q" I2 ~[H3C-GigabitEthernet0/0]ip address 100.6.2.2 24$ G9 C: [, |3 A6 j5 s
[H3C-GigabitEthernet0/0]exit
9 Q0 j! B+ k1 [- |9 h( b' r[H3C]interface GigabitEthernet 0/1
% E5 g* v0 R3 f+ }' ~7 ^2 k: m' Q[H3C-GigabitEthernet0/1]ip address 100.6.3.1 24
) w) x. _) F5 a3 R  U<H3C>system-view
# @6 z- F& A! {+ C# y[H3C]ip route-static 100.6.1.0 255.255.255.0 100.6.2.1
4 `$ z% {% b! e, _/ Q" E0 [' y[H3C]ip route-static 100.6.4.0 255.255.255.0 100.6.3.26 D$ a- T! t4 q/ x
[H3C]ip route-static 100.6.5.0 255.255.255.0 100.6.3.2" r/ T- y4 Z2 y" q2 B

% \4 R' E4 E1 ~! f- pr3% s. @3 ^1 S" Y' o- v1 K
<H3C>sys; u( M4 a2 W9 x1 n$ u8 Y; V
[H3C]interface GigabitEthernet 0/0
. ], n  {7 ^6 E$ Q* R; |[H3C-GigabitEthernet0/0]ip address 100.6.3.2 24
7 T4 ?3 L* L0 A2 C+ T[H3C-GigabitEthernet0/0]exit
% B$ t/ E3 B7 |. h; T3 ][H3C]interface GigabitEthernet 0/1
2 V9 T: l- S; ]9 {1 C( U( B[H3C-GigabitEthernet0/1]ip address 100.6.4.1 24
- N% }1 b# y2 q$ p* @<H3C>system-view/ Q) [: w" {3 J) K
[H3C]ip route-static 100.6.1.0 255.255.255.0 100.6.3.1
& x0 W2 Z4 j) v+ p[H3C]ip route-static 100.6.2.0 255.255.255.0 100.6.3.1
% T) j" ~3 j  R, F$ {" y! J# h[H3C]ip route-static 100.6.5.0 255.255.255.0 100.6.4.2
4 `% s% }2 @3 s% p+ R4 N, P* Y9 L$ j3 U' W. f, g( `( d. l
r4
9 L# K& V& y0 E; q3 z# C+ G<H3C>sys
* L, L. Z$ T& K6 ]1 n[H3C]interface GigabitEthernet 0/0' {7 H7 c, w0 p" C
[H3C-GigabitEthernet0/0]ip address 100.6.5.1 24! _% G( X8 d6 \4 O5 f) ]
[H3C-GigabitEthernet0/0]exit# T6 z3 L0 I# }& e6 H
[H3C]interface GigabitEthernet 0/1
" Y0 l4 v: J* k2 }( O/ z7 x) ^[H3C-GigabitEthernet0/1]ip address 100.6.4.2 249 S( B/ u- G# g
[H3C-GigabitEthernet0/1]quit
9 j, v% C: c( l[H3C]ip route-static 100.6.1.0 255.255.255.0 100.6.4.1
8 k! m/ w1 N) D+ m/ Y" [- R[H3C]ip route-static 100.6.2.0 255.255.255.0 100.6.4.1
6 d8 P! V+ Y5 y: I! k! _; O[H3C]ip route-static 100.6.3.0 255.255.255.0 100.6.4.1+ k9 r5 u. ]+ k1 E: j) J
1 Z/ l1 M/ v* `/ F% I5 |+ t4 o
实验结果! r; g. ?  i- x' i9 h
PC5ping通PC6' n' \0 i4 }2 \9 l2 P7 G& C* L$ [
PC6ping通PC52 k! F, W9 p1 @( O  f

' i' I$ _; s/ r  N: `  J/ d1 }: {+ {! B1 J( s. ^8 W/ i
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 03:06 , Processed in 0.040659 second(s), 30 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表