rip協(xié)議出現的較早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 【進(jìn)入環(huán)回接口】
[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是更新時(shí)間 每隔30s會(huì )將自己的路由表發(fā)其他路由一份 180s是老化時(shí)間 120s是垃圾計時(shí)器時(shí)間 我們可以看到這三個(gè)時(shí)間之間的倍數關(guān)系 這三個(gè)時(shí)間是可以自己進(jìn)行設計的】
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 【查詢(xún)特定的端口rip協(xié)議】
--------------------------------------------------------------------------
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驗證 都是可以的