Published 6月 03, 2018 by with 0 comment

JNCIS-SP Lab: Configuring a Basic RIP Network



Requirements
In this Lab, I configure a basic RIP network.

The RIP's default routing policies is to reject everything.
So, to advertise RIP routes, we must configure and apply an export routing policy that advertises RIP-learned and direct routes.



Configuration
1. Basic & interface address configuration.
set system host-name JNCIE
set system root-authentication encrypted-password "$1$Luohd5lf$6ikSsNi1iEX/147eHbqm7."

set logical-systems R1 interfaces em1 unit 12 vlan-id 12
set logical-systems R1 interfaces em1 unit 12 family inet address 8.8.12.1/24
set logical-systems R1 interfaces lo0 unit 1 family inet address 1.1.1.1/32

set logical-systems R2 interfaces em2 unit 12 vlan-id 12
set logical-systems R2 interfaces em2 unit 12 family inet address 8.8.12.2/24
set logical-systems R2 interfaces em2 unit 23 vlan-id 23
set logical-systems R2 interfaces em2 unit 23 family inet address 8.8.23.2/24
set logical-systems R2 interfaces lo0 unit 2 family inet address 2.2.2.2/32

set logical-systems R3 interfaces em3 unit 23 vlan-id 23
set logical-systems R3 interfaces em3 unit 23 family inet address 8.8.23.3/24
set logical-systems R3 interfaces lo0 unit 3 family inet address 3.3.3.3/32

set interfaces em1 vlan-tagging       
set interfaces em2 vlan-tagging
set interfaces em3 vlan-tagging


2. I create RIP group called Rx_RIP and add the interface on individual logical-systems Rx.
set logical-systems R1 protocols rip group R1_RIP neighbor em1.12

set logical-systems R2 protocols rip group R2_RIP neighbor em2.12
set logical-systems R2 protocols rip group R2_RIP neighbor em2.23

set logical-systems R3 protocols rip group R3_RIP neighbor em3.23


3. Create the routing policy to advertise both direct and RIP-learned routes.
set logical-systems R1 policy-options policy-statement R1_RIP_OUT term 1 from protocol direct
set logical-systems R1 policy-options policy-statement R1_RIP_OUT term 1 from protocol rip
set logical-systems R1 policy-options policy-statement R1_RIP_OUT term 1 then accept

set logical-systems R2 policy-options policy-statement R2_RIP_OUT term 1 from protocol direct
set logical-systems R2 policy-options policy-statement R2_RIP_OUT term 1 from protocol rip
set logical-systems R2 policy-options policy-statement R2_RIP_OUT term 1 then accept

set logical-systems R3 policy-options policy-statement R3_RIP_OUT term 1 from protocol direct
set logical-systems R3 policy-options policy-statement R3_RIP_OUT term 1 from protocol rip
set logical-systems R3 policy-options policy-statement R3_RIP_OUT term 1 then accept


4. Apply the routing policy.
set logical-systems R1 protocols rip group R1_RIP export R1_RIP_OUT

set logical-systems R2 protocols rip group R2_RIP export R2_RIP_OUT

set logical-systems R3 protocols rip group R3_RIP export R3_RIP_OUT


5. Commit the configuration.
commit


Verification
Routing Table:
root@JNCIE> show route logical-system R1          

inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

1.1.1.1/32         *[Direct/0] 00:58:10
                    > via lo0.1
2.2.2.2/32         *[RIP/100] 00:01:38, metric 2, tag 0
                    > to 8.8.12.2 via em1.12
3.3.3.3/32         *[RIP/100] 00:01:38, metric 3, tag 0
                    > to 8.8.12.2 via em1.12
8.8.12.0/24        *[Direct/0] 00:01:38
                    > via em1.12
8.8.12.1/32        *[Local/0] 00:01:38
                      Local via em1.12
8.8.23.0/24        *[RIP/100] 00:01:38, metric 2, tag 0
                    > to 8.8.12.2 via em1.12
224.0.0.9/32       *[RIP/100] 00:01:38, metric 1
                      MultiRecv

root@JNCIE>

root@JNCIE> show route logical-system R2  

inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

1.1.1.1/32         *[RIP/100] 00:01:40, metric 2, tag 0
                    > to 8.8.12.1 via em2.12
2.2.2.2/32         *[Direct/0] 00:58:12
                    > via lo0.2
3.3.3.3/32         *[RIP/100] 00:01:40, metric 2, tag 0
                    > to 8.8.23.3 via em2.23
8.8.12.0/24        *[Direct/0] 00:01:40
                    > via em2.12
8.8.12.2/32        *[Local/0] 00:01:40
                      Local via em2.12
8.8.23.0/24        *[Direct/0] 00:01:40
                    > via em2.23
8.8.23.2/32        *[Local/0] 00:01:40
                      Local via em2.23
224.0.0.9/32       *[RIP/100] 00:01:40, metric 1
                      MultiRecv

root@JNCIE>

root@JNCIE> show route logical-system R3  

inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

1.1.1.1/32         *[RIP/100] 00:01:43, metric 3, tag 0
                    > to 8.8.23.2 via em3.23
2.2.2.2/32         *[RIP/100] 00:01:43, metric 2, tag 0
                    > to 8.8.23.2 via em3.23
3.3.3.3/32         *[Direct/0] 00:58:15
                    > via lo0.3
8.8.12.0/24        *[RIP/100] 00:01:43, metric 2, tag 0
                    > to 8.8.23.2 via em3.23
8.8.23.0/24        *[Direct/0] 00:01:43
                    > via em3.23
8.8.23.3/32        *[Local/0] 00:01:43
                      Local via em3.23
224.0.0.9/32       *[RIP/100] 00:01:43, metric 1
                      MultiRecv

root@JNCIE>

Ping
root@JNCIE> ping 2.2.2.2 logical-system R1 rapid
PING 2.2.2.2 (2.2.2.2): 56 data bytes
!!!!!
--- 2.2.2.2 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.125/0.393/1.357/0.482 ms

root@JNCIE>

root@JNCIE> ping 3.3.3.3 logical-system R1 rapid  
PING 3.3.3.3 (3.3.3.3): 56 data bytes
!!!!!
--- 3.3.3.3 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.257/0.438/0.684/0.171 ms

root@JNCIE>

root@JNCIE> ping 1.1.1.1 logical-system R2 rapid  
PING 1.1.1.1 (1.1.1.1): 56 data bytes
!!!!!
--- 1.1.1.1 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.126/0.160/0.226/0.036 ms

root@JNCIE>

root@JNCIE> ping 3.3.3.3 logical-system R2 rapid  
PING 3.3.3.3 (3.3.3.3): 56 data bytes
!!!!!
--- 3.3.3.3 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.147/0.211/0.303/0.071 ms

root@JNCIE>

root@JNCIE> ping 1.1.1.1 logical-system R3 rapid  
PING 1.1.1.1 (1.1.1.1): 56 data bytes
!!!!!
--- 1.1.1.1 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.259/0.313/0.364/0.038 ms

root@JNCIE>

root@JNCIE> ping 2.2.2.2 logical-system R3 rapid  
PING 2.2.2.2 (2.2.2.2): 56 data bytes
!!!!!
--- 2.2.2.2 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.147/0.224/0.449/0.113 ms

root@JNCIE>


Final configuration
root@JNCIE# show | display set  
set version 12.1R1.9
set system host-name JNCIE
set system root-authentication encrypted-password "$1$Luohd5lf$6ikSsNi1iEX/147eHbqm7."
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set logical-systems R1 interfaces em1 unit 12 vlan-id 12
set logical-systems R1 interfaces em1 unit 12 family inet address 8.8.12.1/24
set logical-systems R1 interfaces lo0 unit 1 family inet address 1.1.1.1/32
set logical-systems R1 protocols rip group R1_RIP export R1_RIP_OUT
set logical-systems R1 protocols rip group R1_RIP neighbor em1.12
set logical-systems R1 policy-options policy-statement R1_RIP_OUT term 1 from protocol direct
set logical-systems R1 policy-options policy-statement R1_RIP_OUT term 1 from protocol rip
set logical-systems R1 policy-options policy-statement R1_RIP_OUT term 1 then accept
set logical-systems R2 interfaces em2 unit 12 vlan-id 12
set logical-systems R2 interfaces em2 unit 12 family inet address 8.8.12.2/24
set logical-systems R2 interfaces em2 unit 23 vlan-id 23
set logical-systems R2 interfaces em2 unit 23 family inet address 8.8.23.2/24
set logical-systems R2 interfaces lo0 unit 2 family inet address 2.2.2.2/32
set logical-systems R2 protocols rip group R2_RIP export R2_RIP_OUT
set logical-systems R2 protocols rip group R2_RIP neighbor em2.12
set logical-systems R2 protocols rip group R2_RIP neighbor em2.23
set logical-systems R2 policy-options policy-statement R2_RIP_OUT term 1 from protocol direct
set logical-systems R2 policy-options policy-statement R2_RIP_OUT term 1 from protocol rip
set logical-systems R2 policy-options policy-statement R2_RIP_OUT term 1 then accept
set logical-systems R3 interfaces em3 unit 23 vlan-id 23
set logical-systems R3 interfaces em3 unit 23 family inet address 8.8.23.3/24
set logical-systems R3 interfaces lo0 unit 3 family inet address 3.3.3.3/32
set logical-systems R3 protocols rip group R3_RIP export R3_RIP_OUT
set logical-systems R3 protocols rip group R3_RIP neighbor em3.23
set logical-systems R3 policy-options policy-statement R3_RIP_OUT term 1 from protocol direct
set logical-systems R3 policy-options policy-statement R3_RIP_OUT term 1 from protocol rip
set logical-systems R3 policy-options policy-statement R3_RIP_OUT term 1 then accept
set interfaces em1 vlan-tagging
set interfaces em2 vlan-tagging
set interfaces em3 vlan-tagging 

root@JNCIE>


Reference:
RIP Configuration Guide (JunOS 12.1)
http://www.juniper.net/techpubs/en_US/junos12.1/information-products/pathway-pages/config-guide-routing/config-guide-routing-rip.html#configuration


最初發表 / 最後更新: 2014.02.14 / 2018.06.03

0 comments:

張貼留言