Forum Discussion

Piotr_Lewandows's avatar
Piotr_Lewandows
Icon for Altostratus rankAltostratus
Sep 17, 2018

Migration projects - how to avoid IP conflicts

Hi,

Wonder if there is smarter/easier way to avoid IP conflicts during migrations - in the phase when production and new service should listen on the same IP.

Scenario:

  • All VIPs in 192.168.1.0/24 subnet
  • All traffic to VIPs is coming via external router (no clients in 192.168.1.0/24 subnet)
  • Production device IP: 192.168.1.254
  • Production VIP: 192.168.1.100
  • New device IP: 192.168.1.253
  • New VIP: 192.168.1.100
  • Traffic from any client except test station (192.168.10.100) should hit VIP at production device

BIG-IP setup:

  • Floating IP: 192.168.1.253
  • VIP: 192.168.1.100; ARP disabled

External router setup:

  • Route: From 192.168.10.100 to 192.168.1.100/32 gw 192.168.1.253

One important note: virtual-address object for VS has to be created in advance via tmsh. For example using tmsh load sys config from-terminal merge and similar config:

ltm virtual-address 192.168.1.100 {
    address 192.168.1.100
    arp disabled
    mask 255.255.255.255
    traffic-group traffic-group-1
}

or of course any other suitable way. Reason for that is simple - auto created virtual-address objects (created when VS is created) always has ARP enabled.

After finishing testing all virtual-address objects can be updated with ARP enabled using simple bash script like below:

!/bin/sh
$1 contains source file with VIP to place in array
$2 contains enable or disable to turn on and off ARP fro VIP

if [ -z "$1" ]
then
     bad arguments - quit
    echo "Syntax: vip_arp_enable-disable_from-file.sh  "
else
    mapfile -t myArray < $1
    local count = 0

    for vip in "${myArray[@]}"
    do
        echo "Vip is: $vip";
        tmsh modify ltm virtual-address $vip arp $2;
        ((++count));

    done

    echo "$count processed"
fi

With above script it's possible to both enable and disable ARP, file with list of virtual-addresses to be processed.

Result:

Traffic from any client (except sourced from 192.168.10.100) is just send to 192.168.1.100 based on MAC in ARP Reply send to 192.168.1.0/24 subnet by router. BIG-IP never responds to ARP Request for 192.168.1.100 (ARP disabled on this VIP)

Traffic from sourced from 192.168.10.100 is send to 192.168.1.253 (next hop, using 192.168.1.253 MAC as target and 192.168.1.100 as target IP), then internally BIG-IP is able to route this packet to configured VS with 192.168.1.100.

Tested and working, but maybe not optimal approach? What I am afraid is if ARP cache on router will not be issue - like when production traffic is routed MAC of production VIP is cached, then when test traffic is processed (to the same IP as production) this cached entry will be used - traffic will reach production instead of test VIP - never happened in my lab but it's not 100% confirmation it would not fail.

Router simulated using other BIG IP with two VSs:

  • Wildcard (Forwarding IP) accepting traffic to subnet 192.168.1.0/24
  • Wildcard (PerformanceL4):

    • Source Address: 192.168.10.100/32
    • Destination Address/Mask: 192.168.1.0/24
    • All ports
    • All protocols
    • Address Translation and Port Translation: disabled
    • Pool with Pool Member: 192.168.1.253 (Floating IP of other BIG-IP)

1 Reply

  • From Kevin Davies:

    tmsh list ltm virtual-address | awk '/ltm/ { print "create ltm virtual-address "$3" arp disabled" }'
    

    Just to mark this as answered.