VXLAN Config – Adding BGP EVPN

In the last blog post I setup a basic VXLAN config just allowing 2 hosts on separate leaf switches to communicate within their common subnet. In that configuration all of the hosts were learned by the VTEPs from BUM traffic flooded using multicast. Using BGP EVPN, hosts are learned by their own leaf switch and then advertised to the BGP speaking spine switches which reflect them back down to all other leafs. As soon as a leaf switch learns of a host (most likely from that host sending a GARP or some ARP request) it will advertise that host’s information to everyone else. Even when using BGP EVPN arp requests are still sent to all VTEPs using multicast even though the VTEPs have probably already learned about the remote host via BGP. That is where arp suppression comes into play. Arp suppression allows the VTEP to respond to arp requests if the VTEP already knows the remote hosts mac address. There is a bit of upfront work to get this setup though because some switches require you carve up the TCAM to make room for ether-arp.

Continue reading “VXLAN Config – Adding BGP EVPN”

Cisco ASA and Squid WCCP on Ubuntu

In order to use WCCP with Squid it must be built to support WCCP. Unfortunatly the default apt-get install squid(3) doesn’t support WCCP out of the box so it has to be BUILT FROM SOURCE

Assuming you’ve built Squid with WCCP support (using my guide or not) the following is how to get WCCP working between a Cisco ASA and Squid on Ubuntu.

There is a huge gotcha with the Cisco ASA, it only supports GRE and the Clients and Squid have to be in the same subnet…You can get around this by using multiple dynamic instances but for most of my audience I think this isn’t a problem. If I get requests for instructions on that perhaps I’ll look into it?

Here are the variables I’m working with:
ASA LAN IP Address:
SQUID eth0 IP Address:

#1. Configure the ASA:

access-list WCCP_SERVERS extended permit ip host any 
access-list LAN_WCCP_REDIRECT extended permit tcp any eq www
wccp web-cache redirect-list LAN_WCCP_Redirect group-list wccp_servers password *****
wccp interface LAN web-cache redirect in

Most guides will tell you that you need to deny the Squid LAN IP but that’s not true, the ASA will do it automagically.

#2. Configure Squid:
Add the following to /etc/squid/squid.conf:

http_port 3129 intercept
wccp2_forwarding_method gre
wccp2_return_method gre
wccp2_service standard 0 password=*****

Reconfigure squid to use the new config:

squid -k reconfigure

Now here’s an important part that almost all guide fail to mention. The ASA will pick a Router Identifier of it’s highest addressed interface once squid tries to connect to it for WCCP. You need go get that Router Identifier from the ASA:

show wccp

For our purposes let’s say that Router Identifier is

We need to create a script that will run when eth0 comes up and create the GRE interface and permits the WCCP traffic…so let’s create the following file:
vi /etc/network/if-up.d/wccp.sh

if [ "$IFACE" == "eth0" ]; then
    modprobe ip_gre
    ip tunnel add wccp0 mode gre remote local dev eth0
    ifconfig wccp0 netmask up
    echo 1 > /proc/sys/net/ipv4/ip_forward
    echo 0 > /proc/sys/net/ipv4/conf/eth0/rp_filter
    echo 0 > /proc/sys/net/ipv4/conf/wccp0/rp_filter
    iptables -t nat -A PREROUTING -i wccp0 -p tcp --dport 80 -j REDIRECT --to-port 3129

Notice that I use the Router ID and not the LAN IP for the remote tunnel IP.

Finally, we need to tell the system to run that script with eth0 comes up. So edit the interfaces file (/etc/network/interfaces) and include the following line under iface eth0 inet:

post-up /etc/network/if-up.d/wccp.sh

You should now be able to restart networking (or just reboot the system) and it should be working.

PowerShell Function: Fix-MAC

function Fix-MAC
        # MAC Address
        foreach ($MAC in $MACS)
            if ($MAC -match "^([a-f0-9]{2})[.-: ]?([a-f0-9]{2})[.-: ]?([a-f0-9]{2})[.-: ]?([a-f0-9]{2})[.-: ]?([a-f0-9]{2})[.-: ]?([a-f0-9]{2})$")
                if ($IOS)
                    ("{0}{1}.{2}{3}.{4}{5}" -f $matches[1..6]).ToLower()
                elseif ($Lower)
                    ("{0}:{1}:{2}:{3}:{4}:{5}" -f $matches[1..6]).ToLower()
                    ("{0}:{1}:{2}:{3}:{4}:{5}" -f $matches[1..6]).ToUpper()
                "Could not parse $MAC"