RMU VLabNet 7.4.1-Fundamental BGP Routing Analytics

Virtual Laboratory Networking Exercises

INFS6230 and INFS6760 – RMU C&IS

 

  1. Using vtysh (Note: with notation like [120/2], 120 is the Administrative Distance (AD) and 2 is the metric (RIP metric is hop count). Since vtysh uses the code B for BGP without distinguishing between eBGP and iBGP, which have different AD values, examine the AD value to see if a BGP routing is external (20) or internal (200). [see examples below] Thus eBGP routings will be selected over OSPF or RIP routings, while OSPF (110) will be selected over iBGP routings. Administrative Distance (AD) values are assigned as a quantification of “trust” in a class of routing by a given protocol (see table below). Selected routings designated with an asterisk code (*, shown as FIB, using Cisco terminology) are based here on Zebra’s Routing Information Base (RIB). (x.y.z. = first three octets of assigned eth0 IP address.)

Accompanying BGP Routing Diagram 3.7 (with K4 Mesh and K5 Mesh Autonomous Systems)

vm-abcst0:/home/abcst0# vtysh -c "show ip route"

Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,

       I - ISIS, B - BGP, > - selected route, * - FIB route

 

K>* 0.0.0.0/0 via x.y.z.97, eth0

O   10.10.10.96/27 [110/10] is directly connected, eth1, 00:37:11

C>* 10.10.10.96/27 is directly connected, eth1

O>* 10.10.101.0/29 [110/20] via 10.10.10.101, eth1, 00:37:10

B   10.10.101.0/29 [200/1] via x.y.z.101, eth0, 02w3d02h

R   10.10.101.0/29 [120/2] via 10.10.10.101, eth1, 03w3d01h

B   10.10.102.0/29 [200/0] via x.y.z.102, eth0, 00:36:11

O>* 10.10.102.0/29 [110/20] via 10.10.10.102, eth1, 00:36:21

R   10.10.102.0/29 [120/2] via 10.10.10.102, eth1, 00:36:33

C>* 10.10.103.0/29 is directly connected, eth1

O>* 10.10.104.0/29 [110/20] via 10.10.10.104, eth1, 00:37:10

B   10.10.104.0/29 [200/0] via x.y.z.104, eth0, 02w3d02h

R   10.10.104.0/29 [120/2] via 10.10.10.104, eth1, 03w3d04h

O>* 10.10.105.0/29 [110/20] via 10.10.10.105, eth1, 00:37:10

B   10.10.105.0/29 [200/0] via x.y.z.105, eth0, 02w4d00h

R   10.10.105.0/29 [120/2] via 10.10.10.105, eth1, 03w3d01h

O>* 10.10.106.0/29 [110/20] via 10.10.10.106, eth1, 00:37:10

B   10.10.106.0/29 [200/0] via x.y.z.106, eth0, 02w4d17h

R   10.10.106.0/29 [120/2] via 10.10.10.106, eth1, 03w3d04h

O>* 10.10.107.0/29 [110/20] via 10.10.10.107, eth1, 00:37:10

B   10.10.107.0/29 [200/0] via x.y.z.107, eth0, 02w3d05h

R   10.10.107.0/29 [120/2] via 10.10.10.107, eth1, 03w3d00h

B   10.10.108.0/29 [200/0] via x.y.z.108, eth0, 00:36:06

O>* 10.10.108.0/29 [110/20] via 10.10.10.108, eth1, 00:37:10

R   10.10.108.0/29 [120/2] via 10.10.10.108, eth1, 03w3d04h

O>* 10.10.109.0/29 [110/20] via 10.10.10.109, eth1, 00:37:10

B   10.10.109.0/29 [200/0] via x.y.z.109, eth0, 02w4d17h

R   10.10.109.0/29 [120/2] via 10.10.10.109, eth1, 03w3d04h

O>* 10.10.110.0/29 [110/20] via 10.10.10.110, eth1, 00:37:10

B   10.10.110.0/29 [200/0] via x.y.z.110, eth0, 02w3d01h

R   10.10.110.0/29 [120/2] via 10.10.10.110, eth1, 03w3d01h

O   10.10.111.0/29 [110/20] via 10.10.10.111, eth1, 00:37:10

B>* 10.10.111.0/29 [20/0] via x.y.z.111, eth0, 02w3d01h

R   10.10.111.0/29 [120/2] via 10.10.10.111, eth1, 03w3d04h

O   10.10.112.0/29 [110/20] via 10.10.10.112, eth1, 00:37:10

B>* 10.10.112.0/29 [20/0] via x.y.z.112, eth0, 02w3d01h

R   10.10.112.0/29 [120/2] via 10.10.10.112, eth1, 03w3d04h

B>* 10.10.114.0/29 [20/0] via x.y.z.114, eth0, 02w3d01h

C>* 127.0.0.0/8 is directly connected, lo

O>* 172.12.107.2/32 [110/20] via 10.10.10.107, eth1, 00:37:10

B   172.12.107.2/32 [200/0] via x.y.z.107, eth0, 02w3d02h

R   172.12.107.2/32 [120/2] via 10.10.10.107, eth1, 03w3d00h

O>* 172.16.107.2/32 [110/20] via 10.10.10.107, eth1, 00:37:10

B   172.16.107.2/32 [200/0] via x.y.z.107, eth0, 02w3d02h

R   172.16.107.2/32 [120/2] via 10.10.10.107, eth1, 03w3d00h

O   x.y.z.96/27 [110/20] via 10.10.10.101, eth1, 00:36:21

                              via 10.10.10.105, eth1, 00:36:21

                              via 10.10.10.106, eth1, 00:36:21

                              via 10.10.10.107, eth1, 00:36:21

                              via 10.10.10.108, eth1, 00:36:21

                              via 10.10.10.109, eth1, 00:36:21

                              via 10.10.10.110, eth1, 00:36:21

                              via 10.10.10.112, eth1, 00:36:21

                              via 10.10.10.102, eth1, 00:36:21

                              via 10.10.10.104, eth1, 00:36:21

                              via 10.10.10.111, eth1, 00:36:21

C>* x.y.z.96/27 is directly connected, eth0

  1. BGP Policies A – Using a prefix-list in configuration.

!

ip prefix-list avoid-stub seq 5 deny 10.10.____.0/29

ip prefix-list avoid-stub seq 10 permit any

!

  1. BGP Policies B – Traffic Engineering – Using a route-map and pre-pending in configuration. [being developed]

!

neighbor <iR0> prepend 64706 64706 64706

!

See : van Beijnum, Iljitsch, “Building Reliable Networks with the Border Gateway Protocol,” Chapter 6: “Traffic Engineering,”(2002):   http://oreilly.com/catalog/bgp/chapter/ch06.html

  1. BGP – Multi-Exit Discrimator (MED).

See Cisco document(s) on “How BGP Routers Use the Multi-Exit Discriminator for Best Path Selection”: http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094934.shtml. Please note download on this page.

BGP router commands relateted to MED:

always-compare-med      Allow comparing MED from different neighbors

deterministic-med       Pick the best-MED path among paths advertised from

                        the neighboring AS

Exercises:

A. (1-2) Refer to the results of vtysh -c "show ip route" above:

  1. For which ASBRs (101-112, 114) was the routing learned through OSPF? ____________________
  2. For which ASBRs (101-112, 114) was the routing learned through BGP? ____________________

Administrative Distances Table for items 3-6:

vtysh code

Protocol Type

Protocol

Admin. Distance

C

~

Directly Connected

0

S

Static

Interface

1

 

Dynamic

EIGRP

5

B

Dynamic

eBGP

20

 

Dynamic

IGRP

100

O

Dynamic

OSPF

110

I

Dynamic

IS-IS

115

R

Dynamic

RIP

120

 

Dynamic

EGP

140

B

Dynamic

iBGP

200

 

 

Unknown

255

B. (3-6) Regarding the Administrative Distances table above:

  1. According to Administrative Distance, if a route has been learned by RIP and OSPF, which protocol is selected?
  2. According to Administrative Distance, if a route has been learned by Static Configuration and RIP, which protocol is selected?
  3. According to Administrative Distance, if a route has been learned by eBGP and iBGP, which protocol is selected?
  4. According to Administrative Distance, if a route has been learned by iBGP and OSPF, which protocol is selected?

BGP Peering and Next Node Path Questions, Items 7-11

BGPpeering208b.tif

(C. Items 5-9. Assume you are AS Border Router R______)

1.      What is your Autonomous System (AS)? ______________________________

2.      What iBGP peering(s) do you need? ____________________________________

  1. What eBGP peering(s) do you need? ____________________________________

Next node paths are expressed in terms of ASs traversed. i means “internal”

Example: 64709 i (meaning path through AS 64709, then internal)

  1. What is your simplest direct next node path to a router in an AS two ASs distant clockwise P? Identify Router _____ and Next Node Path ______________________
  2. What is your next node path to the same router _____ counter-clockwise Q if the direct path is not available due to communication problems between you and the AS in which the router is located?

Example of BGP Next Node Routing

This example corresponds to BGP Routing Diagram 3.7 using bgpd router command show ip bgp ipv4 unicast (same configuration as shown by vtysh example above.)

bgpd# show ip bgp ipv4 unicast

BGP table version is 0, local router ID is 10.10.10.103

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale, R Removed

Origin codes: i - IGP, e - EGP, ? - incomplete

 

   Network          Next Hop            Metric LocPrf Weight Path

* i10.10.10.96/27   x.y.z.101           1    100      0  ?

*>                  0.0.0.0                  1         32768  ?

*>i10.10.101.0/29   x.y.z.101           1    100      0  i

*>i10.10.102.0/29   x.y.z.102           0    100      0  i

*> 10.10.103.0/29   0.0.0.0                  1         32768  ?

*>i10.10.104.0/29   x.y.z.104           0    100      0  i

* i10.10.105.0/29   x.y.z.105                100      0 64704 i

*                   x.y.z.105                         0 64705 64704 i

*>i                 x.y.z.105                100      0 64704 i

* i10.10.106.0/29   x.y.z.106                100      0 64704 i

*                   x.y.z.106                         0 64705 64704 i

*>i                 x.y.z.106                100      0 64704 i

* i10.10.107.0/29   x.y.z.107                100      0 64704 i

*                   x.y.z.107                         0 64705 64704 i

*>i                 x.y.z.107                100      0 64704 i

*>i10.10.108.0/29   x.y.z.108                100      0 64704 i

*                   x.y.z.108                         0 64705 64704 i

*  10.10.109.0/29   x.y.z.109                         0 64705 64704 i

*>i                 x.y.z.109                100      0 64704 i

*>i10.10.110.0/29   x.y.z.110                100      0 64705 i

*> 10.10.111.0/29   x.y.z.111                         0 64705 i

*> 10.10.112.0/29   x.y.z.112                         0 64705 i

* i                 x.y.z.112                100      0 64705 i

*> 10.10.114.0/29   x.y.z.114                         0 64705 i

* i172.12.107.2/32  x.y.z.107                100      0 64704 ?

*                   x.y.z.107                         0 64705 64704 ?

*>i                 x.y.z.107                100      0 64704 ?

* i172.16.107.2/32  x.y.z.107                100      0 64704 ?

*                   x.y.z.107                         0 64705 64704 ?

*>i                 x.y.z.107                100      0 64704 ?

* ix.y.z.96/27 x.y.z.101           1    100      0  ?

*>                  0.0.0.0                  1         32768  ?

Total number of prefixes 17

Terminology:

  1. term multihomed: http://www.webopedia.com/TERM/M/multihomed.html See also: i6230vlabnet3-2Multihomed.htm .
  2. term MED (in BGP) means Multi-Exit Discriminator
  3. graph theory terms “K3,” “K4,” “K5,” see complete graph: http://www.utm.edu/departments/math/graph/glossary.html; if a network forms a complete graph, every vertex (host or router) is adjacent to (a directly connected neighbor of) every other vertex (host or router). See also:

Figure 3.8 (K4)

Figure 3.8b (K5)

  1. graph theory term path, see path: http://www.utm.edu/departments/math/graph/glossary.html

Tools:

  1. vtysh: http://linux.die.net/man/1/vtysh
  2. Carolyn Duffy Marsan, 4 open source BGP tools: Department of Homeland Security funding Internet routing security projects,” Network World, January 15, 2009; at: http://www.networkworld.com/news/2009/011509-bgp-side.html
  3. PCH Prefix List Sanity Checker: https://prefix.pch.net/applications/prefix-sanity/; see Packet Clearing House at: http://www.pch.net/home/index.php
  4. Examine BGP AS configurations using: telnet route-views.routeviews.org (“This router has views of the full routing tables from several ASes.”) For information see University of Oregon Advanced Network Technology Center at: http://www.routeviews.org/ and: http://www.robtex.com/dns/route-views.oregon-ix.net.html .

Resources (vtysh, Administrative Distance, metric):

  1. Cisco, “Implementing RIB on Cisco IOS XR Software,” http://www.cisco.com/en/US/docs/ios_xr_sw/iosxr_r3.7/routing/configuration/guide/rc37rib.html
  2. Cisco, “Route Selection in Cisco Routers”: http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094823.shtml
  3. CCNA: http://itknowledgeexchange.techtarget.com/network-technologies/ccna-administrative-distance-for-the-dynamic-routing-protocols/
  4. CCNA: http://www.estig.ipbeja.pt/~rmss/passa/carvao/r1-9.pdf
  5. Citrix, “Basic Dynamic Routing Troubleshooting Methods”: http://support.citrix.com/article/CTX120324
  6. Fengnet, “Recipe 5.9: Changing Administrative Distances”:http://fengnet.com/book/cisco.ios.cookbook.2nd/I_0596527225_CHP_5_SECT_10.html
  7. Junipernet, “Interactions between BGP and IGPs”: http://www.juniper.net/techpubs/software/erx/erx50x/swconfig-routing-vol2/html/bgp-config11.html
  8. Junipernet, “Setting the administrative distance for a route”: http://www.juniper.net/techpubs/en_US/junose10.0/information-products/topic-collections/swconfig-bgp-mpls/setting-the-administrative-distance-for-a-route.html
  9. Avici Systems, “distance BGP” : http://www.powerfast.net/bgp/BGP_Nd20.html
  10. A Networker Blog: “Basic BGP – Part 3 – AS Path Prepending”: http://anetworkerblog.com/2009/03/13/basic-bgp-part-3-as-path-prepending/
  11. Nil, Ivan Pepelnjak: “AS-path Prepending (Techincal Details)”: http://wiki.nil.com/AS-path_prepending_(technical_details)
  12. O’Reilly Online Catalog: “Building Reliable Networks with the Border Gateway Protocol, Chapter 6 – Traffic Engineering”: http://oreilly.com/catalog/bgp/chapter/ch06.html
  13. Technische Universität Berlin: http://www.net.t-labs.tu-berlin.de/teaching/ss08/RL_labcourse/worksheets/u03en.pdf
  14. Sadikhov Forum:  http://www.sadikhov.com/forum/index.php?showtopic=77561
  15. Velocity Reviews: http://www.velocityreviews.com/forums/t40700-help-with-understanding-show-ip-route-output.html
  16. Techexams/forums: http://www.techexams.net/forums/ccna-ccent/21613-show-ip-route-output-question.html
  17. Alex A. Stewart and Marta F. Antoszkiewicz, Department of Computer Science, The University of Northern Iowa, “BGP Route Analysis and Management Systems,” at: http://arxiv.org/ftp/arxiv/papers/0908/0908.0175.pdf
  18. Cisco, “How BGP Routers Use the Multi-Exit Discriminator for Best Path Selection,” at: http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094934.shtml

m, n = student domain number {nΣ| ((n ≥ 101) Ù (n ≤ 114))}

x.y.z. = first three octets of assigned routable network addresses for INFS6230.

Valerie J. H. Powell, RMU C&IS; Randall S. Johnson, RMU IT Technical Services

© 2009 by Robert Morris University

Update: 2011-11-24