Nothing Special   »   [go: up one dir, main page]

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Lab1: Learning Juniper Logical System

and Routing Protocol (Static & RIP)


Brief Introduction
As Juniper vMX images require good amount of CPU, RAM and HD. There is a way to
create logical router within Juniper device that make it work as separate Router with its
own Routing Table (RPD), Interfaces etc. With Logical system single vMX can simulate
upto 16 MX routers (including Master Routing Instance).

In the series of Labs we will learn how to make Large topologies using single or couple
of vMX nodes using Logical Systems and run Routing Protocols like Static, RIP and
OSPF, BGP and other technologies like MPLS and its Applications (like MPLS L3VPN,
L2VPN – Martini, L2VPN – Kompella, VPLS etc). We can also create Bridge Domain on
MX nodes to create small Layer 2 Switch.
Now a days most of the Enterprise or Service Provider environment consist of multiple
vendors. Here we also learn the multi-vendor environment and its interoperability
aspects (starting with Cisco and Juniper and we will add more vendors like Nokia,
Huawei later).
These will be series of Lab using the same topology. Where we learn about how to
configure Routing Protocol and different technologies & scenarios.
Requirements
• Basic knowledge of JunOS and Cisco IOS CLI.
• Routing Protocol understanding (Static, RIP and OSPF)
• Basic Switching (VLANs)
Physical Lab Topology
Logical Lab Topology (including Lab1

Lab1 Objective
• Configure Multiple Logical System on vMX node to build logical topology
• Configure VLANs/Sub-interfaces (called units in JunOS) on Juniper & Cisco
devices to setup IP connectivity.
• Basic Trunk Ports on Cisco Switch (to allow all VLANs).
• Configure Static Routing between R2 (Juniper vMX) and R8 (Cisco vIOS).
• Configure RIP between R7 (Cisco vIOS) and R4 (Juniper vMX).
Lab Setup: ! " #
$% & '()*

+ , , , " , - , , " #*
*.. #. ., . , / ,0 1
*.. #. ., . , / ,0 2

, , 3 , , 45 % ,
! ! - , 4& , 6 , 7 - , "
- , " , " 8 9 : #
:; &) # " , " , $ *3 "
# , " , , " "
FreeBSD/amd64 (Amnesiac) (ttyu0)

login: root
Password:
Last login: Sun Sep 6 07:11:26 on ttyu0

--- JUNOS 17.1R2.7 Kernel 64-bit JNPR-10.3-20170607.351421_build


root@:~ # cli

root> configure
root# set system root-authentication plain-text-password
New password: Lab123
Retype new password: Lab123

[edit]
root# commit
commit complete

Note: Now this juniper node will login via user root, password Lab123.
Solution

Task 1: Configure Multiple Logical System on vMX node to build logical topology. There
are total of 6 logical system (we will not use Master Routing instance) R1 to R6 and
configure them as per following VLANs/Sub-Interfaces & IP addresses:
Connection VLAN-ID IP Subnet IP Addresses
R1 - R2 10 192.168.1.0/30 R1 (192.168.1.1) – R2 (192.168.1.2)
R2 - R3 11 192.168.1.0/30 R1 (192.168.1.1) – R2 (192.168.1.2)
R3 – R4 12 192.168.1.0/30 R1 (192.168.1.1) – R2 (192.168.1.2)
R1 – R4 13 192.168.1.0/30 R1 (192.168.1.1) – R2 (192.168.1.2)
R1 – R5 15 192.168.1.0/30 R1 (192.168.1.1) – R2 (192.168.1.2)
R3 – R6 14 192.168.1.0/30 R1 (192.168.1.1) – R2 (192.168.1.2)
R2 – R8 N/A 192.168.1.0/30 R1 (192.168.1.1) – R2 (192.168.1.2)
R4 – R7 N/A 192.168.1.0/30 R1 (192.168.1.1) – R2 (192.168.1.2)
R1 Loopback N/A N/A 1.1.1.1/32
R2 Loopback N/A N/A 2.2.2.2/32
R3 Loopback N/A N/A 3.3.3.3/32
R4 Loopback N/A N/A 4.4.4.4/32
R5 Loopback N/A N/A 5.5.5.5/32
R6 Loopback N/A N/A 6.6.6.6/32
R7 Loopback N/A N/A 7.7.7.7/32
R8 Loopback N/A N/A 8.8.8.8/32
! " - <.< , <. 7 , " &6$ <=>< - -
" # , - &6$ " - , 8- # #9
-
interface GigabitEthernet0/0
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface GigabitEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
!
vlan 10-20
!
vtp mode transparent

Note: Do save the configuration with command “wr” (short of write memory).

"
interfaces {
ge-0/0/2 {
flexible-vlan-tagging;
}
ge-0/0/3 {
flexible-vlan-tagging;
}
}
logical-systems {
R1 {
interfaces {
ge-0/0/2 {
unit 10 {
vlan-id 10;
family inet {
address 192.168.1.1/30;
}
}
unit 15 {
vlan-id 15;
family inet {
address 192.168.1.17/30;
}
}
}
ge-0/0/3 {
unit 13 {
vlan-id 13;
family inet {
address 192.168.1.14/30;
}
}
}
lo0 {
unit 1 {
family inet {
address 1.1.1.1/32;
}
}
}
}
}
R2 {
interfaces {
ge-0/0/2 {
unit 11 {
vlan-id 11;
family inet {
address 192.168.1.5/30;
}
}
}
ge-0/0/3 {
unit 10 {
vlan-id 10;
family inet {
address 192.168.1.2/30;
}
}
}
ge-0/0/4 {
unit 0 {
family inet {
address 192.168.1.29/30;
}
}
}
lo0 {
unit 2 {
family inet {
address 2.2.2.2/32;
}
}
}
}
}
R3 {
interfaces {
ge-0/0/2 {
unit 12 {
vlan-id 12;
family inet {
address 192.168.1.9/30;
}
}
unit 14 {
vlan-id 14;
family inet {
address 192.168.1.21/30;
}
}
}
ge-0/0/3 {
unit 11 {
vlan-id 11;
family inet {
address 192.168.1.6/30;
}
}
}
lo0 {
unit 3 {
family inet {
address 3.3.3.3/32;
}
}
}
}
}
R4 {
interfaces {
ge-0/0/0 {
unit 0 {
family inet {
address 192.168.1.25/30;
}
}
}
ge-0/0/2 {
unit 13 {
vlan-id 13;
family inet {
address 192.168.1.13/30;
}
}
}
ge-0/0/3 {
unit 12 {
vlan-id 12;
family inet {
address 192.168.1.10/30;
}
}
}
lo0 {
unit 4 {
family inet {
address 4.4.4.4/32;
}
}
}
}
}
R5 {
interfaces {
ge-0/0/3 {
unit 15 {
vlan-id 15;
family inet {
address 192.168.1.18/30;
}
}
}
lo0 {
unit 5 {
family inet {
address 5.5.5.5/32;
}
}
}
}
}
R6 {
interfaces {
ge-0/0/3 {
unit 14 {
vlan-id 14;
family inet {
address 192.168.1.22/30;
}
}
}
lo0 {
unit 6 {
family inet {
address 6.6.6.6/32;
}
}
}
}
}
}

Note: Do commit after every config change to make it effect.

root# run show interfaces terse


Interface Admin Link Proto Local Remote
ge-0/0/0 up up
ge-0/0/0.0 up up inet 192.168.1.25/30
multiservice
lc-0/0/0 up up
lc-0/0/0.32769 up up vpls
pfe-0/0/0 up up
pfe-0/0/0.16383 up up inet
inet6
pfh-0/0/0 up up
pfh-0/0/0.16383 up up inet
pfh-0/0/0.16384 up up inet
ge-0/0/1 up up
ge-0/0/2 up up
ge-0/0/2.10 up up inet 192.168.1.1/30
multiservice
ge-0/0/2.11 up up inet 192.168.1.5/30
multiservice
ge-0/0/2.12 up up inet 192.168.1.9/30
multiservice
ge-0/0/2.13 up up inet 192.168.1.13/30
multiservice
ge-0/0/2.14 up up inet 192.168.1.21/30
multiservice
ge-0/0/2.15 up up inet 192.168.1.17/30
multiservice
ge-0/0/2.32767 up up multiservice
ge-0/0/3 up up
ge-0/0/3.10 up up inet 192.168.1.2/30
multiservice
ge-0/0/3.11 up up inet 192.168.1.6/30
multiservice
ge-0/0/3.12 up up inet 192.168.1.10/30
multiservice
ge-0/0/3.13 up up inet 192.168.1.14/30
multiservice
ge-0/0/3.14 up up inet 192.168.1.22/30
multiservice
ge-0/0/3.15 up up inet 192.168.1.18/30
multiservice
ge-0/0/3.32767 up up multiservice
ge-0/0/4 up up
ge-0/0/4.0 up up inet 192.168.1.29/30
multiservice

root> 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] 01:02:15


> via lo0.1
192.168.1.0/30 *[Direct/0] 01:02:15
> via ge-0/0/2.10
192.168.1.1/32 *[Local/0] 01:02:15
Local via ge-0/0/2.10
192.168.1.12/30 *[Direct/0] 01:02:15
> via ge-0/0/3.13
192.168.1.14/32 *[Local/0] 01:02:15
Local via ge-0/0/3.13
192.168.1.16/30 *[Direct/0] 01:02:15
> via ge-0/0/2.15
192.168.1.17/32 *[Local/0] 01:02:15
Local via ge-0/0/2.15

PING Test: R1 to R2
root> ping 192.168.1.2 logical-system R1
PING 192.168.1.2 (192.168.1.2): 56 data bytes
64 bytes from 192.168.1.2: icmp_seq=0 ttl=64 time=170.766 ms
64 bytes from 192.168.1.2: icmp_seq=1 ttl=64 time=1077.025 ms
64 bytes from 192.168.1.2: icmp_seq=2 ttl=64 time=106.383 ms
64 bytes from 192.168.1.2: icmp_seq=3 ttl=64 time=1024.479 ms
64 bytes from 192.168.1.2: icmp_seq=4 ttl=64 time=37.650 ms
^C
--- 192.168.1.2 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 37.650/483.261/1077.025/465.560 ms

Simply repeat for all Link Interfaces from respective Logical System.
Task 2: Configure Static route on vMX R2 to reach loopback Interface 8.8.8.8 on R8.
Similarly configure Static route on vIOS R8 to reach loopback interface 2.2.2.2 on R2.
(Note: Configure vIOS R8 interfaces based on the diagram).

):; 5? " *
hostname R8
!
interface Loopback1
ip address 8.8.8.8 255.255.255.255
!
interface GigabitEthernet0/0
ip address 192.168.1.30 255.255.255.252
no shutdown
!

#Static Route:
ip route 2.2.2.2 255.255.255.255 192.168.1.29

5> " *
logical-systems {
routing-options {
static {
route 8.8.8.8/32 next-hop 192.168.1.30;
}
}
}
}

R8#sh ip route static

Gateway of last resort is not set

2.0.0.0/32 is subnetted, 1 subnets


S 2.2.2.2 [1/0] via 192.168.1.29
R8#

root> show route logical-system R2 protocol static

inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)


+ = Active Route, - = Last Active, * = Both

8.8.8.8/32 *[Static/5] 00:08:26


> to 192.168.1.30 via ge-0/0/4.0

root> ping 8.8.8.8 source 2.2.2.2 logical-system R2


PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=0 ttl=255 time=1111.864 ms
64 bytes from 8.8.8.8: icmp_seq=1 ttl=255 time=208.218 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=255 time=96.119 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=255 time=122.362 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=255 time=5.348 ms
^C
--- 8.8.8.8 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 5.348/308.782/1111.864/406.720 ms

Task 3: Configure RIP between Cisco vIOS R7 and Juniper vMX R4. Advertise loopback
routes in RIP. (Note: Configure vIOS R7 interfaces based on the diagram).

):; 5 " *
hostname R7
!
interface Loopback1
ip address 7.7.7.7 255.255.255.255
!
interface GigabitEthernet0/0
ip address 192.168.1.26 255.255.255.252
no shutdown
!
router rip
version 2
network 7.0.0.0
network 192.168.1.0
no auto-summary
!

52 " *

$ * @ " = # , , " " 5)


" # A B #
#
logical-systems {
R4 {
protocols {
rip {
group RIPv2 {
export RIP-POLICY;
neighbor ge-0/0/0.0;
}
}
}
policy-options {
policy-statement RIP-POLICY {
term 1 {
from protocol direct;
then accept;
}
}
}
}
}

R7#sh ip route rip

Gateway of last resort is not set

4.0.0.0/32 is subnetted, 1 subnets


R 4.4.4.4 [120/1] via 192.168.1.25, 00:00:05, GigabitEthernet0/0
192.168.1.0/24 is variably subnetted, 4 subnets, 2 masks
R 192.168.1.8/30 [120/1] via 192.168.1.25, 00:00:05,
GigabitEthernet0/0
R 192.168.1.12/30
[120/1] via 192.168.1.25, 00:00:05, GigabitEthernet0/0

root# run show route logical-system R4 protocol rip

inet.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden)


+ = Active Route, - = Last Active, * = Both

7.7.7.7/32 *[RIP/100] 00:04:54, metric 2, tag 0


> to 192.168.1.26 via ge-0/0/0.0
224.0.0.9/32 *[RIP/100] 00:01:36, metric 1
MultiRecv

root# run ping 7.7.7.7 source 4.4.4.4 logical-system R4


PING 7.7.7.7 (7.7.7.7): 56 data bytes
64 bytes from 7.7.7.7: icmp_seq=0 ttl=255 time=870.780 ms
64 bytes from 7.7.7.7: icmp_seq=1 ttl=255 time=403.566 ms
64 bytes from 7.7.7.7: icmp_seq=2 ttl=255 time=7.725 ms
64 bytes from 7.7.7.7: icmp_seq=3 ttl=255 time=3.599 ms
^C
--- 7.7.7.7 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/stddev = 3.599/321.417/870.780/356.356 ms

You might also like