认证培训,h3c认证体系,网络工程师
丰沃创新

动态路由rip协议(距离矢量算法)实验v1【网络工程师】

  • 发布时间: 2019-6-10 9:24:45

rip协议出现的较早v1是不识别mask的

路由配置如下

<Huawei>sy

Enter system view, return user view with Ctrl+Z.

[Huawei]sy r3

[r3]INT g0/0/0

[r3-GigabitEthernet0/0/0]ip add 192.168.1.2 24

Oct 11 2018 23:15:10-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

on the interface GigabitEthernet0/0/0 has entered the UP state.

[r3-GigabitEthernet0/0/0]int loo 0 【进入环回接口】

[r3-LoopBack0]ip add 2.2.2.2 24

[r3-LoopBack0]q

[r3]rip 3 【rip 与rip 的 ID】

[r3-rip-3]net 192.168.1.0 【 rip v1是不认mask的】

[r3-rip-3]net 2.0.0.0

[r3-rip-3]q

[r3]dis rip 【查看rip】

Public VPN-instance

RIP process : 3

RIP version : 1 【可以看到这就是版本号】

Preference : 100

Checkzero : Enabled

Default-cost : 0

Summary : Enabled

Host-route : Enabled

Maximum number of balanced paths : 4

Update time : 30 sec Age time : 180 sec 【30s是更新时间 每隔30s会将自己的路由表发其他路由一份 180s是老化时间 120s是垃圾计时器时间 我们可以看到这三个时间之间的倍数关系 这三个时间是可以自己进行设计的】

Garbage-collect time : 120 sec

Graceful restart : Disabled

BFD : Disabled

Silent-interfaces : None

Default-route : Disabled

Verify-source : Enabled

Networks :

2.0.0.0 192.168.1.0

Configured peers : None

Number of routes in database : 5

Number of interfaces enabled : 2

Triggered updates sent : 1

Number of route changes : 2

Number of replies to queries : 0

Number of routes in ADV DB : 4

Total count for 1 process :

Number of routes in database : 5

Number of interfaces enabled : 2

Number of routes sendable in a periodic update : 10

Number of routes sent in last periodic update : 2

[r3]

[r3]

[r3]

[r3]

[r3]dis rip 3 n 【查看rip邻居】

---------------------------------------------------------------------

IP Address Interface Type Last-Heard-Time

---------------------------------------------------------------------

192.168.1.1 GigabitEthernet0/0/0 RIP 0:0:8

Number of RIP routes : 2

[r3]ping 1.1.1.1

PING 1.1.1.1: 56 data bytes, press CTRL_C to break

Request time out

Reply from 1.1.1.1: bytes=56 Sequence=2 ttl=254 time=30 ms

Reply from 1.1.1.1: bytes=56 Sequence=3 ttl=254 time=20 ms

Reply from 1.1.1.1: bytes=56 Sequence=4 ttl=254 time=30 ms

Reply from 1.1.1.1: bytes=56 Sequence=5 ttl=254 time=30 ms

--- 1.1.1.1 ping statistics ---

5 packet(s) transmitted

4 packet(s) received

20.00% packet loss

round-trip min/avg/max = 20/27/30 ms

[r3]dis rip 3 int g0/0/0 【查询特定的端口rip协议】

--------------------------------------------------------------------------

Interface IP Address State Protocol MTU

--------------------------------------------------------------------------

GE0/0/0 192.168.1.2 UP RIPv1 Compatible 500

[r3]int g0/0/0

[r3-GigabitEthernet0/0/0]rip au 【设置rip的认证】

[r3-GigabitEthernet0/0/0]rip authentication-mode ?

hmac-sha256

md5 MD5 authentication 【可以看到两种认证方式 md5 是安全性比较高的】

simple Simple authentication 【密码 】

[r3-GigabitEthernet0/0/0]rip authentication-mode md

[r3-GigabitEthernet0/0/0]rip authentication-mode md5 ?

nonstandard Nonstandard MD5 authentication packet format (IETF)

usual Huawei MD5 authentication packet format

[r3-GigabitEthernet0/0/0]rip authentication-mode md5 n

[r3-GigabitEthernet0/0/0]rip authentication-mode md5 nonstandard hello 1

[r3-GigabitEthernet0/0/0]q

[r3]ping 1.1.1.1

PING 1.1.1.1: 56 data bytes, press CTRL_C to break

Reply from 1.1.1.1: bytes=56 Sequence=1 ttl=254 time=40 ms

Reply from 1.1.1.1: bytes=56 Sequence=2 ttl=254 time=30 ms

Reply from 1.1.1.1: bytes=56 Sequence=3 ttl=254 time=30 ms

Reply from 1.1.1.1: bytes=56 Sequence=4 ttl=254 time=30 ms

Reply from 1.1.1.1: bytes=56 Sequence=5 ttl=254 time=30 ms

--- 1.1.1.1 ping statistics ---

5 packet(s) transmitted

5 packet(s) received

0.00% packet loss

round-trip min/avg/max = 30/32/40 ms

[r3]

也可以前半段使用md5验证 后半段使用sim验证 都是可以的