Example-BGP
|
[#scenario Scenario] |
[#description VNUML Description] |
[#old_releases Old Releases] |
|
==BGP Networking Laboratory |
|||||||
Scenario | |||||||
This scenario provides an example of how VNUML can be used for testing routing daemons, and specifically bgpd, which is the BGP implementation included with Quagga Routing Suite.The example includes six routers (named R1 to R6) running BGP, each one belonging to a different Autonomous System (AS 65001 to AS 65006). Each AS establishes BGP connections with some other AS's, which can represent either transit or peering relations between them. In Figure 1 the relations between all the AS's are shown. ![]() Figure 1: Relations between AS's ![]() Figure 2: Detail on Point-to-Point links addresses |
<center>R1 |
|
|
|
|
| |
|
AS2-PREFIXES |
AS3-PREFIXES |
AS4-PREFIXES | ||||
|
ANY |
AS3-PREFIXES |
AS4-PREFIXES |
AS5-PREFIXES | |||
|
ANY |
AS2-PREFIXES |
AS6-PREFIXES | ||||
|
ANY |
ANY | |||||
|
ANY | ||||||
|
ANY |
|-
| class="title" colspan="2" | VNUML Description
|-
| colspan="2" |
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE vnuml SYSTEM "/usr/share/xml/vnuml/vnuml.dtd"> <vnuml> <global> <version>1.7</version> <simulation_name>bgp_example</simulation_name> <ssh_key>/root/.ssh/identity.pub</ssh_key> <automac offset="0"/> <vm_mgmt type="private" network="192.168.0.0" mask="24" offset="0"> <host_mapping/> </vm_mgmt> <vm_defaults> <filesystem type="cow">/usr/share/vnuml/filesystems/root_fs_tutorial</filesystem> <kernel>/usr/share/vnuml/kernels/linux</kernel> <shell>/bin/sh</shell> <console id="0">pts</console> </vm_defaults> </global> <net name="AS1-AS2" mode="uml_switch" /> <net name="AS1-AS3" mode="uml_switch" /> <net name="AS1-AS4" mode="uml_switch" /> <net name="AS2-AS3" mode="uml_switch" /> <net name="AS2-AS4" mode="uml_switch" /> <net name="AS2-AS5" mode="uml_switch" /> <net name="AS3-AS6" mode="uml_switch" /> <vm name="R1"> <if id="1" net="AS1-AS2"> <ipv4 mask="255.255.255.252">161.0.0.1</ipv4> </if> <if id="2" net="AS1-AS3"> <ipv4 mask="255.255.255.252">161.0.0.5</ipv4> </if> <if id="3" net="AS1-AS4"> <ipv4 mask="255.255.255.252">161.0.0.9</ipv4> </if> <filetree root="/usr/local/etc" when="start">/usr/share/vnuml/examples/bgp/conf/R1</filetree> <exec seq="start" type="verbatim">hostname</exec> <exec seq="start" type="verbatim">rm -f /tmp/bgpd.debug</exec> <exec seq="start" type="verbatim">/usr/local/sbin/zebra -f /usr/local/etc/zebra.conf.sample -d -P 2604</exec> <exec seq="start" type="verbatim">/usr/local/sbin/bgpd -f /usr/local/etc/bgpd.conf -d -P 2605</exec> <exec seq="stop" type="verbatim">hostname</exec> <exec seq="stop" type="verbatim">killall zebra</exec> <exec seq="stop" type="verbatim">killall bgpd</exec> </vm> <vm name="R2"> <if id="1" net="AS1-AS2"> <ipv4 mask="255.255.255.252">161.0.0.2</ipv4> </if> <if id="2" net="AS2-AS3"> <ipv4 mask="255.255.255.252">162.0.0.1</ipv4> </if> <if id="3" net="AS2-AS4"> <ipv4 mask="255.255.255.252">162.0.0.5</ipv4> </if> <if id="4" net="AS2-AS5"> <ipv4 mask="255.255.255.252">162.0.0.9</ipv4> </if> <filetree root="/usr/local/etc" when="start">/usr/share/vnuml/examples/bgp/conf/R2</filetree> <exec seq="start" type="verbatim">hostname</exec> <exec seq="start" type="verbatim">rm -f /tmp/bgpd.debug</exec> <exec seq="start" type="verbatim">/usr/local/sbin/zebra -f /usr/local/etc/zebra.conf.sample -d -P 2604</exec> <exec seq="start" type="verbatim">/usr/local/sbin/bgpd -f /usr/local/etc/bgpd.conf -d -P 2605</exec> <exec seq="stop" type="verbatim">hostname</exec> <exec seq="stop" type="verbatim">killall zebra</exec> <exec seq="stop" type="verbatim">killall bgpd</exec> </vm> <vm name="R3"> <if id="1" net="AS1-AS3"> <ipv4 mask="255.255.255.252">161.0.0.6</ipv4> </if> <if id="2" net="AS2-AS3"> <ipv4 mask="255.255.255.252">162.0.0.2</ipv4> </if> <if id="3" net="AS3-AS6"> <ipv4 mask="255.255.255.252">163.0.0.1</ipv4> </if> <filetree root="/usr/local/etc" when="start">/usr/share/vnuml/examples/bgp/conf/R3</filetree> <exec seq="start" type="verbatim">hostname</exec> <exec seq="start" type="verbatim">rm -f /tmp/bgpd.debug</exec> <exec seq="start" type="verbatim">/usr/local/sbin/zebra -f /usr/local/etc/zebra.conf.sample -d -P 2604</exec> <exec seq="start" type="verbatim">/usr/local/sbin/bgpd -f /usr/local/etc/bgpd.conf -d -P 2605</exec> <exec seq="stop" type="verbatim">hostname</exec> <exec seq="stop" type="verbatim">killall zebra</exec> <exec seq="stop" type="verbatim">killall bgpd</exec> </vm> <vm name="R4"> <if id="1" net="AS1-AS4"> <ipv4 mask="255.255.255.252">161.0.0.10</ipv4> </if> <if id="2" net="AS2-AS4"> <ipv4 mask="255.255.255.252">162.0.0.6</ipv4> </if> <filetree root="/usr/local/etc" when="start">/usr/share/vnuml/examples/bgp/conf/R4</filetree> <exec seq="start" type="verbatim">hostname</exec> <exec seq="start" type="verbatim">rm -f /tmp/bgpd.debug</exec> <exec seq="start" type="verbatim">/usr/local/sbin/zebra -f /usr/local/etc/zebra.conf.sample -d -P 2604</exec> <exec seq="start" type="verbatim">/usr/local/sbin/bgpd -f /usr/local/etc/bgpd.conf -d -P 2605</exec> <exec seq="stop" type="verbatim">hostname</exec> <exec seq="stop" type="verbatim">killall zebra</exec> <exec seq="stop" type="verbatim">killall bgpd</exec> </vm> <vm name="R5"> <if id="1" net="AS2-AS5"> <ipv4 mask="255.255.255.252">162.0.0.10</ipv4> </if> <filetree root="/usr/local/etc" when="start">/usr/share/vnuml/examples/bgp/conf/R5</filetree> <exec seq="start" type="verbatim">hostname</exec> <exec seq="start" type="verbatim">rm -f /tmp/bgpd.debug</exec> <exec seq="start" type="verbatim">/usr/local/sbin/zebra -f /usr/local/etc/zebra.conf.sample -d -P 2604</exec> <exec seq="start" type="verbatim">/usr/local/sbin/bgpd -f /usr/local/etc/bgpd.conf -d -P 2605</exec> <exec seq="stop" type="verbatim">hostname</exec> <exec seq="stop" type="verbatim">killall zebra</exec> <exec seq="stop" type="verbatim">killall bgpd</exec> </vm> <vm name="R6"> <if id="1" net="AS3-AS6"> <ipv4 mask="255.255.255.252">163.0.0.2</ipv4> </if> <filetree root="/usr/local/etc" when="start">/usr/share/vnuml/examples/bgp/conf/R6</filetree> <exec seq="start" type="verbatim">hostname</exec> <exec seq="start" type="verbatim">rm -f /tmp/bgpd.debug</exec> <exec seq="start" type="verbatim">/usr/local/sbin/zebra -f /usr/local/etc/zebra.conf.sample -d -P 2604</exec> <exec seq="start" type="verbatim">/usr/local/sbin/bgpd -f /usr/local/etc/bgpd.conf -d -P 2605</exec> <exec seq="stop" type="verbatim">hostname</exec> <exec seq="stop" type="verbatim">killall zebra</exec> <exec seq="stop" type="verbatim">killall bgpd</exec> </vm> </vnuml>
|-
| class="title" colspan="2" | Old Releases
|-
| colspan="2" |
- [1.3/bgp.html 1.3]
- [1.6/bgp.html 1.6]
|- | colspan="2" |
<center>Valid HTML 4.01!
|}