In our companion guide, Preventing IXP Transit Hijacking on Cisco IOS-XE Using VRF and Route Leaking, we demonstrated how to stop abusive IXP peers from stealing paid Transit capacity by isolating the IXP interface in a Cisco VRF.
In this companion walkthrough for Juniper Junos (vMX), we solve the exact same IXP static-route hijack problem without migrating the BGP peering session into a full VRF. Instead, we combine Filter-Based Forwarding (FBF) with a forwarding-type routing-instance and a catch-all discard route.
Lab Topology & Setup
Prerequisites & Hardware
- One Juniper MX router (
vMXused here; Juniper SRX works identically). - Simulated customer servers (
LittleWolf-CustomerandOthers-Customer). - One upstream Transit uplink (
ge-0/0/3.0,59.43.100.0/31toAS4809). - One IXP peering port (
ge-0/0/1.0,80.81.192.100/21on DE-CIX).
Interface IPs, baseline BGP sessions, and reachability are pre-configured.
Step 1: Baseline Routing & Reproducing the Static-Route Hijack
1. Verify Baseline Customer Paths
[admin@LittleWolf-Customer] > tool traceroute 114.114.114.114 # ADDRESS LOSS SENT LAST AVG BEST WORST 1 192.0.2.1 66.. 4 timeout 13.2 13.2 13.2 2 59.43.100.1 0% 3 2.8ms 3.9 2.6 6.2 3 59.43.100.3 0% 3 3.3ms 4.8 2.3 8.8 4 114.114.114.114 0% 3 3ms 3.6 3 4.1
[admin@LittleWolf-Customer] > tool traceroute 114.51.41.9 # ADDRESS LOSS SENT LAST AVG BEST WORST 1 192.0.2.1 40% 5 1.6ms 9.2 1.6 24.4 2 59.43.100.1 0% 5 7.1ms 6.8 2.6 11.1 3 59.43.100.3 0% 5 6.8ms 5.5 3.1 7.7 4 202.97.100.0 0% 5 5.8ms 7.7 5.8 10.7 5 114.51.41.9 0% 5 4.8ms 7.7 3.5 16.6
2. Verify Both Backbone RIBs After Connecting to DE-CIX
After connecting DE-CIX and establishing BGP with Route Server AS6695, confirm that both routers learn 114.114.114.0/24 only via their respective Transit providers:
root@vMX-VFP-LittleWolf-Backbone> show route 114.114.114.0/24 exact
inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
114.114.114.0/24 *[BGP/170] 00:23:22, localpref 100
AS path: 4809 4134 65120 I, validation-state: unverified
> to 59.43.100.1 via ge-0/0/3.0
Others-backbone#show ip bgp 114.114.114.114
BGP routing table entry for 114.114.114.0/24, version 3
Paths: (1 available, best #1, table default, not advertised to any peer)
Not advertised to any peer
Refresh Epoch 1
4134 65120
202.97.100.1 from 202.97.100.1 (202.97.200.1)
Origin IGP, localpref 100, valid, external, best
Community: no-advertise
rx pathid: 0, tx pathid: 0x0
3. Reproduce the IXP Bandwidth Hijack
Because all IXP participants share one Layer-2 broadcast fabric, Others-backbone (AS65200) can point a static route for 114.114.114.114/32 directly at our DE-CIX interface IP (80.81.192.100):
Others-backbone(config)# ip route 114.114.114.114 255.255.255.255 80.81.192.100
Tracing from Others-Customer proves the traffic immediately transits our AS4809 CN2 link:
[admin@Others-Customer] > tool traceroute 114.114.114.114 # ADDRESS LOSS SENT LAST AVG BEST WORST 1 114.51.41.1 0% 3 4.9ms 8.2 4.9 13.9 2 80.81.192.100 0% 3 12.8ms 9.8 6.7 12.8 3 59.43.100.1 0% 2 4.6ms 5.6 4.6 6.5 4 59.43.100.3 0% 2 6.4ms 6 5.6 6.4 5 114.114.114.114 0% 2 5.6ms 5.5 5.4 5.6
Step 2: Junos Filter-Based Forwarding & Routing-Instance Architecture
Whereas Cisco IOS-XE requires moving the IXP interface and BGP session into a dedicated VRF, Junos lets ge-0/0/1.0 keep its BGP session in master while applying an ingress firewall filter (decix-forward) that steers incoming IXP packets into a dedicated forwarding routing-instance (decix.inet.0):
- Permits Legitimate Inbound Peering:
instance-import decix-importimportslocalanddirectroutes (and can easily match customer BGP routes via community/prefix policies) intodecix.inet.0. - Silently Drops Transit Abuse: A static
0.0.0.0/0 discardroute insidedecix.inet.0catches all unauthorized external destinations (such as114.114.114.114), preventing fallback tomaster.inet.0.
Step 3: Configure the Input Filter & Forwarding Routing-Instance
[edit interfaces ge-0/0/1 unit 0 family inet]
+ filter {
+ input decix-forward; // Apply input FBF filter so all DE-CIX ingress traffic is evaluated in the routing-instance
+ }
[edit policy-options]
+ policy-statement decix-import { // Policy controlling which routes are imported into decix.inet.0
+ term import-local {
+ from {
+ instance master; // Source from master inet.0
+ protocol [ local direct ]; // Import only local and direct routes (add customer BGP match as needed)
+ }
+ then accept;
+ }
+ term last-reject {
+ then reject; // Reject all other routes (e.g., upstream Transit prefixes)
+ }
+ }
[edit]
+ firewall {
+ family inet {
+ filter decix-forward {
+ term decix-forward {
+ then {
+ routing-instance decix; // Redirect all DE-CIX ingress packets to routing-instance decix
+ }
+ }
+ }
+ }
+ }
+ routing-instances {
+ decix {
+ instance-type forwarding; // Pure forwarding-type routing-instance for clean Filter-Based Forwarding
+ routing-options {
+ static {
+ route 0.0.0.0/0 discard; // Catch-all discard route drops unauthorized Transit destinations silently
+ }
+ instance-import decix-import; // Import authorized internal routes from master.inet.0
+ }
+ }
+ }
Inspect the resulting decix.inet.0 forwarding table:
root@vMX-VFP-LittleWolf-Backbone> show route table decix.inet.0
decix.inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0.0.0.0/0 *[Static/5] 00:11:10
Discard
192.0.2.0/24 *[Direct/0] 00:07:33
> via ge-0/0/2.0
192.0.2.1/32 *[Local/0] 00:07:33
Local via ge-0/0/2.0
59.43.100.0/31 *[Direct/0] 00:07:33
> via ge-0/0/3.0
59.43.100.0/32 *[Local/0] 00:07:33
Local via ge-0/0/3.0
80.81.192.0/21 *[Direct/0] 00:07:33
> via ge-0/0/1.0
80.81.192.100/32 *[Local/0] 00:07:33
Local via ge-0/0/1.0
Only direct/local prefixes and the 0.0.0.0/0 Discard catch-all exist in decix.inet.0—zero upstream Transit routes are visible to incoming IXP packets. If your customers sit behind downstream BGP/IGP routers rather than directly connected interfaces, simply extend decix-import to match your internal dynamic routing protocol or customer prefix list.
Step 4: Verify Normal Peering & Silent Hijack Drop
1. Confirm Bidirectional DE-CIX Peering Still Works
[admin@LittleWolf-Customer] > tool traceroute 114.51.41.9 # ADDRESS LOSS SENT LAST AVG BEST WORST 1 192.0.2.1 0% 3 1.9ms 12 1.9 22 2 80.81.192.200 0% 2 5.9ms 5.9 5.8 5.9 3 114.51.41.9 0% 2 6.7ms 6 5.3 6.7
[admin@Others-Customer] > tool traceroute 192.0.2.100 # ADDRESS LOSS SENT LAST AVG BEST WORST 1 114.51.41.1 0% 4 1.4ms 1.5 1.2 1.7 2 80.81.192.100 0% 4 4.9ms 39.9 4.7 144.9 3 192.0.2.100 0% 4 6.7ms 6.4 5.5 6.9
2. Confirm Static-Route Transit Abuse Is Dropped Silently
[admin@Others-Customer] > tool traceroute 114.114.114.114
# ADDRESS LOSS SENT LAST AVG BEST WORST
1 114.51.41.1 0% 3 1.7ms 1.9 1 3.1
2 100% 3 timeout
3 100% 2 timeout
4 100% 2 timeout
5 100% 2 timeout
6 100% 2 timeout
[admin@Others-Customer] > ping 114.114.114.114 count=3
SEQ HOST SIZE TTL TIME STATUS
0 114.114.114.114 timeout
1 114.114.114.114 timeout
2 114.114.114.114 timeout
sent=3 received=0 packet-loss=100%
Notice an interesting behavioral contrast with our Cisco IOS-XE VRF companion guide: Cisco returns ICMP host unreachable on a VRF route miss, whereas Junos instance-type forwarding with 0.0.0.0/0 discard silently drops unauthorized packets (100% traceroute timeout from hop 2 onward)—eliminating even ICMP error-reply overhead while fully protecting your paid Transit capacity.