Skip to content

Run fakeroute

Marc-Olivier Buob edited this page Jul 8, 2016 · 4 revisions

fakeroute emulates topologies that you can "probe" by performing traceroute measurements. By default, `fakeroutè propose some samples using the following targets IPs (see here):

  • in IPv4: 127.1.1.1, 127.1.1.2, 127.1.1.3, 127.1.1.4, 127.1.1.5
  • in IPv6: 2001:db8:85a3::8a2e:370:7338

IPv4

  1. If your primary network interface (let say eth0) has no IPv4 address, you cannot route the fakeroute destinations. In our samples, each nodes belong to 1.1.1.0/24, so you may run as root:
ifconfig eth0:1 127.1.1.28/24
  1. Then run fakeroute as root:
cd ~/git/fakeroute/
./fakeroute/fakeroute -4

You should see something like this:

# ./fakeroute/fakeroute                                                                                                                      
I: You should run either './fakeroute/fakeroute -4' or either './fakeroute/fakeroute -6'. Default set to '-4'                                                                                 
I: Handling IPv4 probe packets...                                                                                                                                                             
   [                        127.1.1.3 ] Two-levels simple load balancers                                                                                                                      
   [                        127.1.1.2 ] Simple load balancer                                                                                                                                  
   [                        127.1.1.1 ] Simple asymmetric load balancer                                                                                                                       
   [                        127.1.1.5 ] Big fan out to 25 separate routes and then converge back                                                                                              
   [                        127.1.1.4 ] Weird load balancer                                                                                                                                   
I: Adding iptables rules for handled destinations (see "iptables -nL" and "ip6tables -nL")                                                                                                    
I: Running...

To simulate random load-balancing, fakeroute uses a random number generator. By default, the generator will be seeded with current linux time. If you would like to define your own seed, add the option --seed SEED.

./fakeroute/fakeroute -4 --seed 123
  1. Run a traceroute measurement toward one of these destinations:
paris-traceroute 127.1.1.1
  1. Press ctrl-c to stop fakeroute.

IPv6

  1. If your primary network interface (let say eth0) has no IPv6 address, you cannot route the fakeroute destinations. In our samples each nodes belong to 2001:0db8:85a3:0000:0000:8a2e:0370:7330/64, so you may run as root:
ifconfig eth0 inet6 add 2001:0db8:85a3:0000:0000:8a2e:0370:7330/64
  1. Run fakeroute as root:
cd ~/git/fakeroute/
./fakeroute/fakeroute -6

You should see something like this:

I: Handling IPv6 prove packets...
   [     2001:db8:85a3::8a2e:370:7338 ] IPv6 test
I: Adding iptables rules for handled destinations (see "iptables -nL" and "ip6tables -nL")
I: Running...

To simulate random load-balancing, fakeroute uses a random number generator. By default, the generator will be seeded with current linux time. If you would like to define your own seed, add the option [--seed seed].

./fakeroute/fakeroute -6 --seed 123
  1. Run a traceroute measurement toward this destination:
traceroute6 2001:db8:85a3::8a2e:370:7338
  1. Press ctrl-c to stop fakeroute.