h3c 静态路由实验

更新时间:2024-01-19 08:43:01 阅读量: 教育文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

一:两头通试验

sys

System View: return to User View with Ctrl+Z. [H3C]sysname R1 [R1]int LoopBack 0

[R1-LoopBack0]ip address 10.0.0.1 24

Info: Only 32-bit masks are supported on Loopback interfaces. The mask has been converted to 32-bit.

[R1-LoopBack0]quit [R1]int s0/2/0

[R1-Serial0/2/0]ip add 10.1.0.1 24 [R1-Serial0/2/0]quit [R1]dis ip int bri

*down: administratively down (s): spoofing

Interface Physical Protocol IP Address Description Ethernet0/1/0 up up unassigned Ethernet0... GigabitEthernet0/1/0 up up unassigned GigabitEt... GigabitEthernet0/1/1 down down unassigned GigabitEt... LoopBack0 up up(s) 10.0.0.1 LoopBack0... Serial0/2/0 up up 10.1.0.1 Serial0/2... Serial0/2/1 down down unassigned Serial0/2... [R1]ping 10.0.0.1

PING 10.0.0.1: 56 data bytes, press CTRL_C to break

Reply from 10.0.0.1: bytes=56 Sequence=1 ttl=255 time=4 ms Reply from 10.0.0.1: bytes=56 Sequence=2 ttl=255 time=1 ms Reply from 10.0.0.1: bytes=56 Sequence=3 ttl=255 time=1 ms Reply from 10.0.0.1: bytes=56 Sequence=4 ttl=255 time=4 ms Reply from 10.0.0.1: bytes=56 Sequence=5 ttl=255 time=10 ms

--- 10.0.0.1 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss

round-trip min/avg/max = 1/4/10 m

二:单边路由和扩展的ping

一:具体配置如下 1:R1的配置如下

sys

System View: return to User View with Ctrl+Z. [R1]int LoopBack 0 [R1-LoopBack0]ip add 10.0.0.1 24

Info: Only 32-bit masks are supported on Loopback interfaces. The mask has been converted to 32-bit. [R1-LoopBack0]int s0/2/0 [R1-Serial0/2/0]ip add 10.1.0.1 24 [R1]ip route-static 10.2.0.1 24 10.1.0.2 [R1]

%Apr 27 19:05:24:500 2011 R1 IFNET/5/PROTOCOL_UPDOWN: Protocol PPP IPCP on the interface Serial0/2/0 is UP. [R1]dis ip routing-table Routing Tables: Public

Destinations : 7 Routes : 7

Destination/Mask Proto Pre Cost NextHop Interface

10.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0

10.1.0.0/24 Direct 0 0 10.1.0.1 S0/2/0

10.1.0.1/32 Direct 0 0 127.0.0.1 InLoop0

10.1.0.2/32 Direct 0 0 10.1.0.2 S0/2/0

10.2.0.0/24 Static 60 0 10.1.0.2 S0/2/0

127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0

127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0

[R1]ping 10.2.0.1

PING 10.2.0.1: 56 data bytes, press CTRL_C to break Reply from 10.2.0.1: bytes=56 Sequence=1 ttl=255 time=5 ms Reply from 10.2.0.1: bytes=56 Sequence=2 ttl=255 time=30 ms Reply from 10.2.0.1: bytes=56 Sequence=3 ttl=255 time=5 ms Reply from 10.2.0.1: bytes=56 Sequence=4 ttl=255 time=30 ms Request time out

--- 10.2.0.1 ping statistics --- 5 packet(s) transmitted 4 packet(s) received

20.00% packet loss

round-trip min/avg/max = 5/17/30 ms [R1]ping -a 10.0.0.1 24 10.2.0.1 ^

% Too many parameters found at '^' position. [R1]ping -a 10.0.0.1 10.2.0.1

PING 10.2.0.1: 56 data bytes, press CTRL_C to break Request time out Request time out Request time out Request time out Request time out

--- 10.2.0.1 ping statistics --- 5 packet(s) transmitted 0 packet(s) received

100.00% packet lost 2:R2的配置如下 sys

System View: return to User View with Ctrl+Z. [H3C]sysname R2 [R2]int loo

[R2]int LoopBack 1

[R2-LoopBack1]ip add 10.2.0.1 24

Info: Only 32-bit masks are supported on Loopback interfaces. The mask has been converted to 32-bit.

[R2-LoopBack1]int s0/2/2 [R2-Serial0/2/2]ip add 10.1.0.2 24 [R2-Serial0/2/2] %Apr

27

19:05:24:500

2011

R2

IFNET/5/PROTOCOL_UPDOWN: Protocol PPP IPCP on the interface Serial0/2/2 is UP.

[R2-Serial0/2/2]quit [R2]dis ip routing-table Routing Tables: Public

Destinations : 6 Routes : 6

Destination/Mask Proto Pre Cost NextHop Interface

10.1.0.0/24 Direct 0 0 10.1.0.2 S0/2/2

10.1.0.1/32 Direct 0 0 10.1.0.1 S0/2/2

10.1.0.2/32 Direct 0 0 127.0.0.1 InLoop0

10.2.0.1/32 Direct 0 0 127.0.0.1 InLoop0

127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0

127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0

三:缺省路由

一:具体配置如下 1:R1的配置

sys [H3C]sysname R1 [R1]int LoopBack 0

[R1-LoopBack0]ip add 10.0.0.1 24

Info: Only 32-bit masks are supported on Loopback interfaces. The mask has been converted to 32-bit. [R1-LoopBack0]int s0/2/0 [R1-Serial0/2/0]ip add 10.1.0.1 24 [R1-Serial0/2/0]quit

[R1]ip route-static 0.0.0.0 0.0.0.0 10.1.0.2 [R1]

%Apr 27 19:35:05:547 2011 R1 IFNET/5/PROTOCOL_UPDOWN: Protocol PPP IPCP on the interface Serial0/2/0 is UP. [R1]ping 10.3.0.1

PING 10.3.0.1: 56 data bytes, press CTRL_C to break

Reply from 10.3.0.1: bytes=56 Sequence=1 ttl=254 time=34 ms Reply from 10.3.0.1: bytes=56 Sequence=2 ttl=254 time=20 ms Reply from 10.3.0.1: bytes=56 Sequence=3 ttl=254 time=1 ms Reply from 10.3.0.1: bytes=56 Sequence=4 ttl=254 time=20 ms

Reply from 10.3.0.1: bytes=56 Sequence=5 ttl=254 time=20 ms 2:R2的配置 sys

System View: return to User View with Ctrl+Z. [H3C]sysname R2 [R2]int s0/2/2

[R2-Serial0/2/2]ip add 10.1.0.2 24 [R2-Serial0/2/2]int s0/2/0 [R2-Serial0/2/0]ip add 10.2.0.1 24 [R2-Serial0/2/0]quit

[R2]ip route-static 10.0.0.1 24 10.1.0.1 [R2]ip route-static 10.3.0.1 24 10.2.0.2 [R2]

3:R3的配置

sys

System View: return to User View with Ctrl+Z. [H3C]sysname R3 [R3]int LoopBack 1

[R3-LoopBack1]ip add 10.3.0.1 24

Info: Only 32-bit masks are supported on Loopback interfaces. The mask has been converted to 32-bit. [R3-LoopBack1]int s0/2/0 [R3-Serial0/2/0]ip add 10.2.0.2 24 [R3-Serial0/2/0]quit

[R3]ip route-static 0.0.0.0 0.0.0.0 10.2.0.1 [R3]

三:关于rip的几个实验

1:单播

《1》R1的配置及运行结果

#May 2 21:05:34:979 2012 H3C SHELL/4/LOGIN:

Trap 1.3.6.1.4.1.25506.2.2.1.1.3.0.1: login from Console

%May 2 21:05:34:979 2012 H3C SHELL/5/SHELL_LOGIN: Console logged in from con0. sys

System View: return to User View with Ctrl+Z. [H3C]sysname R1 [R1]int loo [R1]int LoopBack 0

[R1-LoopBack0]ip add 10.1.0.0 24

Info: Only 32-bit masks are supported on Loopback interfaces. The mask has been converted to 32-bit. [R1-LoopBack0]int s0/2/0 [R1-Serial0/2/0]ip add 10.2.0.1 24 [R1-Serial0/2/0]quit [R1]rip [R1-rip-1]undo ?

checkzero Perform the checkzero operation in the zero fields

of RIP-1 packets

default Specify default metric for imported routes

default-route Enable advertisement of default routes fast-reroute Specify fast reroute configuration filter-policy Specify route filtering policy host-route Enable receiving host-routes import-route Import routes from other protocols

into RIP

maximum Set maximum number of balanced paths

network Enable the routing protocol on the related network

output-delay packets

peer preference silent-interface on the

summary timers trip configuration

validate-source-address received RIP

version

or interface

Set interval between sending update Specify a peer router Specify RIP route preference Suppress RIP packets from being sent specified interface

Enable route summarization Adjust the protocol timers

Specify TRIP(Triggered RIP) information

Validate the source IP address of updates

Specify RIP version

[R1-rip-1]undo s [R1-rip-1]undo summary [R1-rip-1]ver [R1-rip-1]version 2 [R1-rip-1]quit [R1] %May

2

21:08:21:026

2012

R1

IFNET/5/PROTOCOL_UPDOWN: Protocol PPP IPCP on the interface Serial0/2/0 is UP. [R1]rip

[R1-rip-1]net 10.1.0.0 [R1-rip-1]net 10.2.0.0

Specified network is already configured in this instance [R1-rip-1]quit [R1]ping 10.4.0.2

PING 10.4.0.2: 56 data bytes, press CTRL_C to break

Reply from 10.4.0.2: bytes=56 Sequence=1 ttl=254 time=30 ms Request time out Request time out

Reply from 10.4.0.2: bytes=56 Sequence=4 ttl=254 time=10 ms Reply from 10.4.0.2: bytes=56 Sequence=5 ttl=254 time=10 ms

--- 10.4.0.2 ping statistics --- 5 packet(s) transmitted 3 packet(s) received 40.00% packet loss

round-trip min/avg/max = 10/16/30 ms 《2》R2的配置及运行结果

#May 2 21:07:35:527 2012 H3C SHELL/4/LOGIN: Trap 1.3.6.1.4.1.25506.2.2.1.1.3.0.1: login from Console

%May 2 21:07:35:527 2012 H3C SHELL/5/SHELL_LOGIN: Console logged in from con0.

sys

System View: return to User View with Ctrl+Z. [H3C]sysname R2 [R2]int loo 1

[R2-LoopBack1]ip add 10.3.0.1 24

Info: Only 32-bit masks are supported on Loopback interfaces. The mask has been converted to 32-bit.

[R2-LoopBack1]int s0/2/2 [R2-Serial0/2/2]ip add 10

^

% Wrong parameter found at '^' position. [R2-Serial0/2/2]ip add 10.2.0.2 24 [R2-Serial0/2/2] %May

2

21:08:21:485

2012

IFNET/5/PROTOCOL_UPDOWN: Protocol PPP IPCP on interface Serial0/2/2 is UP.

[R2-Serial0/2/2]quit [R2]rip [R2-rip-1]undo s [R2-rip-1]undo summary [R2-rip-1]ver 2 [R2-rip-1] [R2-rip-1] [R2-rip-1]net ^

% Incomplete command found at '^' position. [R2-rip-1]net

[R2-rip-1]network 10.2.0.0 [R2-rip-1]net 10.3.0.0

Specified network is already configured in this instance [R2-rip-1]int s0/2/0

R2

the

[R2-Serial0/2/0]ip add 10.4.0.1 24 [R2-Serial0/2/0]quit [R2]rip [R2-rip-1]undo s [R2-rip-1]undo summary [R2-rip-1]net 10.4.0.0

Specified network is already configured in this instance [R2-rip-1] %May

2

21:11:20:340

2012

IFNET/5/PROTOCOL_UPDOWN: Protocol PPP IPCP on interface Serial0/2/0 is UP.

[R2-rip-1] [R2-rip-1]rip [R2-rip-1]ber 2 ^

% Unrecognized command found at '^' position. [R2-rip-1]ver 2 [R2-rip-1]

《3》R3的配置及运行结果

#May 2 21:10:30:097 2012 H3C SHELL/4/LOGIN:

R2

the

Trap 1.3.6.1.4.1.25506.2.2.1.1.3.0.1: login from Console

%May 2 21:10:30:097 2012 H3C SHELL/5/SHELL_LOGIN: Console logged in from con0.

sys

System View: return to User View with Ctrl+Z. [H3C]sysname R3 [R3]int loo [R3]int LoopBack 2

[R3-LoopBack2]ip add 10.5.0.1 24

Info: Only 32-bit masks are supported on Loopback interfaces. The mask has been converted to 32-bit.

[R3-LoopBack2]int s0/2/0 [R3-Serial0/2/0]ip add 1 ^

% Wrong parameter found at '^' position. [R3-Serial0/2/0]ip add 10.4.0.2 24 [R3-Serial0/2/0] %May

2

21:11:20:360

2012

R3

IFNET/5/PROTOCOL_UPDOWN: Protocol PPP IPCP on the interface Serial0/2/0 is UP.

[R3-Serial0/2/0]quit

[R3]rip [R3-rip-1]ver 2 [R3-rip-1]undo s [R3-rip-1]undo summary [R3-rip-1]ver 2 [R3-rip-1]net 10.5.0.0 [R3-rip-1]net 10.4.0.0

Specified network is already configured in this instance [R3-rip-1]

2:连续子网及不连续子网

《1》R1的配置及运行结果 《2》R2的配置及运行结果

3:debugging 抓包

[R1]quit ter mon ter monitor

Info: Current terminal monitor is on.

ter deb ter debugging

Info: Current terminal debugging is on.

deb

debugging ip icmp deb all

This may severely impact network performance. Continue? [Y/N]:y

本文来源:https://www.bwwdw.com/article/2zoo.html

Top