The device is running!
system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]sysname AR2
[AR2-GigabitEthernet0/0/0]int lo 0
[AR2-LoopBack0]ip add 192.168.200.1 30
[AR2-LoopBack0]int g 0/0/0
[AR2-GigabitEthernet0/0/0]ip add 12.0.0.2 30
[AR2-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[AR2-GigabitEthernet0/0/0]q
[AR2]rip 1
[AR2-rip-1]network 192.168.200.0
[AR2-rip-1]network 12.0.0.0
[AR2-rip-1]q
[AR2]
The device is running!
system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]sysname AR1
[AR1]int g0/0/0
[AR1-GigabitEthernet0/0/0]ip add 12.0.0.1 30
[AR1-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[AR1-GigabitEthernet0/0/0]int lo 0
[AR1-LoopBack0]ip add 192.168.100.1 24
[AR1-LoopBack0]q
[AR1]rip 1
[AR1-rip-1]network 192.168.100.0
[AR1-rip-1]network 12.0.0.0
[AR1-rip-1]
[AR1]dis ip routing
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 11 Routes : 11
Destination/Mask Proto Pre Cost Flags NextHop Interface
12.0.0.0/30 Direct 0 0 D 12.0.0.1 GigabitEthernet
0/0/0
12.0.0.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
12.0.0.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.100.0/24 Direct 0 0 D 192.168.100.1 LoopBack0
192.168.100.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
192.168.100.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
192.168.200.0/24 RIP 100 1 D 12.0.0.2 GigabitEthernet
0/0/0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
[AR2]dis ip routing
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 11 Routes : 11
Destination/Mask Proto Pre Cost Flags NextHop Interface
12.0.0.0/30 Direct 0 0 D 12.0.0.2 GigabitEthernet
0/0/0
12.0.0.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
12.0.0.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.100.0/24 RIP 100 1 D 12.0.0.1 GigabitEthernet
0/0/0
192.168.200.0/30 Direct 0 0 D 192.168.200.1 LoopBack0
192.168.200.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
192.168.200.3/32 Direct 0 0 D 127.0.0.1 LoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
抓包查看,不设置版本的兼容模式,默认发送的是rip v1 版本,以广播的形式接收
备注:rip协议中,通过UDP520端口发送的路由条目信息,最大支持25条路由条目
AR1:
The device is running!
system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]sysname AR1
[AR1]int lo 0
[AR1-LoopBack0]ip add 1.1.1.1 24
[AR1-LoopBack0]int g 0/0/0
[AR1-GigabitEthernet0/0/0]ip add 12.0.0.1 30
[AR1-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[AR1-GigabitEthernet0/0/0]
AR2:
The device is running!
system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]sysname AR2
[AR2]int lo 0
[AR2-LoopBack0]ip add 2.2.2.2 24
[AR2-LoopBack0]int g 0/0/0
[AR2-GigabitEthernet0/0/0]ip add 12.0.0.2 30
[AR2-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[AR2-GigabitEthernet0/0/0]int g 0/0/1
[AR2-GigabitEthernet0/0/1]ip add 23.0.0.1 30
[AR2-GigabitEthernet0/0/1]un sh
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[AR2-GigabitEthernet0/0/1]
AR3:
The device is running!
system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]sysname AR3
[AR3]int lo 0
[AR3-LoopBack0]ip add 3.3.3.3 24
[AR3-LoopBack0]int g 0/0/1
[AR3-GigabitEthernet0/0/1]ip add 23.0.0.2 30
[AR3-GigabitEthernet0/0/1]un sh
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[AR3-GigabitEthernet0/0/1]
AR1:
[AR1-GigabitEthernet0/0/0]q
[AR1]rip 1
[AR1-rip-1]?
rip-1 interface view commands:
arp-ping ARP-ping
backup Backup information
bfd Bidirectional Forwarding Detection
checkzero Perform the checkzero operation in the zero fields of RIP
packets
clear Clear
default-cost Specify default metric for imported routes
default-route Enable advertisement of default routes
description Specify the process description
dialer Dialer
display Display information
filter-policy Specify route filtering policy
graceful-restart Graceful restart information
host-route Enable sending and receiving host routes
import-route Import routes from other protocols into RIP
maximum Set the maximum number of equal-cost multipaths
mtrace Trace route to multicast source
network Enable the routing protocol on the related network or
interface
peer Specify a peer router
ping ping command group
preference Specify RIP route preference
quit Exit from current mode and enter prior mode
reset reset command group
return Enter the privileged mode
silent-interface Suppress RIP packets from being sent on the specified
interface
summary Enable route summarization
test-aaa Accounts test
timers Adjust the protocol timers
tracert tracert command group
undo Negate a command or set its defaults
verify-source Validate the source IP address of received RIP updates
version Specify RIP version
[AR1-rip-1]version 1
[AR1-rip-1]network 1.1.1.0
Error: The network address is invalid, and the specified address must be major-n
et address without any subnets.
[AR1-rip-1]network 1.0.0.0
[AR1-rip-1]network 12.0.0.0
[AR1-rip-1]undo summary
AR2:
[AR2-GigabitEthernet0/0/1]q
[AR2]rip 1
[AR2-rip-1]network 2.0.0.0
[AR2-rip-1]network 12.0.0.0
[AR2-rip-1]network 23.0.0.0
[AR2-rip-1]
[AR2-rip-1]un summary
AR3:
[AR3-GigabitEthernet0/0/1]q
[AR3]rip 1
[AR3-rip-1]version 2
[AR3-rip-1]network 23.0.0.0 30
^
Error:Too many parameters found at '^' position.
[AR3-rip-1]network 23.0.0.0
[AR3-rip-1]network 3.3.3.0
Error: The network address is invalid, and the specified address must be major-n
et address without any subnets.
[AR3-rip-1]network 3.3.3.0 24
^
Error:Too many parameters found at '^' position.
[AR3-rip-1]network 3.0.0.0
[AR3-rip-1]undo summary
[AR3-rip-1]
AR1:
[AR1]dis ip routing-table
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/24 Direct 0 0 D 1.1.1.1 LoopBack0
1.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
1.1.1.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
2.0.0.0/8 RIP 100 1 D 12.0.0.2 GigabitEthernet
0/0/0
3.0.0.0/8 RIP 100 2 D 12.0.0.2 GigabitEthernet
0/0/0
12.0.0.0/30 Direct 0 0 D 12.0.0.1 GigabitEthernet
0/0/0
12.0.0.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
12.0.0.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
23.0.0.0/8 RIP 100 1 D 12.0.0.2 GigabitEthernet
0/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
AR2:
[AR2]dis ip routing
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 15 Routes : 15
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.0.0.0/8 RIP 100 1 D 12.0.0.1 GigabitEthernet
0/0/0
2.2.2.0/24 Direct 0 0 D 2.2.2.2 LoopBack0
2.2.2.2/32 Direct 0 0 D 127.0.0.1 LoopBack0
2.2.2.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
3.3.3.0/24 RIP 100 1 D 23.0.0.2 GigabitEthernet
0/0/1
12.0.0.0/30 Direct 0 0 D 12.0.0.2 GigabitEthernet
0/0/0
12.0.0.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
12.0.0.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
23.0.0.0/30 Direct 0 0 D 23.0.0.1 GigabitEthernet
0/0/1
23.0.0.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
23.0.0.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
AR3:
[AR3]dis ip routing
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 10 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
3.3.3.0/24 Direct 0 0 D 3.3.3.3 LoopBack0
3.3.3.3/32 Direct 0 0 D 127.0.0.1 LoopBack0
3.3.3.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
23.0.0.0/30 Direct 0 0 D 23.0.0.2 GigabitEthernet
0/0/1
23.0.0.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
23.0.0.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
两种方法:
第一种、进入R3的接收接口
int g0/0/1
rip version 1
第二种、进入R2的发送接口(发送给vip v2路由的接口)
int g 0/0/1
rip version 2 multicast
这里实验第二种方法,然后查看抓包数据
是不是发生改变,然后再看路由表
[AR2]int g 0/0/1
[AR2-GigabitEthernet0/0/1]rip version 2 multicast
AR3路由表,路由信息同步
[AR3]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 13 Routes : 13
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.0.0.0/8 RIP 100 2 D 23.0.0.1 GigabitEthernet
0/0/1
2.2.2.0/24 RIP 100 1 D 23.0.0.1 GigabitEthernet
0/0/1
3.3.3.0/24 Direct 0 0 D 3.3.3.3 LoopBack0
3.3.3.3/32 Direct 0 0 D 127.0.0.1 LoopBack0
3.3.3.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
12.0.0.0/30 RIP 100 1 D 23.0.0.1 GigabitEthernet
0/0/1
23.0.0.0/30 Direct 0 0 D 23.0.0.2 GigabitEthernet
0/0/1
23.0.0.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
23.0.0.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
23.0.0.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0