RIPv2 Routing Configuration Example
Configuration Example
An example of configuring RIPv2 is shown in Fig. 5-2. Host A and Host B should be able to communicate with each other with an RIP route. Host A and Host B should be able to communicate with the gateway (e.g., access Internet) with RIP.
Figure 5-2. RIPv2 routing configuration.
Configuring Switch A
For Switch A, configure 2 VLAN interfaces for networks 10.10.1.1/24 and 10.10.3.1/24. Then, configure an RIP interface in network 10.10.3.1/24. Switch A should accept the default route, which is advertised by Switch C.
admin@XorPlus# set vlans vlan-id 2 admin@XorPlus# set vlans vlan-id 3 admin@XorPlus# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching native-vlan-id 2 admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching native-vlan-id 3 admin@XorPlus# set vlans vlan-id 2 l3-interface vlan-2 admin@XorPlus# set vlans vlan-id 3 l3-interface vlan-3 admin@XorPlus# set vlan-interface interface vlan-2vif vlan-2 address 10.10.1.1 prefix-length 24 admin@XorPlus# set vlan-interface interface vlan-3vif vlan-3 address 10.10.3.1 prefix-length 24 admin@XorPlus# commit Waiting for merging configuration. Commit OK. Save done. admin@XorPlus# set policy policy-statement connected-to-rip term export from protocol connected admin@XorPlus# set policy policy-statement connected-to-rip term export then metric 0 admin@XorPlus# commit Waiting for merging configuration. Commit OK. Save done. admin@XorPlus# set protocols rip interface vlan-3 address 10.10.3.1 admin@XorPlus# set protocols rip export "connected-to-rip" admin@XorPlus# set protocols rip interface vlan-3vif vlan-3 address 10.10.3.1 accept-default-route true admin@XorPlus# commit Waiting for merging configuration. Commit OK. Save done. admin@XorPlus#
Configuring Switch B
Configure 2 VLAN interfaces for networks 10.10.1.1/24 and 10.10.3.1/24. Then, configure an RIP interface in network 10.10.3.1/24. Switch B should accept the default route, which is advertised by Switch C.
admin@XorPlus# set vlans vlan-id 2 admin@XorPlus# set vlans vlan-id 3 admin@XorPlus# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching native-vlan-id 2 admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching native-vlan-id 3 admin@XorPlus# set vlans vlan-id 2 l3-interface vlan-2 admin@XorPlus# set vlans vlan-id 3 l3-interface vlan-3 admin@XorPlus# set vlan-interface interface vlan-2vif vlan-2 address 10.10.2.1 prefix-length 24 admin@XorPlus# set vlan-interface interface vlan-3vif vlan-2 address 10.10.4.1 prefix-length 24 admin@XorPlus# commit Waiting for merging configuration. Commit OK. Save done. admin@XorPlus# set policy policy-statement connected-to-rip term export from protocol connected admin@XorPlus# set policy policy-statement connected-to-rip term export then metric 0 admin@XorPlus# commit Waiting for merging configuration. Commit OK. Save done. admin@XorPlus# set protocols rip interface vlan-3vif vlan-3 address 10.10.4.1 admin@XorPlus# set protocols rip export "connected-to-rip" admin@XorPlus# set protocols rip interface vlan-3vif vlan-3 address 10.10.4.1 accept-default-route true admin@XorPlus# commit Waiting for merging configuration. Commit OK. Save done. admin@XorPlus#
Configuring Switch C
Configure 3 VLAN interfaces for networks 10.10.3.2/24, 10.10.4.2/24, and 10.10.5.2/24. Then, configure a default route and 2 RIP interfaces.
admin@XorPlus# set vlans vlan-id 2 admin@XorPlus# set vlans vlan-id 3 admin@XorPlus# set vlans vlan-id 4 admin@XorPlus# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching native-vlan-id 2 admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching native-vlan-id 3 admin@XorPlus# set interface gigabit-ethernet ge-1/1/3 family ethernet-switching native-vlan-id 4 admin@XorPlus# set vlans vlan-id 2 l3-interface vlan-2 admin@XorPlus# set vlans vlan-id 3 l3-interface vlan-3 admin@XorPlus# set vlans vlan-id 4 l3-interface vlan-4 admin@XorPlus# commit Waiting for merging configuration. Commit OK. Save done. admin@XorPlus# set vlan-interface interface vlan-2 vif vlan-2 address 10.10.3.2 prefix-length 24 admin@XorPlus# set vlan-interface interface vlan-3 vif vlan-3 address 10.10.4.2 prefix-length 24 admin@XorPlus# set vlan-interface interface vlan-4 vif vlan-4 address 10.10.5.2 prefix-length 24 admin@XorPlus# set protocols static route 0.0.0.0/0 next-hop 10.10.5.1 admin@XorPlus# set protocols rip interface vlan-2vif vlan-2 address 10.10.3.2 admin@XorPlus# set protocols rip interface vlan-2vif vlan-2 address 10.10.3.2 advertise-default-route true admin@XorPlus# set protocols rip interface vlan-3vif vlan-3 address 10.10.4.2 admin@XorPlus# set protocols rip interface vlan-3vif vlan-3 address 10.10.4.2 advertise-default-route true admin@XorPlus# set protocols rip export "connected-to-rip" admin@XorPlus# commit Waiting for merging configuration. Commit OK. Save done. admin@XorPlus#
Verifying the RIP Configuration
Verify the RIP configuration of the switches as shown below. (In the following example, the RIP peer and the RIP route table in Switch A is verified.)
admin@XorPlus# run show rip peer Address Interface State Hello Rx Hello Tx Last Hello --------------- --------------- ------ ---------- ---------- ---------- 10.10.3.2vlan-3/vlan-3 Up 0 0 00:41:44 admin@XorPlus# admin@XorPlus# run show route table ipv4 unicast rip 0.0.0.0/0[rip(120)/1] > to 10.10.3.2 via vlan-3/vlan-3 10.10.2.0/24 [rip(120)/1] > to 10.10.3.2 via vlan-3/vlan-3 10.10.4.0/24 [rip(120)/1] > to 10.10.3.2 via vlan-3/vlan-3
Copyright © 2025 Pica8 Inc. All Rights Reserved.