Skip to content

Example: ethernet hairpin

Alt text


hostname r1
vrf def v1
 rd 1:1
vrf def v2
 rd 1:2
hairpin 1
int hairpin11
 vrf for v1
 ipv4 addr
 ipv6 addr 1234::1 ffff::
int hairpin12
 vrf for v2
 ipv4 addr
 ipv6 addr 1234::2 ffff::
r1 tping 100 5 vrf v1
r1 tping 100 5 vrf v2
r1 tping 100 5 1234::2 vrf v1
r1 tping 100 5 1234::1 vrf v2
r1 output show inter ha11 full
output ../binTmp/conn-hairpin.html
<html><body bgcolor="#000000" text="#FFFFFF" link="#00FFFF" vlink="#00FFFF" alink="#00FFFF">
here is the interface:
  1. Install ContainerLab as described here
  2. Fetch conn-hairpin01 file
  3. Launch ContainerLab conn-hairpin01.yml topology:

   containerlab deploy --topo conn-hairpin01.yml  
4. Destroy ContainerLab conn-hairpin01.yml topology:

   containerlab destroy --topo conn-hairpin01.yml  
5. Copy-paste configuration for each node in the lab topology

  1. Fetch or compile freeRtr rtr.jar file.
    You can grab it here
  2. Fetch conn-hairpin01.tst file here
  3. Launch conn-hairpin01.tst test:

   java -jar ../../rtr.jar test tester conn-hairpin01 path ./ temp ./ wait
4. Destroy freeRtr conn-hairpin01.tst test:

   Ctrl-C (In freeRtr test window)