Preventing IXP Transit Hijacking on Cisco IOS-XE with VRF & Route Leaking

Connecting to an Internet Exchange Point (IXP) lets colocation providers and ISPs offload traffic onto settlement-free peering links, significantly reducing upstream Transit costs. However, at Layer 2, an IXP switch fabric places dozens or hundreds of independent routers onto the same shared broadcast domain. Any unscrupulous IXP peer can install a static route pointing external destinations toward your router’s IXP interface IP—effectively hijacking your paid Transit links for free.

In this guide, we reproduce that attack and build an automated, architectural defense on Cisco IOS-XE using VRF isolation and MP-BGP route leaking. (Running Juniper Junos on your border? See our companion article: Preventing IXP Transit Hijacking on Juniper Junos with Forwarding Routing-Instances.)

Lab Topology & Prerequisites

Cisco IOS-XE IXP peering and Transit protection topology showing LittleWolf AS65000 (192.0.2.0/24), ChinaTelecom CN2 AS4809, ChinaTelecom 163 AS4134, CT-Customer AS65120 (114.114.114.114/32), Others AS65200 (114.51.41.0/24), and DE-CIX IXP Switch and Route Server (AS6695, 80.81.192.0/21)
Figure 1: Lab topology simulating DE-CIX peering alongside upstream Transit (Cisco IOS-XE).

Lab Components & Baseline Setup

  1. One Cisco IOS-XE border router (LittleWolf-Backbone, AS65000).
  2. Simulated customer servers (LittleWolf-Customer and Others-Customer).
  3. One upstream Transit link (59.43.100.0/31 to ChinaTelecomCN2-AS4809).
  4. One IXP peering link (80.81.192.0/21 simulating DE-CIX with Route Server AS6695).

Interface IP addresses, baseline BGP sessions, and end-to-end reachability are pre-configured before testing.

Step 1: Baseline Reachability & Reproducing the IXP Transit Hijack

1. Verify Baseline Reachability to 114.114.114.114 and Between Customers

[admin@LittleWolf-Customer] > ping 114.114.114.114 src-address=192.0.2.100
  SEQ HOST                                     SIZE TTL TIME  STATUS
    0 114.114.114.114                            56  61 12ms
    1 114.114.114.114                            56  61 5ms
    2 114.114.114.114                            56  61 2ms
    sent=3 received=3 packet-loss=0% min-rtt=2ms avg-rtt=6ms max-rtt=12ms
[admin@Others-Customer] > ping 114.114.114.114 src-address=114.51.41.9
  SEQ HOST                                     SIZE TTL TIME  STATUS
    0 114.114.114.114                            56  62 2ms
    1 114.114.114.114                            56  62 2ms
    2 114.114.114.114                            56  62 2ms
    sent=3 received=3 packet-loss=0% min-rtt=2ms avg-rtt=2ms max-rtt=2ms
[admin@LittleWolf-Customer] > ping 114.51.41.9 src-address=192.0.2.100
  SEQ HOST                                     SIZE TTL TIME  STATUS
    0 114.51.41.9                                56  60 6ms
    1 114.51.41.9                                56  60 3ms
    2 114.51.41.9                                56  60 31ms
    sent=3 received=3 packet-loss=0% min-rtt=3ms avg-rtt=13ms max-rtt=31ms

2. Inspect Both Backbone BGP Tables After Connecting to DE-CIX

After bringing up the DE-CIX link and peering with Route Server 80.81.192.1 (AS6695), inspect how each backbone router learns 114.114.114.0/24:

LittleWolf-Backbone#show ip bgp 114.114.114.114
BGP routing table entry for 114.114.114.0/24, version 6
Paths: (1 available, best #1, table default, not advertised to any peer)
  Not advertised to any peer
  Refresh Epoch 5
  4809 4134 65120
    59.43.100.1 from 59.43.100.1 (59.43.100.1)
      Origin IGP, localpref 100, valid, external, best
      Community: no-advertise
      rx pathid: 0, tx pathid: 0x0
Others-backbone#show ip bgp 114.114.114.114
BGP routing table entry for 114.114.114.0/24, version 7
Paths: (1 available, best #1, table default, not advertised to any peer)
  Not advertised to any peer
  Refresh Epoch 4
  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

Both networks learn 114.114.114.0/24 strictly from their respective paid Transit providers.

3. How an Abusive Peer Hijacks Transit via Static Routes

Because both border routers share the 80.81.192.0/21 DE-CIX Layer-2 segment—and because a router’s default global FIB forwards packets solely by destination IP without validating ingress interface policies—Others-backbone can inject a static route pointing 114.114.114.114/32 to 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

Running traceroute from Others-Customer confirms the hijack immediately:

[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     3.8     1.3     8.4
 2 80.81.192.100                      0%    3  10.7ms       9     5.2      11
 3 59.43.100.1                        0%    3   7.5ms     7.1     6.4     7.5
 4 59.43.100.3                        0%    3   3.6ms     4.5     3.6     5.4
 5 114.114.114.114                    0%    3   3.8ms       4     3.7     4.6

Traffic enters LittleWolf-Backbone over DE-CIX (80.81.192.100) and exits straight through our paid AS4809 CN2 Transit link.

Step 2: Defense Options & VRF Isolation Architecture

Before vs. after diagram of Cisco IOS-XE VRF protection against IXP Transit hijacking: isolating Gi1 into ip vrf decix with selective MP-BGP route-leaking drops unauthorized Transit lookups with ICMP host unreachable
Figure 2: Static-route IXP Transit hijack vs. Cisco IOS-XE VRF isolation with bidirectional MP-BGP route leaking.
  • Option 1 — Ingress ACLs on the IXP Interface: Blocks unauthorized traffic, but IXP peer prefixes and internal customer ranges evolve constantly. Stale ACLs risk blackholing legitimate traffic, limiting this approach to small static setups.
  • Option 2 — Dedicated IXP VRF + Bidirectional MP-BGP Route Leaking: Eliminates the vulnerability structurally. The IXP interface sees only leaked internal prefixes and IXP peering routes—never the global Transit table—while MP-BGP automates synchronization.

Step 3: Configure VRF Isolation & MP-BGP Route Leaking on IOS-XE

1. Create VRF decix and Move the DE-CIX Interface & BGP Peer

LittleWolf-Backbone(config)#ip vrf decix  // Create a VRF named decix
LittleWolf-Backbone(config-vrf)#rd 65535:65000 // Assign an RD to distinguish the VRF (ASN:NN format)
LittleWolf-Backbone(config-vrf)#int g1
LittleWolf-Backbone(config-if)#ip vrf forwarding decix // Move the DE-CIX port into VRF decix (note: IOS-XE wipes existing IP addresses—back them up first!)
% Interface GigabitEthernet1 IPv4 disabled and address(es) removed due to enabling VRF decix
LittleWolf-Backbone(config-if)#ip address 80.81.192.100 255.255.248.0 // Re-apply the DE-CIX interface IP
LittleWolf-Backbone(config)#router bgp 65000
LittleWolf-Backbone(config-router)#address-family ipv4 vrf decix // Configure the DE-CIX Route Server session inside the VRF address family
LittleWolf-Backbone(config-router-af)#neighbor 80.81.192.1 remote 6695
LittleWolf-Backbone(config-router-af)#neighbor 80.81.192.1 activate
*Jan 13 00:36:51.986: %BGP-5-ADJCHANGE: neighbor 80.81.192.1 vpn vrf decix Up

Confirm the VRF BGP session with the DE-CIX Route Server and verify the learned peering prefix:

LittleWolf-Backbone#show bgp vrf decix vpnv4 unicast summary
BGP router identifier 192.0.2.1, local AS number 65000
BGP table version is 2, main routing table version 2

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
80.81.192.1     4         6695      12      10        2    0    0 00:06:01        1

LittleWolf-Backbone#show bgp vrf decix vpnv4 unicast

     Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 65535:65000 (default for vrf decix)
 *>   114.51.41.0/24   80.81.192.200                          0 6695 65200 i

LittleWolf-Backbone#show ip route vrf decix

Routing Table: decix
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
Gateway of last resort is not set

      80.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        80.81.192.0/21 is directly connected, GigabitEthernet1
L        80.81.192.100/32 is directly connected, GigabitEthernet1
      114.0.0.0/24 is subnetted, 1 subnets
B        114.51.41.0 [20/0] via 80.81.192.200, 00:08:24

2. Configure Bidirectional Global ↔ VRF Route Leaking

Isolating the IXP in a VRF without leaking routes would break legitimate peering. Below, import ipv4 unicast map leaks our internal block (192.0.2.0/24) into vrf decix, while export ipv4 unicast map leaks DE-CIX peer routes back into the global table:

// Filter matching internal customer prefixes to leak from Global RIB into VRF decix
LittleWolf-Backbone(config)#ip prefix-list littlewolf permit 192.0.2.0/24
LittleWolf-Backbone(config)#route-map decix-import permit 100
LittleWolf-Backbone(config-route-map)#match ip address prefix-list littlewolf

// Filter matching DE-CIX peering routes to leak from VRF decix into Global RIB
LittleWolf-Backbone(config)#route-map decix-export permit 100
LittleWolf-Backbone(config-route-map)#match ip address prefix-list export
LittleWolf-Backbone(config)#ip prefix-list export permit 0.0.0.0/0 ge 1

LittleWolf-Backbone(config)#ip vrf decix
LittleWolf-Backbone(config-vrf)#import ipv4 unicast map decix-import // Leak matching global routes into VRF decix
LittleWolf-Backbone(config-vrf)#export ipv4 unicast map decix-export // Leak matching VRF routes out to Global RIB
LittleWolf-Backbone(config-vrf)#route-target export 65535:65000 // Mandatory export RT extended community for VRF-to-global leaking
LittleWolf-Backbone(config-vrf)#exit

Step 4: Verify Legitimate Peering & Hijack Blocking

1. Inspect VRF decix and Global BGP Routing Tables

LittleWolf-Backbone#show ip route vrf decix bgp
Routing Table: decix
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP

      192.0.0.0/24 is subnetted, 1 subnets 
B       192.0.2.0 is directly connected, 00:42:26, GigabitEthernet2 // Internal prefix leaked from Global RIB via MP-BGP
      114.0.0.0/24 is subnetted, 1 subnets 
B        114.51.41.0 [20/0] via 80.81.192.200, 00:10:34 // Peering prefix learned from DE-CIX
LittleWolf-Backbone#show ip route bgp
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP

      114.0.0.0/24 is subnetted, 2 subnets
B        114.51.41.0 [20/0] via 80.81.192.200 (decix), 00:09:22 // Peering route leaked from VRF decix into Global RIB
B        114.114.114.0 [20/0] via 59.43.100.1, 01:15:36 // Upstream Transit route from AS 4809

2. Confirm Normal Bidirectional DE-CIX Peering

[admin@LittleWolf-Customer] > tool traceroute 114.51.41.9
 # ADDRESS                          LOSS SENT    LAST     AVG    BEST   WORST
 1 192.0.2.1                         0%    2   1.2ms     5.6     1.2     9.9
 2 80.81.192.200                      0%    2  10.5ms    12.4    10.5    14.2 // Direct peering via DE-CIX
 3 114.51.41.9                        0%    2   4.8ms     9.4     4.8      14
[admin@Others-Customer] > tool traceroute 192.0.2.100
 # ADDRESS                          LOSS SENT    LAST     AVG    BEST   WORST
 1 114.51.41.1                        0%    4   1.3ms     2.1     1.3     4.3
 2 80.81.192.100                      0%    4   4.7ms     4.7     4.3     4.8 // Direct peering via DE-CIX
 3 192.0.2.100                       0%    4   4.5ms     4.9     4.3     5.8

3. Confirm Unauthorized Transit Traffic Is Rejected

Repeat the hijack test from Others-Customer toward 114.114.114.114:

[admin@Others-Customer] > tool traceroute 114.114.114.114
 # ADDRESS                          LOSS SENT    LAST     AVG    BEST   WORST
 1 114.51.41.1                        0%    4   6.8ms     4.9     2.5     6.8
 2 80.81.192.100                      0%    4   5.4ms     5.6     5.2     6.2
 3 80.81.192.100                      0%    4   4.7ms     4.9     4.5     5.7
 4                                    0%    0     0ms

[admin@Others-Customer] > ping 114.114.114.114
  SEQ HOST                                     SIZE TTL TIME  STATUS
    0 80.81.192.100                              56 254 11ms  host unreachable
    1 80.81.192.100                              56 254 8ms   host unreachable
    2 80.81.192.100                              56 254 12ms  host unreachable
    3 80.81.192.100                              56 254 6ms   host unreachable
    sent=4 received=0 packet-loss=100%

80.81.192.100 immediately returns ICMP host unreachable (100% loss) because vrf decix contains zero upstream Transit routes. In production, you only need to maintain ip prefix-list littlewolf—or match your internal IGP (e.g., OSPF) inside the import route-map for zero-touch automation.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.