Skip to content
Snippets Groups Projects
  • Neal Cardwell's avatar
    8c2959a0
    net-test: packetdrill: support remote prefixes of arbitrary length · 8c2959a0
    Neal Cardwell authored
    Allow the --remote_ip config parameter to be a prefix, not just a
    single address. The entire remote prefix is routed to the tun device
    or remote packetdrill machine.
    
    The goal here is to all tests to use more than one remote IP. The
    immediate motivation is testing GRE, where there is a remote IP for
    the TCP endpoint and a separate remote IP for the GRE decapsulator.
    But eventually we'll also want to allow testing multiple concurrent
    TCP connections from multiple remote IPs addresses as well.
    
    Here are examples of the remote prefix you get for various values of
    the --remote_ip field. These are chosen for convenience and backwards
    compatibility with existing tests that are already using the
    --remote_ip parameter.
    
    o Default:
    
    configuration                      remote prefix
    ------------------------------     -----------------
    IPv4, no --remote_ip            -> 192.0.2.0/24   (default)
    v4/6, no --remote_ip            -> 192.0.2.0/24   (default)
    IPv6, no --remote_ip            -> 2001:DB8::0/32 (default)
    
    o Explicit IP without prefix length (prefix includes all bits):
    
    configuration                      remote prefix
    ------------------------------     -----------------
    IPv4 --remote_ip=10.248.0.3     -> 10.248.0.3/32
    v4/6 --remote_ip=10.248.0.3     -> 10.248.0.3/32
    IPv6 --remote_ip=2001:db8::3    -> 2001:db8::3/128
    
    o Explicit with prefix length:
    
    configuration                      remote prefix
    ------------------------------     -----------------
    IPv4 --remote_ip=10.248.0.3/16  -> 10.248.0.0/16
    v4/6 --remote_ip=10.248.0.3/16  -> 10.248.0.0/16
    IPv6 --remote_ip=2001:db8::3/16 -> 2001::0/16
    
    Change-Id: Ibc95c3419d66bcf1bbfd8a1fc7650d0003345ef2
    8c2959a0
    History
    net-test: packetdrill: support remote prefixes of arbitrary length
    Neal Cardwell authored
    Allow the --remote_ip config parameter to be a prefix, not just a
    single address. The entire remote prefix is routed to the tun device
    or remote packetdrill machine.
    
    The goal here is to all tests to use more than one remote IP. The
    immediate motivation is testing GRE, where there is a remote IP for
    the TCP endpoint and a separate remote IP for the GRE decapsulator.
    But eventually we'll also want to allow testing multiple concurrent
    TCP connections from multiple remote IPs addresses as well.
    
    Here are examples of the remote prefix you get for various values of
    the --remote_ip field. These are chosen for convenience and backwards
    compatibility with existing tests that are already using the
    --remote_ip parameter.
    
    o Default:
    
    configuration                      remote prefix
    ------------------------------     -----------------
    IPv4, no --remote_ip            -> 192.0.2.0/24   (default)
    v4/6, no --remote_ip            -> 192.0.2.0/24   (default)
    IPv6, no --remote_ip            -> 2001:DB8::0/32 (default)
    
    o Explicit IP without prefix length (prefix includes all bits):
    
    configuration                      remote prefix
    ------------------------------     -----------------
    IPv4 --remote_ip=10.248.0.3     -> 10.248.0.3/32
    v4/6 --remote_ip=10.248.0.3     -> 10.248.0.3/32
    IPv6 --remote_ip=2001:db8::3    -> 2001:db8::3/128
    
    o Explicit with prefix length:
    
    configuration                      remote prefix
    ------------------------------     -----------------
    IPv4 --remote_ip=10.248.0.3/16  -> 10.248.0.0/16
    v4/6 --remote_ip=10.248.0.3/16  -> 10.248.0.0/16
    IPv6 --remote_ip=2001:db8::3/16 -> 2001::0/16
    
    Change-Id: Ibc95c3419d66bcf1bbfd8a1fc7650d0003345ef2
Code owners
Assign users and groups as approvers for specific file changes. Learn more.