JNCIE-SP Mock Lab 1

Self-authored practice lab aligned to the JNCIE-SP (JPR-962) exam objectives. Service provider AS 65030 with 8 Junos routers, 31 tasks in 6 sections, with full configuration solutions and verification commands.

  • Suggested time 6 hours
  • 31 tasks, 6 sections
  • Self-graded, pass 70/100 points

Self-authored practice lab by RoutingBit, written against the public exam topics. This is not a real exam and contains no vendor exam content. Topology, addressing and requirements are entirely new.

This is a self-authored practice lab by RoutingBit. It is not a real exam and does not reproduce any Juniper exam content. Topology, addressing and requirements are entirely new. The goal is to practice reading a long lab, managing your time and configuring at the pace of a JNCIE-SP lab: many interdependent sections, pre-seeded faults to find, and requirements written as "ensure the outcome" rather than "configure this".

You can rebuild the topology with vJunos-router or vMX on EVE-NG, PNETLab or Containerlab. Without a lab, read each task, write your configuration on paper, then open the solution.

#Lab rules

  • Suggested time: 6 hours, the same as the current JPR-962 lab. Spend the first 15 minutes reading the whole lab and redrawing the diagram.
  • 100 points in total across 6 sections. Self-assessment: 70 points or more with no section below half of its points means you are probably ready.
  • Do not use static routes unless a task allows it. Do not modify the CE, ISP or external peer configurations (grey devices).
  • All configuration must survive a reboot. Later tasks can depend on earlier ones, read the "Related" notes in the solutions carefully.
  • When a task says "ensure", the proctor verifies with show commands and real traffic, not only by reading the configuration.

#Physical topology

Physical topology of JNCIE-SP mock lab 1, AS 65030 with 8 Junos routers RR1172.30.255.20 CUST-C1 CUST-A1OSPF PE1172.30.255.11 P1172.30.255.1 PE3172.30.255.13ISP-XAS 100 SW-E1VLAN 300 CUST-B2AS 64700 CUST-B1AS 64700 PE2172.30.255.12 P2172.30.255.2 PE4172.30.255.14ISP-YAS 200 CUST-A2AS 64601 PE5172.30.255.15PEER-ZAS 300 SW-E2 CUST-C2 ge-0/0/0ge-0/0/1ge-0/0/0ge-0/0/1ge-0/0/1ge-0/0/1ae0ge-0/0/4ge-0/0/0ge-0/0/4ge-0/0/0ge-0/0/1ge-0/0/1ge-0/0/2ge-0/0/3ge-0/0/2ge-0/0/2ge-0/0/3ge-0/0/2
Physical topology of JNCIE-SP mock lab 1, AS 65030 with 8 Junos routers

Port names for the cross links are in the addressing table below. Bundle ae0 between P1 and P2 consists of ge-0/0/2 and ge-0/0/3 on both sides. SW-E1 connects to PE1 and PE2 with a single LACP bundle on the switch side.

#Addressing

IPv4 loopbacks are 172.30.255.X/32 as shown in the diagram. IS-IS NETs are derived from the loopback, for example P1 is 49.0001.1720.3025.5001.00 and PE3 is 49.0002.1720.3025.5013.00. The fxp0 management network is 172.30.250.0/24, NTP server 172.30.250.10, syslog 172.30.250.20.

Link Side A Side B Subnet Notes
L1 PE1 ge-0/0/0 (.1) P1 ge-0/0/1 (.2) 10.30.1.0/30 IS-IS L1, LDP
L2 PE2 ge-0/0/0 (.1) P2 ge-0/0/1 (.2) 10.30.2.0/30 IS-IS L1, LDP
L3 PE1 ge-0/0/1 (.1) PE2 ge-0/0/1 (.2) 10.30.3.0/30 IS-IS L1, LDP
L4 P1 ae0 (.1) P2 ae0 (.2) 10.30.4.0/30 IS-IS L2, RSVP
L5 P1 ge-0/0/4 (.1) PE3 ge-0/0/0 (.2) 10.30.5.0/30 IS-IS L2, RSVP
L6 P2 ge-0/0/4 (.1) PE4 ge-0/0/0 (.2) 10.30.6.0/30 IS-IS L2, RSVP
L7 PE3 ge-0/0/1 (.1) PE4 ge-0/0/1 (.2) 10.30.7.0/30 IS-IS L2, RSVP
L8 P2 ge-0/0/5 (.1) PE5 ge-0/0/0 (.2) 10.30.8.0/30 IS-IS L2, RSVP
L9 PE4 ge-0/0/2 (.1) PE5 ge-0/0/1 (.2) 10.30.9.0/30 IS-IS L2, RSVP
L10 P1 ge-0/0/0 (.1) RR1 ge-0/0/0 (.2) 10.30.10.0/30 IS-IS L2
External connection PE port IPv4 subnet (PE / far end) IPv6 Far-end AS
ISP-X PE3 ge-0/0/2 198.51.100.0/30 (.1 / .2) 2001:db8:ff00:1::/64 (::1 / ::2) 100
ISP-Y PE4 ge-0/0/3 198.51.100.4/30 (.5 / .6) 2001:db8:ff00:2::/64 (::1 / ::2) 200
PEER-Z PE5 ge-0/0/2 198.51.100.8/30 (.9 / .10) none 300
CUST-A1 PE1 ge-0/0/2 10.100.1.0/30 (.1 / .2) none OSPF area 0
CUST-A2 PE5 ge-0/0/3 10.100.5.0/30 (.1 / .2) none 64601
CUST-B1 PE2 ge-0/0/2 10.100.2.0/30 (.1 / .2) none 64700
CUST-B2 PE4 ge-0/0/4 10.100.4.0/30 (.1 / .2) none 64700

The provider AS is 65030. The provider public ranges are 203.0.113.0/24 and 2001:db8:3000::/48. PE1 also has 203.0.113.1/32 and 2001:db8:3000::11/128 on lo0.0, and PE2 has 203.0.113.2/32 on lo0.0 (DNS service addresses).

#Protocol domains

Two-level IS-IS, the LDP domain in area 49.0001 and the RSVP-TE domain in the level 2 core Area 49.0001, L1, LDPArea 49.0002, L2, RSVP-TE PE1L1 only PE2L1 only P149.0001, L1/L2 P249.0001, L1/L2 PE3L2 only RR1L2, overload PE4L2 only PE5L2 only Dashed: IS-IS L1 + LDP. Solid: IS-IS L2 + RSVP. RR1 runs IS-IS only, no MPLS.
Two-level IS-IS, the LDP domain in area 49.0001 and the RSVP-TE domain in the level 2 core
  • PE1 and PE2 run level 1 only. P1 and P2 are the L1/L2 routers of area 49.0001. PE3, PE4, PE5 and RR1 are in area 49.0002 and run level 2 only.
  • The core has no BGP on P1 and P2 (BGP-free core). All traffic between PEs must use LSPs.

#BGP sessions

iBGP through route reflector RR1 and the eBGP sessions leaving AS 65030 PE1 PE2 RR1cluster 172.30.255.20 PE3 PE4 PE5ISP-XISP-YPEER-Z
iBGP through route reflector RR1 and the eBGP sessions leaving AS 65030

#Initial configuration

The routers already have: hostname, IPv4 addresses on all core links and loopbacks, family iso on most interfaces, a basic IS-IS configuration, and part of the MPLS and BGP configuration. The initial configuration intentionally contains faults. Tasks include excerpts of the initial configuration where needed, but do not assume the faults are only in the excerpts.

#Point distribution

Section Content Points
1 Device infrastructure, RE protection 12
2 IGP (IS-IS) 18
3 BGP 22
4 MPLS 18
5 VPN 20
6 Class of Service 10

Section 1. Device infrastructure12 points

Task 1

Configuration annotation and NOC login class

2 points
  1. On all 8 routers, annotate the system stanza with Mock JNCIE-SP so 1, RoutingBit.
  2. Create user noc in class NOC. This class can view everything including the configuration, cannot enter configuration mode, and is allowed to run exactly one operational change: clear bgp neighbor <IPv4 address> soft. noc sessions must time out after 15 idle minutes.
Show solution

Annotations are added with the annotate command at the [edit] level, above the stanza being annotated:

[edit]
user@PE1# annotate system "Mock JNCIE-SP so 1, RoutingBit"

The login class uses the view and view-configuration permissions, then opens a single command with allow-commands. Anchor the regular expression at both ends so that clear bgp neighbor all does not slip through:

set system login class NOC idle-timeout 15
set system login class NOC permissions [ view view-configuration ]
set system login class NOC allow-commands "^clear bgp neighbor [0-9.]+ soft$"
set system login user noc class NOC authentication plain-text-password

Verification: log in as noc, run show configuration (allowed), configure (denied), clear bgp neighbor 172.30.255.20 soft (allowed), clear bgp neighbor all (denied). show cli authorization displays the permissions of the current session.

Task 2

Routing Engine protection filter on PE3

5 points

On PE3, create IPv4 filter PROTECT-RE applied to lo0.0 that meets the following:

  • SSH only from the management network 172.30.250.0/24.
  • BGP only from neighbors currently configured on PE3. Adding a new neighbor must not require editing the filter.
  • NTP only from server 172.30.250.10.
  • ICMP is allowed but limited to 1 Mbps, with the excess discarded.
  • Traceroute to and through PE3 must still work.
  • Every other protocol this lab requires PE3 to run (including in later sections) must not be affected.
  • Everything else must be silently discarded, counted and logged to syslog.
Show solution

The hard part of this task is "protocols in later sections". Reviewing the whole lab, PE3 runs: IS-IS (not IP, so an inet filter does not touch it), RSVP (protocol 46), LDP (targeted sessions over LSPs in t19 and the l2circuit in t27, TCP and UDP port 646), BFD with ISP-X (UDP 3784, multihop 4784), and BGP with RR1 and ISP-X.

The BGP neighbor list is built automatically with apply-path, so the filter updates itself when a neighbor is added:

set policy-options prefix-list BGP-PEERS apply-path "protocols bgp group <*> neighbor <*>"
set policy-options prefix-list MGMT 172.30.250.0/24
set policy-options prefix-list NTP-SERVERS 172.30.250.10/32
set policy-options prefix-list LDP-PEERS 172.30.255.0/24
set policy-options prefix-list LDP-PEERS 10.30.0.0/16

set firewall policer POL-ICMP-1M if-exceeding bandwidth-limit 1m
set firewall policer POL-ICMP-1M if-exceeding burst-size-limit 15k
set firewall policer POL-ICMP-1M then discard

set firewall family inet filter PROTECT-RE term BGP from source-prefix-list BGP-PEERS
set firewall family inet filter PROTECT-RE term BGP from protocol tcp
set firewall family inet filter PROTECT-RE term BGP from port bgp
set firewall family inet filter PROTECT-RE term BGP then accept
set firewall family inet filter PROTECT-RE term SSH from source-prefix-list MGMT
set firewall family inet filter PROTECT-RE term SSH from protocol tcp
set firewall family inet filter PROTECT-RE term SSH from destination-port ssh
set firewall family inet filter PROTECT-RE term SSH then accept
set firewall family inet filter PROTECT-RE term NTP from source-prefix-list NTP-SERVERS
set firewall family inet filter PROTECT-RE term NTP from protocol udp
set firewall family inet filter PROTECT-RE term NTP from port ntp
set firewall family inet filter PROTECT-RE term NTP then accept
set firewall family inet filter PROTECT-RE term RSVP from protocol rsvp
set firewall family inet filter PROTECT-RE term RSVP then accept
set firewall family inet filter PROTECT-RE term LDP from source-prefix-list LDP-PEERS
set firewall family inet filter PROTECT-RE term LDP from protocol [ tcp udp ]
set firewall family inet filter PROTECT-RE term LDP from port ldp
set firewall family inet filter PROTECT-RE term LDP then accept
set firewall family inet filter PROTECT-RE term BFD from protocol udp
set firewall family inet filter PROTECT-RE term BFD from destination-port [ 3784 4784 ]
set firewall family inet filter PROTECT-RE term BFD then accept
set firewall family inet filter PROTECT-RE term TRACEROUTE from protocol udp
set firewall family inet filter PROTECT-RE term TRACEROUTE from destination-port 33434-33534
set firewall family inet filter PROTECT-RE term TRACEROUTE then accept
set firewall family inet filter PROTECT-RE term ICMP from protocol icmp
set firewall family inet filter PROTECT-RE term ICMP then policer POL-ICMP-1M
set firewall family inet filter PROTECT-RE term ICMP then accept
set firewall family inet filter PROTECT-RE term TCP-EST from protocol tcp
set firewall family inet filter PROTECT-RE term TCP-EST from tcp-established
set firewall family inet filter PROTECT-RE term TCP-EST then accept
set firewall family inet filter PROTECT-RE term DENY then count DENY-RE
set firewall family inet filter PROTECT-RE term DENY then syslog
set firewall family inet filter PROTECT-RE term DENY then discard

set interfaces lo0 unit 0 family inet filter input PROTECT-RE

Common ways to lose points:

  • from port bgp matches both source and destination port, so sessions opened by PE3 and sessions opened by the peer both pass.
  • discard drops silently, while reject sends ICMP back, which violates the requirement.
  • The lo0 filter also applies to traffic arriving on fxp0, so SSH from the management network still needs its own term.
  • apply-path also puts the ISP-X IPv6 neighbor into the prefix list. A family inet filter only uses the IPv4 entries, and the IPv6 session does not pass through this filter.
  • Use commit confirmed 5 when applying a lo0 filter to avoid locking yourself out.

Verification:

show firewall filter PROTECT-RE
show firewall log
show bgp summary
show ldp session
show rsvp neighbor
show bfd session

Every session must stay Up after the filter is applied. Try SSH from an address outside 172.30.250.0/24 (for example from P1 with ssh 172.30.255.13 source 172.30.255.1) and watch the DENY-RE counter increase.

Task 3

NTP, syslog and SNMP

3 points

On all routers:

  1. Synchronize NTP with 172.30.250.10 using MD5 authentication key 1, value RB-NTP.
  2. Send firewall filter logs and authorization logs (info level) to syslog 172.30.250.20. Logs must be sent in structured-data format.
  3. Record every command typed by users to a local file cli-log, keeping 5 files of 1 MB each.
  4. SNMP v2c, community RB-RO read-only, allowed only from the management network.
Show solution
set system ntp authentication-key 1 type md5 value RB-NTP
set system ntp trusted-key 1
set system ntp server 172.30.250.10 key 1 prefer

set system syslog host 172.30.250.20 firewall any
set system syslog host 172.30.250.20 authorization info
set system syslog host 172.30.250.20 structured-data
set system syslog file cli-log interactive-commands any
set system syslog file cli-log archive size 1m files 5

set snmp community RB-RO authorization read-only
set snmp community RB-RO clients 172.30.250.0/24
  • The syslog action in the t02 filter generates logs in the firewall facility, so the host ... firewall any line is what ties the two tasks together.
  • trusted-key is mandatory, without it the key is declared but never used.
  • On PE3, NTP works thanks to the NTP term in t02. The other routers have no lo0 filter and are not affected.

Verification: show ntp associations (* next to the server), show ntp status, show log cli-log, show snmp statistics. For syslog, show log messages | match PROTECT on PE3 when packets are blocked.

Task 4

Event policy when the IXP link goes down

2 points

On PE5, whenever interface ge-0/0/2 (the link to PEER-Z) goes down, the router must automatically run show bgp summary and show route receive-protocol bgp 198.51.100.10 and save the output as text in /var/tmp/, with a file name starting with ixp-down. Nothing must run when other interfaces go down.

Show solution

The SNMP_TRAP_LINK_DOWN event has an interface-name attribute, use attributes-match to select the right port:

set event-options policy IXP-DOWN events snmp_trap_link_down
set event-options policy IXP-DOWN attributes-match snmp_trap_link_down.interface-name matches "^ge-0/0/2$"
set event-options policy IXP-DOWN then execute-commands commands "show bgp summary"
set event-options policy IXP-DOWN then execute-commands commands "show route receive-protocol bgp 198.51.100.10"
set event-options policy IXP-DOWN then execute-commands output-filename ixp-down
set event-options policy IXP-DOWN then execute-commands destination LOCAL-TMP
set event-options policy IXP-DOWN then execute-commands output-format text
set event-options destinations LOCAL-TMP archive-sites /var/tmp

Verification: set interfaces ge-0/0/2 disable and commit, then file list /var/tmp/ | match ixp-down and file show /var/tmp/<file name>. Remember to remove disable after testing. help syslog SNMP_TRAP_LINK_DOWN lists the event attributes.

Section 2. IGP18 points

Task 5

Restore all IS-IS adjacencies

5 points

Ensure that every IS-IS adjacency in the "Protocol domains" diagram is Up at the correct level. Additional requirements:

  • ae0 between P1 and P2 uses LACP, with P1 active and fast LACPDUs. Both member links must carry traffic.
  • Level 1 uses MD5 authentication with key RB-L1 for both hellos and LSPs.
  • Core link MTU is 9192 on both ends.

Initial configuration excerpt:

P1:
set chassis aggregated-devices ethernet device-count 1
set interfaces ge-0/0/0 mtu 9192
set interfaces ge-0/0/2 gigether-options 802.3ad ae0
set interfaces ge-0/0/3 description "to P2 ge-0/0/3"
set interfaces ae0 mtu 9192
set interfaces ae0 aggregated-ether-options lacp passive
set interfaces ae0 unit 0 family inet address 10.30.4.1/30
set interfaces ae0 unit 0 family iso
set protocols isis level 1 authentication-key RB-L1
set protocols isis level 1 authentication-type md5

P2:
set interfaces ge-0/0/2 gigether-options 802.3ad ae0
set interfaces ge-0/0/3 gigether-options 802.3ad ae0
set interfaces ae0 aggregated-ether-options lacp passive

PE2:
set protocols isis level 1 authentication-key RB_L1
set protocols isis level 1 authentication-type md5

PE4:
set interfaces ge-0/0/1 unit 0 family inet address 10.30.7.2/30

PE5:
set protocols isis level 2 disable
set protocols isis interface ge-0/0/0.0
set protocols isis interface ge-0/0/1.0

RR1:
set interfaces ge-0/0/0 mtu 1514
Show solution

There are five faults, each blocking one or more adjacencies:

  1. ae0 does not come up. With lacp passive on both ends, neither side sends LACPDUs. In addition, P1 is missing ge-0/0/3 in the bundle. P2 only needs changes if you want, P1 must be active.
  2. PE2 has the wrong level 1 key (RB_L1 instead of RB-L1). Authentication configured at the level applies to both hellos and LSPs, so a key mismatch keeps the adjacency down.
  3. PE4 ge-0/0/1 is missing family iso, so no hellos are sent on the PE3-PE4 link. Add family mpls as well, since the MPLS section needs it.
  4. PE5 disables the wrong level. PE5 must be L2 only, but the configuration disables level 2, while P2 and PE4 only run level 2 on their links to PE5.
  5. RR1 has an MTU mismatch. Junos pads IS-IS hellos up to the interface MTU. P1 sends 9192-byte hellos, RR1 with an MTU of 1514 drops them, and the adjacency is stuck in Initializing.
P1:
set chassis aggregated-devices ethernet device-count 2
set interfaces ge-0/0/3 gigether-options 802.3ad ae0
set interfaces ae0 aggregated-ether-options lacp active
set interfaces ae0 aggregated-ether-options lacp periodic fast
set protocols isis interface ae0.0 level 1 disable
set protocols isis interface ae0.0 point-to-point

P2:
set interfaces ae0 aggregated-ether-options lacp periodic fast
set protocols isis interface ae0.0 level 1 disable
set protocols isis interface ae0.0 point-to-point

PE2:
set protocols isis level 1 authentication-key RB-L1

PE4:
set interfaces ge-0/0/1 unit 0 family iso
set interfaces ge-0/0/1 unit 0 family mpls

PE5:
delete protocols isis level 2 disable
set protocols isis level 1 disable

RR1:
set interfaces ge-0/0/0 mtu 9192

device-count 2 on P1 leaves room for growth, and PE1 and PE2 also need device-count because of ae1 in t26. The P1-P2 link is level 2 only (per the diagram), so level 1 is disabled to avoid an extra L1 adjacency across the core.

Verification:

show lacp interfaces ae0
show interfaces ae0 extensive | match "Link|LACP"
show isis adjacency
show isis adjacency detail | match "Level|State"
show isis database

Expected result: P1 has an L1 adjacency with PE1 and L2 adjacencies with P2, PE3 and RR1. P2 has L1 with PE2 and L2 with P1, PE4 and PE5. show lacp interfaces ae0 shows both ge-0/0/2 and ge-0/0/3 in the Collecting distributing state.

Task 6

Non-transit router and BFD in the core

2 points
  1. RR1 must never be used as a transit path, but the RR1 loopback must remain reachable.
  2. After a reboot, PE3, PE4 and PE5 must not attract transit traffic for the first 180 seconds.
  3. IS-IS adjacencies on ae0 must detect failures within 1 second using BFD.
Show solution

The overload bit makes other routers stop computing paths through RR1, but prefixes directly attached to RR1 (including the loopback) are still advertised and reachable.

RR1:
set protocols isis overload

PE3, PE4, PE5:
set protocols isis overload timeout 180

P1, P2:
set protocols isis interface ae0.0 bfd-liveness-detection minimum-interval 300
set protocols isis interface ae0.0 bfd-liveness-detection multiplier 3

300 ms times 3 is 900 ms, under 1 second. Verification: show isis database RR1 extensive | match Overload, show bfd session, and show isis overview on PE3 (shows Overload bit at startup is set, timeout 180).

Task 7

Specific loopback routes for the level 1 area

3 points

By default PE1 and PE2 only use the default route derived from the ATT bit to leave the area. Ensure that PE1 and PE2 have /32 routes to the loopbacks of every level 2 router (range 172.30.255.0/24), and receive no other level 2 prefixes.

Show solution

Level 2 to level 1 leaking is done on the L1/L2 routers (P1, P2) with an IS-IS export policy. This policy is reused in t08, so give it a generic name, ISIS-EXPORT:

P1, P2:
set protocols isis level 1 wide-metrics-only
set protocols isis level 2 wide-metrics-only
set policy-options policy-statement ISIS-EXPORT term L2-TO-L1 from protocol isis
set policy-options policy-statement ISIS-EXPORT term L2-TO-L1 from level 2
set policy-options policy-statement ISIS-EXPORT term L2-TO-L1 from route-filter 172.30.255.0/24 prefix-length-range /32-/32
set policy-options policy-statement ISIS-EXPORT term L2-TO-L1 to level 1
set policy-options policy-statement ISIS-EXPORT term L2-TO-L1 then accept
set protocols isis export ISIS-EXPORT

This is not just about optimal routing. LDP only allocates labels for FECs that exactly match a route in the routing table. If PE1 only has a default route, there is no LDP LSP to 172.30.255.15/32, and every service from PE1 to PE5 (L3VPN, EVPN) breaks. Leaked routes carry the up/down bit so they are not pushed back into level 2, which avoids loops.

Verification on PE1: show route 172.30.255.0/24 protocol isis shows .1, .2, .13, .14, .15 and .20 as /32 routes. show route 10.30.0.0/16 protocol isis must not show level 2 link subnets (for example 10.30.7.0/30), only the links inside area 49.0001.

Task 8

Static route redistribution and summarization

3 points

PE1 already has four static routes 10.130.0.0/24, 10.130.1.0/24, 10.130.2.0/24 and 10.130.3.0/24 (next hop discard, used for customer management ranges). Redistribute them into IS-IS level 1. Level 2 must only see a single summary prefix with the most efficient mask, advertised by both P1 and P2.

Show solution

Four contiguous /24s from .0 to .3 fit exactly into one /22. PE1 is an L1-only router and only needs to export the static routes:

PE1:
set policy-options policy-statement STATIC-TO-ISIS term MGMT from protocol static
set policy-options policy-statement STATIC-TO-ISIS term MGMT from route-filter 10.130.0.0/22 longer
set policy-options policy-statement STATIC-TO-ISIS term MGMT then accept
set protocols isis export STATIC-TO-ISIS

On P1 and P2, create an aggregate (an aggregate is only active when it has contributing routes, here the four IS-IS routes from PE1), advertise it into level 2, and block the four specific routes from level 2. Add two terms before the L2-TO-L1 term from t07:

P1, P2:
set routing-options aggregate route 10.130.0.0/22
set policy-options policy-statement ISIS-EXPORT term SUMMARY from protocol aggregate
set policy-options policy-statement ISIS-EXPORT term SUMMARY from route-filter 10.130.0.0/22 exact
set policy-options policy-statement ISIS-EXPORT term SUMMARY to level 2
set policy-options policy-statement ISIS-EXPORT term SUMMARY then accept
set policy-options policy-statement ISIS-EXPORT term NO-SPECIFIC from route-filter 10.130.0.0/22 longer
set policy-options policy-statement ISIS-EXPORT term NO-SPECIFIC to level 2
set policy-options policy-statement ISIS-EXPORT term NO-SPECIFIC then reject
insert policy-options policy-statement ISIS-EXPORT term SUMMARY before term L2-TO-L1
insert policy-options policy-statement ISIS-EXPORT term NO-SPECIFIC after term SUMMARY

The NO-SPECIFIC term blocks explicitly, so the result is correct regardless of whether Junos automatically promotes level 1 external routes to level 2. Make sure the terms are in the right order, and check with show policy-options policy-statement ISIS-EXPORT.

Verification on PE3: show route 10.130.0.0/16 shows only 10.130.0.0/22, with two next hops or one depending on the metric. show isis database extensive | match 10.130 shows the prefix originated by both P1 and P2.

Task 9

Metrics

2 points
  1. Use wide metrics on every router and do not send narrow TLVs.
  2. The PE1-PE2 link has metric 100 in both directions. The ae0 link has metric 5. All other links keep metric 10.
Show solution
All routers:
set protocols isis level 1 wide-metrics-only
set protocols isis level 2 wide-metrics-only

PE1, PE2:
set protocols isis interface ge-0/0/1.0 level 1 metric 100

P1, P2:
set protocols isis interface ae0.0 level 2 metric 5

The Junos default metric is 10 for every interface (except lo0, which is 0), so the other links need no configuration. "Both directions" means configuring it on both PE1 and PE2, because IS-IS metrics are outbound. Verification: show isis interface and show isis database PE1.00-00 extensive | match "IS neighbor|Metric".

Task 10

Loop-free alternates on P2

3 points

On P2, the routes to PE4 and PE5 must have precomputed backup next hops installed in the forwarding table, protecting against failure of the neighboring node. The ae0 link only needs link protection.

Show solution
P2:
set protocols isis interface ge-0/0/4.0 node-link-protection
set protocols isis interface ge-0/0/5.0 node-link-protection
set protocols isis interface ae0.0 link-protection

LFA computes the backup next hops but only installs them in the PFE when the forwarding table allows multiple next hops. The load-balance policy in t15 takes care of that. If you do t10 before t15, create it now:

set policy-options policy-statement LB then load-balance per-packet
set routing-options forwarding-table export LB

Checking the LFA condition for PE4: from PE5, the distance to PE4 is 10, which is less than PE5 going back through P2 to PE4 (10 + 10), so PE5 is a valid LFA for destination PE4.

show isis backup coverage
show isis backup spf results | find 172.30.255.14
show route 172.30.255.14 extensive | match "weight|Next hop"

show route ... extensive shows two next hops, the primary with weight 0x1 and the backup with weight 0xf000.

Section 3. BGP22 points

Task 11

iBGP through a route reflector

4 points
  1. RR1 is the only route reflector, cluster ID 172.30.255.20. PE1 to PE5 are clients, peering with loopbacks. P1 and P2 do not run BGP.
  2. Enable every address family needed by later sections: IPv4 unicast, IPv6 over 6PE, L3VPN, EVPN, and route target filtering of VPN routes (RT constraint).
  3. RR1 does not run MPLS. Ensure that RR1 can still reflect all of the address families above.
Show solution
RR1:
set routing-options router-id 172.30.255.20
set routing-options autonomous-system 65030
set protocols bgp group IBGP type internal
set protocols bgp group IBGP local-address 172.30.255.20
set protocols bgp group IBGP cluster 172.30.255.20
set protocols bgp group IBGP family inet unicast
set protocols bgp group IBGP family inet6 labeled-unicast explicit-null
set protocols bgp group IBGP family inet-vpn unicast
set protocols bgp group IBGP family evpn signaling
set protocols bgp group IBGP family route-target
set protocols bgp group IBGP neighbor 172.30.255.11
set protocols bgp group IBGP neighbor 172.30.255.12
set protocols bgp group IBGP neighbor 172.30.255.13
set protocols bgp group IBGP neighbor 172.30.255.14
set protocols bgp group IBGP neighbor 172.30.255.15
set routing-options rib inet.3 static route 172.30.255.0/24 discard
set routing-options rib inet6.3 static route ::ffff:172.30.255.0/120 discard

PE1 to PE5 (change local-address per router):
set routing-options autonomous-system 65030
set protocols bgp group IBGP type internal
set protocols bgp group IBGP local-address 172.30.255.11
set protocols bgp group IBGP family inet unicast
set protocols bgp group IBGP family inet6 labeled-unicast explicit-null
set protocols bgp group IBGP family inet-vpn unicast
set protocols bgp group IBGP family evpn signaling
set protocols bgp group IBGP family route-target
set protocols bgp group IBGP neighbor 172.30.255.20

Item 3 is the classic trap. L3VPN, EVPN and 6PE routes are only usable when the BGP next hop resolves in inet.3 (or inet6.3 for 6PE, with next hops of the form ::ffff:172.30.255.x). RR1 has no LSPs, so these routes are hidden, and hidden routes are not reflected. The two discard static routes in inet.3 and inet6.3 only exist so that next hops resolve. RR1 never forwards this traffic, so discard does no harm.

An alternative for L3VPN only is set routing-options resolution rib bgp.l3vpn.0 resolution-ribs inet.0, but it must be repeated for each family and is easy to miss.

Verification:

show bgp summary
show bgp neighbor 172.30.255.11 | match "NLRI|Cluster"
show route table bgp.l3vpn.0 hidden
show route table bgp.rtarget.0

Every session is Established, the NLRI lists all five families in both directions, and after the VPN section is done hidden on RR1 must be empty.

Task 12

eBGP sessions with ISP-X, ISP-Y and PEER-Z

4 points
  1. PE3 peers with ISP-X over IPv4 and IPv6, MD5 password RB-X100, detecting neighbor loss within 1 second.
  2. PE4 peers with ISP-Y over IPv4 and IPv6.
  3. PE5 peers with PEER-Z over IPv4. PEER-Z still has the neighbor configured as AS 64999 (the provider's old AS before the merger) and will not change it. The AS path received by PEER-Z must contain only AS 64999. Routers in AS 65030 must not see 64999 in the AS path of routes learned from PEER-Z.
  4. PEER-Z sends at most 1000 prefixes. Warn at 80%, tear down the session above 1000 and retry automatically after 10 minutes.

Initial configuration excerpt on PE5:

set protocols bgp group PEER-Z type external
set protocols bgp group PEER-Z peer-as 3000
set protocols bgp group PEER-Z neighbor 198.51.100.10
Show solution
PE3:
set interfaces ge-0/0/2 unit 0 family inet address 198.51.100.1/30
set interfaces ge-0/0/2 unit 0 family inet6 address 2001:db8:ff00:1::1/64
set protocols bgp group ISP-X type external
set protocols bgp group ISP-X peer-as 100
set protocols bgp group ISP-X authentication-key RB-X100
set protocols bgp group ISP-X bfd-liveness-detection minimum-interval 300
set protocols bgp group ISP-X bfd-liveness-detection multiplier 3
set protocols bgp group ISP-X neighbor 198.51.100.2 family inet unicast
set protocols bgp group ISP-X neighbor 2001:db8:ff00:1::2 family inet6 unicast

PE4:
set interfaces ge-0/0/3 unit 0 family inet address 198.51.100.5/30
set interfaces ge-0/0/3 unit 0 family inet6 address 2001:db8:ff00:2::1/64
set protocols bgp group ISP-Y type external
set protocols bgp group ISP-Y peer-as 200
set protocols bgp group ISP-Y neighbor 198.51.100.6 family inet unicast
set protocols bgp group ISP-Y neighbor 2001:db8:ff00:2::2 family inet6 unicast

PE5:
set protocols bgp group PEER-Z peer-as 300
set protocols bgp group PEER-Z local-as 64999 private no-prepend-global-as
set protocols bgp group PEER-Z family inet unicast prefix-limit maximum 1000
set protocols bgp group PEER-Z family inet unicast prefix-limit teardown 80 idle-timeout 10
  • The pre-seeded fault is peer-as 3000. show bgp neighbor 198.51.100.10 or traceoptions show the AS mismatch in the OPEN message.
  • local-as 64999 makes PEER-Z see the AS it expects in the OPEN.
  • no-prepend-global-as removes 65030 from the outbound AS path, so PEER-Z only sees 64999.
  • private does not insert 64999 into the AS path of routes received from PEER-Z, so inside AS 65030 these routes have an AS path of just 300 ....
  • teardown 80 both warns at 80% and tears down the session above maximum, and idle-timeout 10 is in minutes.

Verification:

show bgp summary
show bgp neighbor 198.51.100.10 | match "Local AS|Peer AS|Prefix"
show route receive-protocol bgp 198.51.100.10 | match "AS path"
show route advertising-protocol bgp 198.51.100.10 detail | match "AS path"
show bfd session
Task 13

External import and export policies

5 points
  1. Tag routes by source: ISP-X 65030:100, ISP-Y 65030:200, PEER-Z 65030:300.
  2. Internet exit preference: routes from PEER-Z first, then ISP-X, then ISP-Y. Use local preference 200, 120 and 100.
  3. Do not accept from external peers: RFC 1918 ranges, 0.0.0.0/8, 127.0.0.0/8, 100.64.0.0/10, 169.254.0.0/16, multicast, your own ranges, IPv4 prefixes longer than /24 and IPv6 prefixes longer than /48.
  4. Advertise externally only the provider ranges 203.0.113.0/24 and 2001:db8:3000::/48. AS 65030 must not provide transit between ISP-X, ISP-Y and PEER-Z.
  5. 203.0.113.0/24 is generated by PE3, PE4 and PE5 and must only be advertised while at least one 203.0.113.x/32 service address remains in the network. 2001:db8:3000::/48 is generated by PE1 and advertised into iBGP.
Show solution

The bogon filter is a separate policy with no final action, placed before the per-peer policy in the import chain:

PE3, PE4, PE5:
set policy-options policy-statement BOGONS term V4 from route-filter 10.0.0.0/8 orlonger
set policy-options policy-statement BOGONS term V4 from route-filter 172.16.0.0/12 orlonger
set policy-options policy-statement BOGONS term V4 from route-filter 192.168.0.0/16 orlonger
set policy-options policy-statement BOGONS term V4 from route-filter 0.0.0.0/8 orlonger
set policy-options policy-statement BOGONS term V4 from route-filter 127.0.0.0/8 orlonger
set policy-options policy-statement BOGONS term V4 from route-filter 100.64.0.0/10 orlonger
set policy-options policy-statement BOGONS term V4 from route-filter 169.254.0.0/16 orlonger
set policy-options policy-statement BOGONS term V4 from route-filter 224.0.0.0/3 orlonger
set policy-options policy-statement BOGONS term V4 from route-filter 203.0.113.0/24 orlonger
set policy-options policy-statement BOGONS term V4 from route-filter 0.0.0.0/0 prefix-length-range /25-/32
set policy-options policy-statement BOGONS term V4 then reject
set policy-options policy-statement BOGONS term V6 from route-filter 2001:db8:3000::/48 orlonger
set policy-options policy-statement BOGONS term V6 from route-filter fc00::/7 orlonger
set policy-options policy-statement BOGONS term V6 from route-filter fe80::/10 orlonger
set policy-options policy-statement BOGONS term V6 from route-filter ff00::/8 orlonger
set policy-options policy-statement BOGONS term V6 from route-filter ::/0 prefix-length-range /49-/128
set policy-options policy-statement BOGONS term V6 then reject

set policy-options community C-ISPX members 65030:100
set policy-options community C-ISPY members 65030:200
set policy-options community C-PEERZ members 65030:300

224.0.0.0/3 orlonger covers both multicast 224.0.0.0/4 and the reserved 240.0.0.0/4. IPv4 route filters do not match IPv6 routes and vice versa, so one policy works for both families.

Import and export policies:

PE3:
set policy-options policy-statement ISP-X-IN term ALL then community add C-ISPX
set policy-options policy-statement ISP-X-IN term ALL then local-preference 120
set policy-options policy-statement ISP-X-IN term ALL then accept
set protocols bgp group ISP-X import [ BOGONS ISP-X-IN ]
set protocols bgp group ISP-X export TO-ISP-X

PE4:
set policy-options policy-statement ISP-Y-IN term ALL then community add C-ISPY
set policy-options policy-statement ISP-Y-IN term ALL then local-preference 100
set policy-options policy-statement ISP-Y-IN term ALL then accept
set protocols bgp group ISP-Y import [ BOGONS ISP-Y-IN ]
set protocols bgp group ISP-Y export TO-ISP-Y

PE5:
set policy-options policy-statement PEER-Z-IN term ALL then community add C-PEERZ
set policy-options policy-statement PEER-Z-IN term ALL then local-preference 200
set policy-options policy-statement PEER-Z-IN term ALL then accept
set protocols bgp group PEER-Z import [ BOGONS PEER-Z-IN ]
set protocols bgp group PEER-Z export TO-PEER-Z

The IPv4 aggregate on PE3, PE4 and PE5 has 203.0.113.1/32 and 203.0.113.2/32 on lo0 of PE1 and PE2 as contributing routes. These addresses live in level 1 and are leaked to level 2 by Junos as internal routes, so PE3, PE4 and PE5 see them through IS-IS. If both disappear, the aggregate is withdrawn automatically.

PE3, PE4, PE5:
set routing-options aggregate route 203.0.113.0/24

PE1:
set interfaces lo0 unit 0 family inet address 203.0.113.1/32
set interfaces lo0 unit 0 family inet6 address 2001:db8:3000::11/128
set routing-options rib inet6.0 aggregate route 2001:db8:3000::/48

PE2:
set interfaces lo0 unit 0 family inet address 203.0.113.2/32

External export policy for PE3 (PE4 and PE5 have additional parts in t14):

PE3:
set policy-options policy-statement TO-ISP-X term OWN4 from protocol aggregate
set policy-options policy-statement TO-ISP-X term OWN4 from route-filter 203.0.113.0/24 exact
set policy-options policy-statement TO-ISP-X term OWN4 then accept
set policy-options policy-statement TO-ISP-X term OWN6 from protocol bgp
set policy-options policy-statement TO-ISP-X term OWN6 from route-filter 2001:db8:3000::/48 exact
set policy-options policy-statement TO-ISP-X term OWN6 then accept
set policy-options policy-statement TO-ISP-X term REST then reject

The REST then reject term is what prevents transit: no route learned from an ISP or peer is sent to another ISP or peer. On PE1, the iBGP export policy that puts the /48 into 6PE is in t16.

Verification:

show route advertising-protocol bgp 198.51.100.2
show route advertising-protocol bgp 2001:db8:ff00:1::2
show route receive-protocol bgp 198.51.100.2 hidden
show route community 65030:300 terse
show route 203.0.113.0/24 extensive | match "Contributing|State"

Each ISP receives exactly two prefixes. From PE1, show route 0/0 exact or any prefix received from all three sources selects the PEER-Z path (LP 200).

Task 14

Inbound traffic engineering

3 points
  1. Traffic from the Internet to 203.0.113.0/24 and 2001:db8:3000::/48 must prefer to enter through ISP-X. ISP-Y documents that routes carrying community 200:80 get local preference 80 inside ISP-Y. Use this mechanism, not AS path prepending.
  2. Send 203.0.113.0/24 to PEER-Z with MED 50.
Show solution
PE4:
set policy-options community ISPY-LP80 members 200:80
set policy-options policy-statement TO-ISP-Y term OWN4 from protocol aggregate
set policy-options policy-statement TO-ISP-Y term OWN4 from route-filter 203.0.113.0/24 exact
set policy-options policy-statement TO-ISP-Y term OWN4 then community add ISPY-LP80
set policy-options policy-statement TO-ISP-Y term OWN4 then accept
set policy-options policy-statement TO-ISP-Y term OWN6 from protocol bgp
set policy-options policy-statement TO-ISP-Y term OWN6 from route-filter 2001:db8:3000::/48 exact
set policy-options policy-statement TO-ISP-Y term OWN6 then community add ISPY-LP80
set policy-options policy-statement TO-ISP-Y term OWN6 then accept
set policy-options policy-statement TO-ISP-Y term REST then reject

PE5:
set policy-options policy-statement TO-PEER-Z term OWN4 from protocol aggregate
set policy-options policy-statement TO-PEER-Z term OWN4 from route-filter 203.0.113.0/24 exact
set policy-options policy-statement TO-PEER-Z term OWN4 then metric 50
set policy-options policy-statement TO-PEER-Z term OWN4 then accept
set policy-options policy-statement TO-PEER-Z term REST then reject

Junos sends communities to eBGP peers by default, no command is needed to "enable" it as on some other vendors. Verification: show route advertising-protocol bgp 198.51.100.6 detail shows Communities: 200:80, and show route advertising-protocol bgp 198.51.100.10 detail shows MED: 50.

Task 15

Next hops, backup paths and load balancing

3 points
  1. No BGP route may be hidden because of an unreachable next hop, on any PE.
  2. For prefixes received from both ISP-X and ISP-Y, PE1 and PE2 must see both paths in their tables (one active, one backup), even though PE4 is using the path through PE3.
  3. The forwarding table on every router must be able to install multiple next hops when available.
Show solution

The next hop of eBGP routes is the ISP link address, which is not in IS-IS. Set next-hop self when PE3, PE4 and PE5 advertise into iBGP. PEs are not route reflectors, so they never send iBGP routes back into iBGP, and from protocol bgp here only matches routes learned from eBGP (and VPN routes, whose next hop is already the PE itself):

PE1 to PE5:
set policy-options policy-statement NHS term BGP from protocol bgp
set policy-options policy-statement NHS term BGP then next-hop self
set protocols bgp group IBGP export NHS

Item 2 needs two things at once. PE4 has the ISP-X route (LP 120), which is better than its own ISP-Y route (LP 100), so by default PE4 does not advertise the ISP-Y route into iBGP. advertise-external forces PE4 to advertise its best eBGP path even when it is not the overall best path. RR1 then has two paths, but a route reflector only reflects one, so add-path is also required:

PE3, PE4, PE5:
set protocols bgp group IBGP advertise-external

RR1:
set protocols bgp group IBGP family inet unicast add-path send path-count 2

PE1 to PE5:
set protocols bgp group IBGP family inet unicast add-path receive

All routers:
set policy-options policy-statement LB then load-balance per-packet
set routing-options forwarding-table export LB

Despite the name per-packet, this action hashes per flow on MX. Verification:

show route hidden
show route 192.0.2.0/24 detail
show route forwarding-table destination 172.30.255.15
show bgp neighbor 172.30.255.20 | match "Add Path"

On PE1, show route 192.0.2.0/24 (a prefix sent by both ISPs) shows two paths, next hop 172.30.255.13 active and 172.30.255.14 as backup.

Task 16

IPv6 over the IPv4 core with 6PE

3 points

The core does not run IPv6. Ensure that 2001:db8:3000::11 on PE1 can ping the IPv6 prefixes learned from ISP-X and ISP-Y, and that both ISPs see 2001:db8:3000::/48.

Show solution

6PE needs four pieces: the inet6 labeled-unicast family (enabled in t11), ipv6-tunneling so that IPv4 LSPs are installed in inet6.3, family inet6 on the PE core interfaces (so the PE accepts and processes packets carrying the IPv6 explicit-null label), and a policy that advertises the IPv6 prefix into iBGP.

PE1, PE3, PE4:
set protocols mpls ipv6-tunneling

PE1:
set interfaces ge-0/0/0 unit 0 family inet6
set interfaces ge-0/0/1 unit 0 family inet6
set policy-options policy-statement NHS term V6-OWN from family inet6
set policy-options policy-statement NHS term V6-OWN from protocol aggregate
set policy-options policy-statement NHS term V6-OWN from route-filter 2001:db8:3000::/48 exact
set policy-options policy-statement NHS term V6-OWN then accept
insert policy-options policy-statement NHS term V6-OWN before term BGP

PE3:
set interfaces ge-0/0/0 unit 0 family inet6
set interfaces ge-0/0/1 unit 0 family inet6

PE4:
set interfaces ge-0/0/0 unit 0 family inet6
set interfaces ge-0/0/1 unit 0 family inet6
set interfaces ge-0/0/2 unit 0 family inet6

ipv6-tunneling works for both LDP LSPs (PE1) and RSVP LSPs (PE3, PE4). The IPv6 routes PE3 learns from ISP-X get next hop ::ffff:172.30.255.13 from NHS when sent as labeled unicast, which lets PE1 find the matching LSP in inet6.3.

Verification:

show route table inet6.3
show route 2001:db8:3000::/48 detail
show route advertising-protocol bgp 172.30.255.20 table inet6.0
ping 2001:db8:a100::1 source 2001:db8:3000::11

In this example, ISP-X advertises 2001:db8:a100::/48 and has address 2001:db8:a100::1.

Section 4. MPLS18 points

Task 17

MPLS, RSVP and LDP in the right domains

3 points
  1. RSVP and MPLS run on every level 2 link except the link to RR1. RR1 does not run MPLS.
  2. LDP runs on the links of area 49.0001 (L1, L2, L3).
  3. On LDP links, IS-IS must not attract traffic onto a link whose LDP session is not ready.
Show solution

Each MPLS interface needs three things: family mpls on the unit, the interface under protocols mpls, and the interface under protocols rsvp or protocols ldp. Missing family mpls is the most common error, for example PE4 ge-0/0/1, already fixed in t05.

P1:
set interfaces ae0 unit 0 family mpls
set interfaces ge-0/0/4 unit 0 family mpls
set interfaces ge-0/0/1 unit 0 family mpls
set protocols mpls interface ae0.0
set protocols mpls interface ge-0/0/4.0
set protocols mpls interface ge-0/0/1.0
set protocols rsvp interface ae0.0
set protocols rsvp interface ge-0/0/4.0
set protocols ldp interface ge-0/0/1.0
set protocols ldp interface lo0.0
set protocols isis interface ge-0/0/1.0 ldp-synchronization

PE1 (PE2 is similar):
set interfaces ge-0/0/0 unit 0 family mpls
set interfaces ge-0/0/1 unit 0 family mpls
set protocols mpls interface ge-0/0/0.0
set protocols mpls interface ge-0/0/1.0
set protocols ldp interface ge-0/0/0.0
set protocols ldp interface ge-0/0/1.0
set protocols isis interface ge-0/0/0.0 ldp-synchronization
set protocols isis interface ge-0/0/1.0 ldp-synchronization

P2 is like P1 with ae0, ge-0/0/4 and ge-0/0/5 running RSVP and ge-0/0/1 running LDP. PE3 runs RSVP on ge-0/0/0 and ge-0/0/1. PE4 on ge-0/0/0, ge-0/0/1 and ge-0/0/2. PE5 on ge-0/0/0 and ge-0/0/1. ldp-synchronization makes IS-IS advertise the maximum metric on the link until LDP is up, which meets requirement 3.

Verification: show mpls interface, show rsvp interface, show ldp neighbor, show isis interface extensive | match "LDP sync".

Task 18

Admin groups

3 points

Define three colors GOLD (1), SILVER (2) and BRONZE (3) on every RSVP router and assign them correctly on both ends of each link:

Link Colors
ae0 (P1-P2) GOLD, SILVER
P1-PE3 GOLD
P2-PE4 GOLD
PE3-PE4 SILVER
P2-PE5 GOLD
PE4-PE5 SILVER, BRONZE

Initial configuration excerpt on PE5:

set protocols mpls admin-groups GOLD 1
set protocols mpls admin-groups SILVER 2
set protocols mpls admin-groups BRONZE 3
set protocols mpls interface ge-0/0/0.0 admin-group SILVER
Show solution
All RSVP routers:
set protocols mpls admin-groups GOLD 1
set protocols mpls admin-groups SILVER 2
set protocols mpls admin-groups BRONZE 3

P1:
set protocols mpls interface ae0.0 admin-group [ GOLD SILVER ]
set protocols mpls interface ge-0/0/4.0 admin-group GOLD
P2:
set protocols mpls interface ae0.0 admin-group [ GOLD SILVER ]
set protocols mpls interface ge-0/0/4.0 admin-group GOLD
set protocols mpls interface ge-0/0/5.0 admin-group GOLD
PE3:
set protocols mpls interface ge-0/0/0.0 admin-group GOLD
set protocols mpls interface ge-0/0/1.0 admin-group SILVER
PE4:
set protocols mpls interface ge-0/0/0.0 admin-group GOLD
set protocols mpls interface ge-0/0/1.0 admin-group SILVER
set protocols mpls interface ge-0/0/2.0 admin-group [ SILVER BRONZE ]
PE5:
delete protocols mpls interface ge-0/0/0.0 admin-group SILVER
set protocols mpls interface ge-0/0/0.0 admin-group GOLD
set protocols mpls interface ge-0/0/1.0 admin-group [ SILVER BRONZE ]

Pre-seeded fault: PE5 ge-0/0/0 is colored SILVER while P2 is colored GOLD. Colors are per direction: CSPF for LSPs leaving PE5 reads the color advertised by PE5, so one wrong end makes LSPs in one direction choose the wrong path. The bit numbers (1, 2, 3) must also be identical on every router.

Verification: show mpls interface, show ted database extensive | match "To:|Color".

Task 19

RSVP LSP mesh and LDP tunneling

4 points
  1. Build a full RSVP LSP mesh between the five routers P1, P2, PE3, PE4 and PE5 (4 LSPs per router), named <source>-<destination>, for example PE3-P1.
  2. PE1 and PE2 run LDP only, not RSVP. Ensure that there are LSPs from PE1 and PE2 to every other PE and back.
Show solution

LDP in area 49.0001 and RSVP in the core are stitched together with targeted LDP sessions running inside RSVP LSPs (ldp-tunneling). Enable it in both LSP directions and enable LDP on lo0 so the targeted sessions can come up.

Example for PE3:

set protocols mpls label-switched-path PE3-P1 to 172.30.255.1
set protocols mpls label-switched-path PE3-P2 to 172.30.255.2
set protocols mpls label-switched-path PE3-PE4 to 172.30.255.14
set protocols mpls label-switched-path PE3-PE5 to 172.30.255.15
set protocols ldp interface lo0.0

Settings common to every LSP are best placed in a group with a wildcard, so you avoid repetition and never forget an LSP:

The five RSVP routers:
set groups LSP-COMMON protocols mpls label-switched-path <*> ldp-tunneling
set groups LSP-COMMON protocols mpls label-switched-path <*> link-protection
set apply-groups LSP-COMMON

(link-protection belongs to t21 and is added here in advance.)

Both the P1-P2 and P2-P1 LSPs are required. Reason: PE1 to PE2 over the direct link costs 100, while through P1, ae0 and P2 it costs only 25, so the IGP chooses the path through P1. P1 and P2 have no LDP on ae0, so without a targeted session between P1 and P2, P1 has no LDP label for the PE2 FEC and the PE1 to PE2 LDP LSP breaks.

Verification:

show mpls lsp
show ldp neighbor
show ldp session
show ldp database session 172.30.255.15
show route table inet.3

On PE1, show route table inet.3 must contain 172.30.255.12, .13, .14 and .15 via LDP. On PE5, inet.3 contains 172.30.255.11 and .12 via LDP (carried over RSVP LSPs), plus the other PEs via RSVP. traceroute mpls ldp 172.30.255.15 from PE1 verifies the end-to-end path.

Task 20

LSP path constraints

3 points
  1. LSPs PE3-PE5 and PE5-PE3: the primary path must use only GOLD links. A pre-signaled secondary path must exist that does not use any GOLD link.
  2. LSP PE4-P1 must go through PE3.
Show solution
PE3:
set protocols mpls path ANY
set protocols mpls label-switched-path PE3-PE5 primary ANY admin-group include-all GOLD
set protocols mpls label-switched-path PE3-PE5 secondary ANY admin-group exclude GOLD
set protocols mpls label-switched-path PE3-PE5 secondary ANY standby

PE5:
set protocols mpls path ANY
set protocols mpls label-switched-path PE5-PE3 primary ANY admin-group include-all GOLD
set protocols mpls label-switched-path PE5-PE3 secondary ANY admin-group exclude GOLD
set protocols mpls label-switched-path PE5-PE3 secondary ANY standby

PE4:
set protocols mpls path VIA-PE3 172.30.255.13 loose
set protocols mpls label-switched-path PE4-P1 primary VIA-PE3
  • The GOLD primary path is PE3, P1, ae0, P2, PE5. The non-GOLD secondary path is PE3, PE4, PE5 (SILVER, then SILVER BRONZE).
  • standby is the "pre-signaled" requirement. Without standby, the secondary is only signaled when the primary fails.
  • Admin group constraints can be set at the LSP level or per path. Here they are set per path because the primary and secondary have different constraints.

Verification: show mpls lsp name PE3-PE5 extensive (shows Primary ... State: Up, Standby ... State: Up, and the ERO of each path), show mpls lsp name PE4-P1 extensive | match "Received RRO|Explct".

Task 21

Fast protection in the RSVP core

3 points
  1. Every RSVP interface provides link protection. Every LSP requests link protection.
  2. LSPs PE3-PE5 and PE5-PE3 request node protection.
  3. On P1, the bypass protecting ae0 is named BYP-P1-P2 and reserves 200 Mbps.
Show solution
The five RSVP routers, every RSVP interface (example P1):
set protocols rsvp interface ae0.0 link-protection
set protocols rsvp interface ge-0/0/4.0 link-protection

PE3 (PE5 does the same for PE5-PE3):
set protocols mpls label-switched-path PE3-PE5 apply-groups-except LSP-COMMON
set protocols mpls label-switched-path PE3-PE5 ldp-tunneling
set protocols mpls label-switched-path PE3-PE5 node-link-protection

P1:
set protocols rsvp interface ae0.0 link-protection bypass BYP-P1-P2 to 10.30.4.2
set protocols rsvp interface ae0.0 link-protection bypass BYP-P1-P2 bandwidth 200m

"Every LSP requests link protection" is already covered by the LSP-COMMON group from t19. LSPs PE3-PE5 and PE5-PE3 do not inherit LSP-COMMON (apply-groups-except) so they do not have both link-protection and node-link-protection, which means ldp-tunneling must be configured again. A manual bypass automatically avoids the protected link, and here the only path is P1, PE3, PE4, P2.

Verification:

show rsvp interface detail | match "Link protection|Bypass"
show rsvp session ingress detail | match "protection|Bypass"
show mpls lsp bypass
show rsvp session name BYP-P1-P2 detail
Task 22

Hiding the core from traceroute

2 points

When tracing from a CE or from a PE across the MPLS core, no core hop must be visible, for Internet traffic, L3VPN traffic and traffic on LDP LSPs.

Show solution
PE1 to PE5, P1, P2 (every router that can be an ingress):
set protocols mpls no-propagate-ttl

PE1, PE2, PE4, PE5 (every PE with VRFs):
set routing-instances ALPHA no-vrf-propagate-ttl
set routing-instances BRAVO no-vrf-propagate-ttl

no-propagate-ttl under protocols mpls applies to both RSVP and LDP LSPs and must be set on every router that can push labels. P1 and P2 are ingress routers of RSVP LSPs when forwarding LDP-tunneled traffic, so they need it too. VRFs have their own knob. Only configure the VRFs present on each router (ALPHA on PE1 and PE5, BRAVO on PE2 and PE4).

Verification: traceroute 192.0.2.1 source 203.0.113.1 from PE1, and traceroute 10.202.1.1 from CUST-A1. The next hop after the ingress PE must be the egress PE.

Section 5. VPN20 points

Task 23

L3VPN ALPHA: OSPF and eBGP as PE-CE

5 points
  1. VRF ALPHA on PE1 and PE5. PE1 runs OSPF area 0 with CUST-A1, PE5 runs eBGP with CUST-A2 (AS 64601). RD format <loopback>:100, RT target:65030:100.
  2. CUST-A1 must see the site 2 routes as OSPF external type 1.
  3. The PE-CE link subnets of both sites must also be exchanged.
  4. Do not modify the CE configuration.

Initial configuration excerpt:

PE1:
set interfaces ge-0/0/2 mtu 9192
set interfaces ge-0/0/2 unit 0 family inet address 10.100.1.1/30

CUST-A1 (must not be modified):
set interfaces ge-0/0/0 mtu 1514
set protocols ospf area 0 interface ge-0/0/0.0
Show solution
PE1:
set interfaces ge-0/0/2 mtu 1514
set policy-options policy-statement BGP-TO-OSPF term VPN from protocol bgp
set policy-options policy-statement BGP-TO-OSPF term VPN then external type 1
set policy-options policy-statement BGP-TO-OSPF term VPN then accept
set routing-instances ALPHA instance-type vrf
set routing-instances ALPHA interface ge-0/0/2.0
set routing-instances ALPHA route-distinguisher 172.30.255.11:100
set routing-instances ALPHA vrf-target target:65030:100
set routing-instances ALPHA vrf-table-label
set routing-instances ALPHA protocols ospf export BGP-TO-OSPF
set routing-instances ALPHA protocols ospf area 0 interface ge-0/0/2.0

PE5:
set interfaces ge-0/0/3 unit 0 family inet address 10.100.5.1/30
set routing-instances ALPHA instance-type vrf
set routing-instances ALPHA interface ge-0/0/3.0
set routing-instances ALPHA route-distinguisher 172.30.255.15:100
set routing-instances ALPHA vrf-import ALPHA-IN
set routing-instances ALPHA vrf-export ALPHA-OUT
set routing-instances ALPHA vrf-table-label
set routing-instances ALPHA protocols bgp group CE type external
set routing-instances ALPHA protocols bgp group CE peer-as 64601
set routing-instances ALPHA protocols bgp group CE neighbor 10.100.5.2

PE5 uses vrf-import and vrf-export instead of vrf-target because the extranet in t25 needs them, and both policies are written there. If you do t23 first, you can temporarily use vrf-target and change it later.

  • The pre-seeded fault is an MTU mismatch. OSPF compares the MTU in DBD packets, and a mismatch leaves the neighbor stuck in ExStart. The CE cannot be modified, so lower the MTU on PE1 to match (1514-byte frames, that is 1500-byte IP).
  • vrf-target creates an implicit export policy for every active route in the VRF, so the link subnet 10.100.1.0/30 is advertised automatically. On PE5, the ALPHA-OUT policy in t25 also exports every route.
  • Routes learned from other PEs appear in the VRF as protocol bgp, so from protocol bgp is enough to put them into OSPF. In the other direction, PE5 sends CUST-A2 every active BGP route in the VRF by default, and OSPF routes from PE1 arrive at PE5 as BGP routes too.

Verification:

show ospf neighbor instance ALPHA
show route table ALPHA.inet.0
show route table bgp.l3vpn.0 rd-prefix 172.30.255.15:100
show bgp summary instance ALPHA
ping 10.202.1.1 routing-instance ALPHA

On CUST-A1, show ospf database external extensive shows Type: 1 for the 10.202.x prefixes.

Task 24

L3VPN BRAVO with two sites in the same AS

4 points
  1. VRF BRAVO on PE2 and PE4, eBGP with CUST-B1 and CUST-B2, both using AS 64700. RD <loopback>:200, RT target:65030:200.
  2. Both sites must see each other's routes without modifying the CEs.
  3. Each BRAVO VRF holds at most 500 routes, with a warning at 80%.
Show solution

Both sites use AS 64700, so each CE sees its own AS in the AS path and drops the route (loop prevention). Without changing the CEs, the PE uses as-override to replace 64700 with 65030:

PE2:
set interfaces ge-0/0/2 unit 0 family inet address 10.100.2.1/30
set routing-instances BRAVO instance-type vrf
set routing-instances BRAVO interface ge-0/0/2.0
set routing-instances BRAVO route-distinguisher 172.30.255.12:200
set routing-instances BRAVO vrf-import BRAVO-IN
set routing-instances BRAVO vrf-export BRAVO-OUT
set routing-instances BRAVO vrf-table-label
set routing-instances BRAVO routing-options maximum-prefixes 500 threshold 80
set routing-instances BRAVO protocols bgp group CE type external
set routing-instances BRAVO protocols bgp group CE peer-as 64700
set routing-instances BRAVO protocols bgp group CE as-override
set routing-instances BRAVO protocols bgp group CE neighbor 10.100.2.2

PE4 is identical with ge-0/0/4, address 10.100.4.1/30, RD 172.30.255.14:200 and neighbor 10.100.4.2.

Verification on PE2: show route advertising-protocol bgp 10.100.2.2 detail | match "AS path" shows 65030 65030 instead of 65030 64700. On CUST-B1, the 10.220.x routes of site 2 are present and active.

Task 25

Extranet between ALPHA and BRAVO

3 points

Exchange only the following prefixes between the two VPNs:

  • The shared server subnet 10.202.99.0/24 at CUST-A2 must be reachable from both BRAVO sites.
  • The user subnets 10.210.50.0/24 (CUST-B1) and 10.220.50.0/24 (CUST-B2) must be reachable from CUST-A2.
  • CUST-A1 must not see any BRAVO prefix. No other prefix may leak between the two VPNs.
Show solution

Use two additional RTs for the shared prefixes: target:65030:999 for shared ALPHA prefixes and target:65030:998 for shared BRAVO prefixes. PE1 still uses vrf-target target:65030:100, so it does not import 998, which satisfies "CUST-A1 must not see BRAVO".

PE5, PE2, PE4 (community definitions):
set policy-options community RT-ALPHA members target:65030:100
set policy-options community RT-BRAVO members target:65030:200
set policy-options community RT-SHARE-A members target:65030:999
set policy-options community RT-SHARE-B members target:65030:998

PE5:
set policy-options policy-statement ALPHA-OUT term SHARE from route-filter 10.202.99.0/24 exact
set policy-options policy-statement ALPHA-OUT term SHARE then community add RT-ALPHA
set policy-options policy-statement ALPHA-OUT term SHARE then community add RT-SHARE-A
set policy-options policy-statement ALPHA-OUT term SHARE then accept
set policy-options policy-statement ALPHA-OUT term ALL then community add RT-ALPHA
set policy-options policy-statement ALPHA-OUT term ALL then accept
set policy-options policy-statement ALPHA-IN term OWN from community RT-ALPHA
set policy-options policy-statement ALPHA-IN term OWN then accept
set policy-options policy-statement ALPHA-IN term SHARE from community RT-SHARE-B
set policy-options policy-statement ALPHA-IN term SHARE then accept
set policy-options policy-statement ALPHA-IN term REST then reject

PE2 (PE4 replaces 10.210.50.0/24 with 10.220.50.0/24):
set policy-options policy-statement BRAVO-OUT term SHARE from route-filter 10.210.50.0/24 exact
set policy-options policy-statement BRAVO-OUT term SHARE then community add RT-BRAVO
set policy-options policy-statement BRAVO-OUT term SHARE then community add RT-SHARE-B
set policy-options policy-statement BRAVO-OUT term SHARE then accept
set policy-options policy-statement BRAVO-OUT term ALL then community add RT-BRAVO
set policy-options policy-statement BRAVO-OUT term ALL then accept
set policy-options policy-statement BRAVO-IN term OWN from community RT-BRAVO
set policy-options policy-statement BRAVO-IN term OWN then accept
set policy-options policy-statement BRAVO-IN term SHARE from community RT-SHARE-A
set policy-options policy-statement BRAVO-IN term SHARE then accept
set policy-options policy-statement BRAVO-IN term REST then reject
  • Use community add, not community set, to keep other communities (for example the OSPF domain extended communities).
  • Traffic is bidirectional: the server subnet 10.202.99.0/24 needs a return route to the BRAVO user subnets, so PE5 must import 998. With only one direction, pings do not return.
  • With RT constraint (t11), Junos takes the RTs in the vrf-import policy to tell the RR which routes the router needs. PE5 therefore receives the routes carrying 998 without any change on RR1.

Verification:

show route table ALPHA.inet.0 10.210.50.0/24
show route table BRAVO.inet.0 10.202.99.0/24 detail | match "Communities|Import"
show route table bgp.rtarget.0
show route table ALPHA.inet.0 | match 10.2[12]0

On PE1, show route table ALPHA.inet.0 must not contain 10.210.50.0/24 or 10.220.50.0/24.

Task 26

Active-active EVPN multihoming

5 points
  1. A VLAN-based EVPN MPLS service for VLAN 300, instance EVI-300, RT target:65030:300.
  2. SW-E1 connects to PE1 (ge-0/0/3) and PE2 (ge-0/0/3) with a single LACP bundle on the switch side. Both PEs use ae1, all-active, ESI 00:11:11:11:11:11:11:11:11:11.
  3. PE2 must be the designated forwarder for VLAN 300 on this Ethernet segment, elected by preference value rather than the default algorithm.
  4. PE5 connects to SW-E2 through ge-0/0/4, VLAN 300.
  5. Each instance holds at most 1000 MAC addresses, and packets from new MACs are dropped when the limit is exceeded.
Show solution

SW-E1 must see the two PEs as a single LACP device, so the LACP system-id and admin-key on ae1 of PE1 and PE2 must be identical:

PE1 (PE2 is identical except for the RD and df-election):
set chassis aggregated-devices ethernet device-count 2
set interfaces ge-0/0/3 gigether-options 802.3ad ae1
set interfaces ae1 flexible-vlan-tagging
set interfaces ae1 encapsulation flexible-ethernet-services
set interfaces ae1 esi 00:11:11:11:11:11:11:11:11:11
set interfaces ae1 esi all-active
set interfaces ae1 esi df-election-type preference value 100
set interfaces ae1 aggregated-ether-options lacp active
set interfaces ae1 aggregated-ether-options lacp system-id 00:00:00:11:11:11
set interfaces ae1 aggregated-ether-options lacp admin-key 11
set interfaces ae1 unit 300 encapsulation vlan-bridge
set interfaces ae1 unit 300 vlan-id 300
set routing-instances EVI-300 instance-type evpn
set routing-instances EVI-300 vlan-id 300
set routing-instances EVI-300 interface ae1.300
set routing-instances EVI-300 route-distinguisher 172.30.255.11:300
set routing-instances EVI-300 vrf-target target:65030:300
set routing-instances EVI-300 protocols evpn mac-table-size 1000 packet-action drop

PE2 differs in:
set interfaces ae1 esi df-election-type preference value 200
set routing-instances EVI-300 route-distinguisher 172.30.255.12:300

PE5:
set interfaces ge-0/0/4 flexible-vlan-tagging
set interfaces ge-0/0/4 encapsulation flexible-ethernet-services
set interfaces ge-0/0/4 unit 300 encapsulation vlan-bridge
set interfaces ge-0/0/4 unit 300 vlan-id 300
set routing-instances EVI-300 instance-type evpn
set routing-instances EVI-300 vlan-id 300
set routing-instances EVI-300 interface ge-0/0/4.300
set routing-instances EVI-300 route-distinguisher 172.30.255.15:300
set routing-instances EVI-300 vrf-target target:65030:300
set routing-instances EVI-300 protocols evpn mac-table-size 1000 packet-action drop
  • Preference-based DF election: the higher value wins, so PE2 (200) is the DF. Both PEs on the same ESI must use the same election type.
  • The RDs must differ between PE1 and PE2. If they are identical, RR1 treats the per-EVI Ethernet A-D routes of the two PEs as one and aliasing breaks.
  • EVPN needs LSPs between PE1, PE2 and PE5, which already exist thanks to t07 and t19.

Verification:

show lacp interfaces ae1
show evpn instance EVI-300 extensive
show evpn instance EVI-300 designated-forwarder
show evpn database
show route table EVI-300.evpn.0

show evpn instance EVI-300 extensive on PE1 shows the ESI as all-active, Designated forwarder: 172.30.255.12 and Backup forwarder: 172.30.255.11. PE5 sees type 1 routes from both PEs for the same ESI (aliasing).

Task 27

Pseudowire between PE3 and PE5

3 points

CUST-C1 (PE3 ge-0/0/3) and CUST-C2 (PE5 ge-0/0/5) need a port-based Layer 2 connection, LDP signaled, VC ID 3005. Do not use the option that ignores the MTU check. The CE-facing port MTU must be 1600 on both PEs.

Initial configuration excerpt:

PE3:
set interfaces ge-0/0/3 mtu 1514
set interfaces ge-0/0/3 encapsulation ethernet-ccc
PE5:
set interfaces ge-0/0/5 mtu 1600
set interfaces ge-0/0/5 encapsulation ethernet-ccc
Show solution
PE3:
set interfaces ge-0/0/3 mtu 1600
set interfaces ge-0/0/3 unit 0 family ccc
set protocols l2circuit neighbor 172.30.255.15 interface ge-0/0/3.0 virtual-circuit-id 3005

PE5:
set interfaces ge-0/0/5 unit 0 family ccc
set protocols l2circuit neighbor 172.30.255.13 interface ge-0/0/5.0 virtual-circuit-id 3005
  • Both ends exchange the MTU in LDP, and a mismatch leaves the VC in the MM (MTU mismatch) state.
  • The l2circuit needs a targeted LDP session between PE3 and PE5. That session already exists thanks to LDP tunneling in t19, and it passes the PE3 lo0 filter thanks to the LDP term in t02.

Verification: show l2circuit connections (state Up), show ldp database l2circuit, show l2circuit connections extensive | match "MTU|Label".

Section 6. Class of Service10 points

Task 28

Customer traffic classification

3 points

On PE1, every core router P1 and P2 and every PE, define four forwarding classes: BE (queue 0), VIDEO (queue 1), VOICE (queue 2) and NC (queue 3). On the PE1 port facing CUST-A1, classify by DSCP: EF to VOICE, AF41 to VIDEO, CS6 and CS7 to NC, everything else to BE.

Show solution
All routers:
set class-of-service forwarding-classes class BE queue-num 0
set class-of-service forwarding-classes class VIDEO queue-num 1
set class-of-service forwarding-classes class VOICE queue-num 2
set class-of-service forwarding-classes class NC queue-num 3

PE1:
set class-of-service classifiers dscp CL-CUST forwarding-class VOICE loss-priority low code-points ef
set class-of-service classifiers dscp CL-CUST forwarding-class VIDEO loss-priority low code-points af41
set class-of-service classifiers dscp CL-CUST forwarding-class NC loss-priority low code-points [ cs6 cs7 ]
set class-of-service classifiers dscp CL-CUST forwarding-class BE loss-priority low code-points be
set class-of-service interfaces ge-0/0/2 unit 0 classifiers dscp CL-CUST

When you define your own forwarding classes, the default names such as best-effort and network-control are no longer used for those queues, so classifiers and rewrite rules must reference the new names. Code points not declared in the classifier fall into the forwarding class of queue 0, here BE. Control traffic generated by the router itself (IS-IS, BGP) uses queue 3 by default, which matches NC.

Verification: show class-of-service interface ge-0/0/2, show class-of-service classifier name CL-CUST. Ping from CUST-A1 with tos 184 (EF) and check show interfaces queue ge-0/0/0 on PE1, where queue 2 must increase.

Task 29

Carrying the class of service across the core with EXP

2 points

Traffic from PE1 entering the MPLS core must carry EXP: VOICE 5, VIDEO 4, NC 6, BE 0. P1 and P2 reclassify on EXP on every core interface to select the right queue.

Show solution
PE1:
set class-of-service rewrite-rules exp RW-EXP forwarding-class VOICE loss-priority low code-point 101
set class-of-service rewrite-rules exp RW-EXP forwarding-class VIDEO loss-priority low code-point 100
set class-of-service rewrite-rules exp RW-EXP forwarding-class NC loss-priority low code-point 110
set class-of-service rewrite-rules exp RW-EXP forwarding-class BE loss-priority low code-point 000
set class-of-service rewrite-rules exp RW-EXP forwarding-class BE loss-priority high code-point 000
set class-of-service interfaces ge-0/0/0 unit 0 rewrite-rules exp RW-EXP
set class-of-service interfaces ge-0/0/1 unit 0 rewrite-rules exp RW-EXP

P1, P2 (and the PEs if you want consistency):
set class-of-service classifiers exp CL-EXP forwarding-class VOICE loss-priority low code-points 101
set class-of-service classifiers exp CL-EXP forwarding-class VIDEO loss-priority low code-points 100
set class-of-service classifiers exp CL-EXP forwarding-class NC loss-priority low code-points [ 110 111 ]
set class-of-service classifiers exp CL-EXP forwarding-class BE loss-priority low code-points [ 000 001 010 011 ]

P1:
set class-of-service interfaces ge-0/0/1 unit 0 classifiers exp CL-EXP
set class-of-service interfaces ae0 unit 0 classifiers exp CL-EXP
set class-of-service interfaces ge-0/0/4 unit 0 classifiers exp CL-EXP

P2 applies CL-EXP to ge-0/0/1, ae0, ge-0/0/4 and ge-0/0/5. The EXP rewrite goes on the egress side of PE1 (where labels are pushed), and the EXP classifier goes on the ingress side of the core routers. Verification: show class-of-service interface ge-0/0/0, and on P1 show interfaces queue ae0 while CUST-A1 sends EF traffic.

Task 30

Scheduling on the P1 core interfaces

3 points

On P1, interfaces ae0 and ge-0/0/4:

  • VOICE has strict priority but must never use more than 20% of the bandwidth.
  • VIDEO is guaranteed 30%, NC 5%, and BE gets the remainder.
  • Buffers are split in the same proportions, with only 10% for VOICE.
Show solution
P1:
set class-of-service schedulers S-VOICE priority strict-high
set class-of-service schedulers S-VOICE shaping-rate percent 20
set class-of-service schedulers S-VOICE buffer-size percent 10
set class-of-service schedulers S-VIDEO transmit-rate percent 30
set class-of-service schedulers S-VIDEO buffer-size percent 30
set class-of-service schedulers S-VIDEO priority medium-high
set class-of-service schedulers S-NC transmit-rate percent 5
set class-of-service schedulers S-NC buffer-size percent 5
set class-of-service schedulers S-NC priority high
set class-of-service schedulers S-BE transmit-rate remainder
set class-of-service schedulers S-BE buffer-size remainder
set class-of-service schedulers S-BE priority low
set class-of-service scheduler-maps SM-CORE forwarding-class VOICE scheduler S-VOICE
set class-of-service scheduler-maps SM-CORE forwarding-class VIDEO scheduler S-VIDEO
set class-of-service scheduler-maps SM-CORE forwarding-class NC scheduler S-NC
set class-of-service scheduler-maps SM-CORE forwarding-class BE scheduler S-BE
set class-of-service interfaces ae0 scheduler-map SM-CORE
set class-of-service interfaces ge-0/0/4 scheduler-map SM-CORE

With strict-high, transmit-rate does not cap the queue, and a strict-high queue can starve every other queue. To enforce "no more than 20%", use shaping-rate on the scheduler. Verification: show class-of-service scheduler-map SM-CORE, show interfaces queue ae0, show class-of-service interface ae0 detail.

Task 31

Policer on the BRAVO customer port

2 points

On PE4, for traffic received from CUST-B2: limit EF traffic to 5 Mbps and place it in VOICE, and limit everything else to 50 Mbps. Excess traffic is dropped.

Show solution
PE4:
set firewall policer P-5M if-exceeding bandwidth-limit 5m
set firewall policer P-5M if-exceeding burst-size-limit 62500
set firewall policer P-5M then discard
set firewall policer P-50M if-exceeding bandwidth-limit 50m
set firewall policer P-50M if-exceeding burst-size-limit 625k
set firewall policer P-50M then discard
set firewall family inet filter BRAVO2-IN term EF from dscp ef
set firewall family inet filter BRAVO2-IN term EF then policer P-5M
set firewall family inet filter BRAVO2-IN term EF then forwarding-class VOICE
set firewall family inet filter BRAVO2-IN term EF then accept
set firewall family inet filter BRAVO2-IN term REST then policer P-50M
set firewall family inet filter BRAVO2-IN term REST then accept
set interfaces ge-0/0/4 unit 0 family inet filter input BRAVO2-IN

A rule of thumb for the burst size is 10 ms of traffic at the policed rate: 50 Mbps times 10 ms is 62.5 KB, but TCP traffic benefits from more, so 625 KB (100 ms) is used here. Setting the forwarding class in the filter overrides the BA classifier on the same interface. The last term must accept, otherwise the filter drops all remaining traffic because every Junos filter ends with an implicit discard term.

Verification: show firewall, show policer, and ping rapid size 1400 count 10000 from CUST-B2 to see the policer counters increase.