BGP workaround for backbone issue

I had an interesting issue where I had to use BGP traffic engineering to work around an unusual quark with a major backbone provider. The site I was working with was dual-homed using a major national provider and a smaller local provider. In order to better load traffic between the circuits we attempted to use some BGP as-path prepending to favor the major connection less. When we added more than two prepends to the major provider, all traffic on the link stopped and we only saw about 4kbps to traffic on the link.
Continue reading “BGP workaround for backbone issue”

facebooktwittergoogle_plusredditpinterestlinkedinmail

Better way of formatting Mac Addresses in Python

Following up on my Formating mac addresses using python post I have a better way of using Mac addresses.  I have been using the netaddr library for ip and mac address manipulations.  To convert a binary mac address to an EUI object you can use the following code

import netaddr
from netaddr import EUI

def convertMac(octet):
"""
This Function converts a binary mac address to a hexadecimal string representation
"""
return EUI(netaddr.strategy.eui48.packed_to_int(octet))

with the EUI object you have multiple options to format with.

>>> from netaddr import EUI
>>> import netaddr
>>> mac = EUI('01-23-45-67-89-0A')
>>> print mac
01-23-45-67-89-0A
>>>
>>> mac.dialect = netaddr.mac_cisco
>>> print mac
0123.4567.890a
>>>
>>> mac.dialect = netaddr.mac_unix
>>> print mac
1:23:45:67:89:a
>>>
>>> mac.dialect = netaddr.mac_bare
>>> print mac
01234567890A
>>>
>>> mac.dialect = netaddr.mac_unix_expanded
>>> print mac
01:23:45:67:89:0a
>>> mac.dialect = netaddr.mac_eui48
>>> print mac
01-23-45-67-89-0A
facebooktwittergoogle_plusredditpinterestlinkedinmail

Mirroring 802.1q trunk interfaces while preserving the tags

Earlier today I was needing to verify two pieces of configured equipment were using the correct 802.q trunks by using a packet capture. Continue reading “Mirroring 802.1q trunk interfaces while preserving the tags”

facebooktwittergoogle_plusredditpinterestlinkedinmail

Mercurial for Tracking Cisco Configs

As I have been working with different routers I have squired a small repository of configuration files that I use for examples, backups, and ways of remembering the way the network was set up before a change. At the start I maintained each config as a separate file, usually containing the date (i.e. router1-071012.cfg). While that worked for a while it got cumbersome when I wanted to track more than one legacy version of a config file. Continue reading “Mercurial for Tracking Cisco Configs”

facebooktwittergoogle_plusredditpinterestlinkedinmail

AS Numbers reserved for documentation and private use

Preparing for putting together some posts on BGP I looked up to see if there were documentation AS numbers reserverd for documentation, just like the ip addresses in one of my previous posts the following AS Numbers are reserved. Continue reading “AS Numbers reserved for documentation and private use”

facebooktwittergoogle_plusredditpinterestlinkedinmail

Using an ASR9000 with Calix E7 gear

I worked recently to add a Calix E7 to a network to do GPON Fiber for Ethernet customers. The customers would need to get a dhcp address for a dhcp server, and I needed to add DHCP Option 82 logging for record keeping purposes. Continue reading “Using an ASR9000 with Calix E7 gear”

facebooktwittergoogle_plusredditpinterestlinkedinmail

Allowing UNI or protected ports on Cisco switch to reach each other using IP

When deploying Metro Ethernet service and Colocated services, best practice it to put the ports in protected mode or uni. This is to prevent customers from causing interference to each other with layer2 protocols. It also allows the user of service provider traffic filtering. The downside is without additional configuration, customer traffic to another customer is blackholed when they exist in the same subnet. Continue reading “Allowing UNI or protected ports on Cisco switch to reach each other using IP”

facebooktwittergoogle_plusredditpinterestlinkedinmail

Using reverse telnet and ssh

Sometimes I find a need to use a console cable remotely, but getting someone to set up a PC or laptop with a serial connection for remote access can be quite a hassle.   I have used the following configurations to get remote serial access using only an onsite router. Continue reading “Using reverse telnet and ssh”

facebooktwittergoogle_plusredditpinterestlinkedinmail

Editing Cisco ACLs Inline

Are you annoyed at having to copy an ACL to a text editor to add a line?   After that, you have to either remove the ACL entirely or add the new version with a different name and update all the interfaces to use the new name.  I have been using the following trick recently to edit ACLs inline without having the complete remove or rewrite the ACL.
Continue reading “Editing Cisco ACLs Inline”

facebooktwittergoogle_plusredditpinterestlinkedinmail