This is the way to install the telnet command in Alpine Linux (very popular in the container world such as docker)
#apk update
#apk add busybox-extras
Site dedicated mainly to internetworking. The goal is to share experiences, teach IP, IPv6. Talk about Linux, IP services, servers, promote IPv6 adoption, routing protocols, security and in some cases just some thoughts. Keywords: linux, cisco, ospf, bgp, eigrp, ip, ipv6, sla, link, routers, routings, telco, telecommunications, security, ipv4
This is the way to install the telnet command in Alpine Linux (very popular in the container world such as docker)
#apk update
#apk add busybox-extras
Step 1: Install Canonical Multipass your MAC
$brew install multipass
Step 2: Install the VM called docker
$multipass launch docker --name mydocker
Step 3: Connect to the new VM
$multipass shell mydocker
Step 4: Inside the VM install ContainerLab
$sudo su
#bash -c "$(curl -sL https://get.containerlab.dev)"
Let's try this simple back2back topology of two Linux computers with FRR
-- 2-frr-back2back.yml --
name: ipv6-ws
topology:
kinds:
linux:
image: ghcr.io/hellt/network-multitool
do not give:
ROUTERS ###
A1:
kind: linux
image: quay.io/frrouting/frr:8.4.1
exec:
- "sysctl -w net.ipv6.conf.all.forwarding=1"
- "ip address add dev eth1 2001:db8:ffab::1/64"
A2:
kind: linux
image: quay.io/frrouting/frr:8.4.1
exec:
- "ip address add dev eth1 2001:db8:ffab::2/64"
- "sysctl -w net.ipv6.conf.all.forwarding=1"
links:
- endpoints: ["R1:eth1", "R2:eth1"]
--- yml --
Step 5: Let's build the topology with clab:
clab dep -t 2-frr-back2back.yml
Step 6: finally we are going to connect to one of the VMs inside ContainerLAB
docker exec -i -t clab-ipv6-ws-R2 bash
Introduction
The Border Gateway Protocol (BGP) plays a critical role in building and maintaining Internet routing tables, so much so that it is considered the “glue” that holds the Internet together. In this context, a long-standing and very popular technique known as ‘AS Path Prepending’ has been devised as a key strategy for influencing route selection and optimizing an AS’s inbound and outbound traffic.
In this document, we will navigate through the IETF draft titled “AS Path Prepending” [1], which includes several ideas and concepts that are of great value to the community.
About draft-ietf-grow-as-path-prepending
This draft has been under discussion within the Global Routing Operation (GROW) Working Group since 2020 and is currently on version 10. The document has seven co-authors: M. McBride, D. Madory, J. Tantsura, R. Raszuk, H. Li., J. Heitz, and G. Mishra. It predominantly received support on the discussion list (including my own). You can read the draft here.
What is AS Path Prepending?
AS Path Prepending is a technique that involves repetitively adding one’s autonomous system identifier (ASN) to the list of ASs in a BGP route path (AS_PATH). Its goal is to influence route selection by making certain paths less attractive to inbound/outbound traffic. In other words, it consists of adding our autonomous system to the AS_PATH and therefore artificially “lengthening the path” to a prefix on the Internet.
In the figure above, without prepends, Router A prefers to go to C via B. However, when three prepends are added on B, router A decides to reach C via D.
Why is AS Path Prepending used and what is it used for?
AS Path prepending is used for multiple reasons. The main reason is undoubtedly traffic engineering, which in turn is used to influence an AS’s inbound and outbound traffic. It is very likely that the AS wishes to achieve one of the following goals:
To prepend or not to prepend, that is the question
Prepending is a bit like NAT in that it is often a necessary evil. As we will explain, its excessive and sometimes unnecessary use can become a vulnerability with significant implications for network stability.
What’s wrong with using AS Path Prepending?
We all know that AS Path Prepending is a very common technique to influence BGP decisions. However, its excessive, incorrect, and sometimes unnecessary use can have negative consequences. For example:
Given that AS Path Prepend is no longer recommended, what alternatives are available?
There are many techniques for performing traffic engineering in BGP. I will mention some that appear in the draft:
This is all well and good, but I still need to use AS Path Prepending. Any suggestions?
The draft mentions the best current practices when using AS Pat Prepending, which I will summarize below:
Final Considerations
The use of AS Path Prepending is a valuable strategy but should be used only when necessary and with caution, following best practices. Excessive use of prepends may cause unforeseen events that may affect our autonomous system from a traffic and a security perspective.
We invite you to read the full draft (available here and to join the discussion on the LACNOG mailing list.
We also encourage you to comment on this post to let us know if you are prepending your ASN, as well as why and what you are using this for.
References:
[1] https://datatracker.ietf.org/doc/draft-ietf-grow-as-path-prepending/