Huawei, Cisco, Juniper network rip experimental configuration

Brief introduction of rip

RIP is a protocol based on the Distance -Vector algorithm, which uses the Hop Count as the measurement value to measure the distance to the destination address.

In a RIP network, by default, the hop count from a device to the network directly connected to it is 0, the hop count from a network reachable through a device is 1, and so on.

That is to say, the metric value is equal to the number of devices between the local network and the destination network. To limit the convergence time, RIP specifies that the metric value should be an integer between 0 and 15, and the hop count greater than or equal to 16 is defined as infinity, that is, the destination network or host is unreachable. Due to this limitation, it is impossible for RIP to be applied in a large network.

Huawei rip experiment

Networking requirements

As shown in the figure, there are four routers in the network, and it is required to implement network interconnection on RouterA, RouterB, RouterC, and RouterD.

Configuration ideas

  • It is recommended to configure the RIP-2 routing protocol because the network interconnection of devices is to be realized in a small network.

  • Configure IP addresses for each interface to make the network reachable.

  • Enable RIP on each router to basically realize network interconnection.

  • Configure RIP-2 version on each router to improve RIP routing expansion performance.

Steps

Configure the IP address of each router interface

Configure RouterA.

<Huawei> system-view
[Huawei] sysname RouterA
[RouterA] interface gigabitethernet 1/0/0
[RouterA-GigabitEthernet1/0/0] ip address 192.168.1.1 24
RouterB、RouterC和RouterD的配置与RouterA一致(略)。
Configuring Basic RIP Functions

Configure RouterA.

[RouterA] rip
[RouterA-rip-1] network 192.168.1.0
[RouterA-rip-1] quit

Configure RouterB.

[RouterB] rip
[RouterB-rip-1] network 192.168.1.0
[RouterB-rip-1] network 172.16.0.0
[RouterB-rip-1] network 10.0.0.0
[RouterB-rip-1] quit

Configure RouterC.

[RouterC] rip
[RouterC-rip-1] network 172.16.0.0
[RouterC-rip-1] quit

Configure RouterD.

[RouterD] rip
[RouterD-rip-1] network 10.0.0.0
[RouterD-rip-1] quit

Check the RIP routing table of RouterA.

[RouterA] display rip 1 route
 Route Flags: R - RIP
              A - Aging, S - Suppressed, G - Garbage-collect 
-------------------------------------------------------------------------
 Peer 192.168.1.2  on GigabitEthernet1/0/0
      Destination/Mask        Nexthop     Cost   Tag     Flags   Sec
         10.0.0.0/8           192.168.1.2      1    0        RA      14
         172.16.0.0/16        192.168.1.2      1    0        RA      14

It can be seen from the routing table that the routing information advertised by RIP-1 uses a natural mask.

Configure the version of RIP

Configure RIP-2 on RouterA.

[RouterA] rip
[RouterA-rip-1] version 2
[RouterA-rip-1] quit

Configure RIP-2 on RouterB.

[RouterB] rip
[RouterB-rip-1] version 2
[RouterB-rip-1] quit

Configure RIP-2 on RouterC.

[RouterC] rip
[RouterC-rip-1] version 2
[RouterC-rip-1] quit

Configure RIP-2 on RouterD.

[RouterD] rip
[RouterD-rip-1] version 2
[RouterD-rip-1] quit
Verify configuration results

Check the RIP routing table of RouterA.

[RouterA] display rip 1 route
  Route Flags: R - RIP
              A - Aging, S - Suppressed, G - Garbage-collect
-------------------------------------------------------------------------
 Peer 192.168.1.2  on GigabitEthernet1/0/0
      Destination/Mask        Nexthop     Cost   Tag     Flags   Sec
         10.1.1.0/24         192.168.1.2      1    0        RA      32
         172.16.1.0/24       192.168.1.2      1    0        RA      32

It can be seen from the routing table that the routes advertised by RIP-2 contain more accurate subnet mask information.

configuration file

Configuration file of RouterA

#
 sysname RouterA
#
interface GigabitEthernet1/0/0
 ip address 192.168.1.1 255.255.255.0
#
rip 1
 version 2
 network 192.168.1.0
#
return

Configuration file of RouterB

#
 sysname RouterB
#
interface GigabitEthernet1/0/0
 ip address 192.168.1.2 255.255.255.0
#
interface GigabitEthernet2/0/0
 ip address 172.16.1.1 255.255.255.0
#
interface GigabitEthernet3/0/0
 ip address 10.1.1.1 255.255.255.0
#
rip 1
 version 2
 network 192.168.1.0
 network 172.16.0.0
 network 10.0.0.0
#
return

Configuration file of RouterC

#
 sysname RouterC
#
interface GigabitEthernet2/0/0
 ip address 172.16.1.2 255.255.255.0
#
rip 1
 version 2
 network 172.16.0.0
#
return

Configuration file of RouterD

#
 sysname RouterD
#
interface GigabitEthernet1/0/0
 ip address 10.1.1.2 255.255.255.0
#
rip 1
 version 2
 network 10.0.0.0
#
return

Cisco rip experiment

experimental topology

configuration process

  1. First configure the IP address of PC2 PC3

  • PC1 192.168.10.2 MAC 255.255.255.0

  • PC2 192.168.20.2 MAC 255.255.255.0

  1. IP of R1 10.0.0.1 255.255.255.252

  2. IP of R2 10.0.0.2 255.255.255.252

  3. Configure route R1

Router>enable  
Router#conf t  
Router(config)#int g0/0(进入G0/0端口)  
Router(config-if)#no shutdown  
Router(config-if)#ip add 192.168.10.1 255.255.255.0 (配置G0/0端口的的IP地址)  
Router(config-if)#int g0/1  
Router(config-if)#no shutdown (开启端口)  
Router(config-if)#ip add 10.0.0.1 255.255.255.252  
Router(config)#route rip  
Router(config-router)#version 2  
Router(config-router)#network 192.168.10.0  
Router(config-router)#network 10.0.0.0  
Router(config-router)#no auto-summary  
Router(config-router)#ex  

Router(config)#route rip (开启RIP协议)  
Router(config-router)#version 2 (启用RIPv2 )  
Router(config-router)#network 192.168.10.0 (宣告网段)  
Router(config-router)#network 10.0.0.0 (宣告网段)  
Router(config-router)#no auto-summary (关闭自动汇总)  
  1. show ip route View routing information

  2. Configure R2


(all same as above)

Router>en  
Router#conf t  
Router(config)#int g0/0  
Router(config-if)#no shutdown  
Router(config-if)#int g0/0  
Router(config-if)#ip add 192.168.20.1 255.255.255.0  
Router(config-if)#int g0/1  
Router(config-if)#no shutdown  
Router(config-if)#ip add 10.0.0.2 255.255.255.252  
Router(config-if)#ex  
Router(config)#route rip  
Router(config-router)#version 2  
Router(config-router)#ne  
Router(config-router)#network 192.168.20.0  
Router(config-router)#net  
Router(config-router)#network 10.0.0.2  
Router(config-router)#no au  
Router(config-router)#no auto-summary  
Router(config-router)#ex  
  1. Verification: PC

Juniper Networks rip experiment

Running Routing Information Protocol on JunOS 12.1 in GNS3, by default when you configure RIP on junos it will enable RIP v2 which is one of the differences from Cisco which requires manual configuration of version2.

experimental topology

Prerequisite: Configure the IP address correctly.

It is very simple to configure RIP on junOS, and only a few commands are required.

By default, JunOS does not advertise RIP routes and routes received from neighbors, so we need to define a routing policy to advertise RIP routes.

login: root
root@% Cli
root > configure
[edit]
root # set protocols rip group rip-routes neighbor em0 

Among them, rip-routes is the group name, which can be set by yourself, and em0 is the connection interface of Junos2.

root  # set policy-options policy-statement Advertisement-RIProutes from protocol direct
root  # set policy-options policy-statement Advertisement-RIProutes from protocol rip
root  # set policy-options policy-statement Advertisement-RIProutes then accept

Advertisement-RIProutes" is the name of the policy, now you need to apply this policy using the following command.

oot  # set protocols rip group rip-routes  export  Advertisement-RIProutes
root  # commit

RIP configuration on JunOS3:

root
Cli
configure
set protocols rip group rip-routes neighbor em0 
set protocols rip group rip-routes neighbor em1

Set policy-options policy-statement advertise-RIProutes from protocol direct
set policy-options policy-statement advertise-RIProutes from protocol rip
set policy-options policy-statement advertise-RIProutes then accept
set protocols rip group rip-routes export advertise-RIProutes
 commit

RIP configuration on JunOS4:

root
Cli
configure
set protocols rip group rip-routes neighbor em0

Set policy-options policy-statement advertise-RIProutes from protocol direct
set policy-options policy-statement advertise-RIProutes from protocol rip
set policy-options policy-statement advertise-RIProutes then accept
set protocols rip group rip-routes export advertise-RIProutes
 commit

verify

Test the configuration by pinging from junos2 to 222.0.0.1, which is the loopback address on junos4, "show route"" will also show all routes on all routers, the output of the show route command will have the following routes:

Guess you like

Origin blog.csdn.net/qq_43416206/article/details/131334866