Posts tagged ‘bgp’

ROUTE Notes – Further IGP Redistribution

As always, corrections are requested.

Study Questions

  • I’ve got IGRP and EIGRP both configured with the same AS number.  What’s special about this configuration?

If both use the same AS number, then they automatically redistribute their routes into each other without using the redistribute command.

  • When redistributing one IGP into another, where’s a good place to filter routes?

There’s no one good place, but at the router(s) that’s doing the redistribution is a good start.  There’s no need to send an IGP a bunch of routes it doesn’t need.

  • When redistributing one IGP into another, where’s a good place to summarize routes?

There’s no one good place, but that may be best done at the router just inside the redistributing router.  If the redistributing router only sees the summary route, that’s what it will pass to the other IGP.

  • What’s the default metric of RIP?

That’s infinity, so it’s unreachable with an explicit metric.

  • I’ve redistributed OSPF into RIP, but I don’t see my subnets there.  What gives?

RIP automatically summarized routes, so look for summaries instead of specific subnets.

  • How can you limit the number of routes redistributed into EIGRP or OSPF?

Use the redistribute maximum-prefix X directive under the routing protocol, where X is the maximum number of routes.

  • What are the metrics of connected routes when redistributed into EIGRP?

Those routes take the metric of the associated interface instead of using the metric you gave to the redistribution.  [This seems fishy at best.  Can anyone help clarify, please?]

  • I have 845734928 interfaces on my router, but I only want to use 3 of them for EIGRP and only want to configure a single network statement.  What’s the easiest way to do that?

Set all the interfaces as passive with the passive-interface default router subcommand.  Next, make all your interesting interfaces non-passive with the no passive-interface X subcommand.  Now you can configure network 0.0.0.0 255.255.255.255 to match all the interfaces, but only the interesting interfaces will participate.

  • What is the term for the rank of trustworthiness a routing protocol provides?

Administrative distance

  • How can I change the AD of external EIGRP routes to 201 while keeping the default AD for internal EIGRP routes?

Router1(config-router)#distance eigrp 90 201
You have to set both, so you’ll have to remember that EIGRP has an AD of 90 for internal routes by default.

  • How can I change the AD of OSPF routes to 192.168.0.0/24 to 202?

Router1(config)#access-list 88 permit 192.168.0.0 0.0.0.255
Router1(config)#router ospf X
Router1(config)#distance 202 0.0.0.0 255.255.255.255 88

  • Is it possible to set the AD of different OSPF routes types like intra-area and interarea?

Yes.  You can give it the old distance ospf inter-area X to change the AD.  It also works for intra-area and external routes.

  • Is it possible to set the AD of an external OSPF route to 192.168.100.0/24 to 202 without changing the others?

I would have though you could use a route-map for that, but I can’t find a proper set command in a route-map.  [A little help, please.]

ROUTE Notes – Controlling BGP

Corrections, please.  I skipped a bunch of BGP intro stuff to get to the juicy center.  I’ll see if I can come back later and finish the other parts for posterity.

Study Notes

  • Is BGP route selection a controversial subject?

Yes.  If you ask 1000 network guys the best way to influence BGP, you’ll probably get 1000 different answers.

  • At what position in the PA list of a BGP update do you find the weight attribute?

You don’t.  Weight is a Cisco-proprietary thing.

  • List the attributes of a BGP route that a Cisco router evaluates in order of operation with a short description.

Next-hop : Is the next hop IP reachable?
Weight : A numeric value where bigger is better; this is of local significance and is not passed to any BGP peers
LOCAL_PREF : A numeric value where bigger is better; this is shared within an AS
Local : Is the next hop me (0.0.0.0)?
AS_PATH length : The number of AS hops to the destination; the closer the better
ORIGIN : Did this route come from an IGP (I), an EGP (E), or somewhere else(?)?  I over E over ?
MED : Multi Exit Discriminator; can be used by one AS to influence routes to that AS; smaller is better
Neighbor type : eBGP are better than iBGP routes
IGP metric : Prefer the next-hop address that’s closest via an IGP like OSPF or EIGRP (or RIP, Ivan)
Route age : Prefer the oldest (and thus the most stable) route
Lowest BGP neighbor router ID : Do I have to explain that one?
Lowest BGP neighbor IP : You know what this is, right?

  • Alright, what’s the mnemonic?

N WLLA OMNI

  • Which attributes can be used to influence your path out to another AS?

Weight
LOCAL_PREF
AS_PATH

  • Which attributes can be used to influence another AS’s path to you?

MED
AS_PATH

  • When you look at the output of show ip bgp, which column lists the MED?

The Metric column.

  • If there are two entries for a network in the output of show ip bgp, in what order are they listed?

They are listed from youngest to oldest.  You can infer the comparative age by looking at the order in which they appear.  See “route age” in the attribute list.

  • If I set the weight of a prefix with a route-map in the BGP neighbor config, but then set the weight of the neighbor, what shows up in the BGP table?

The neighbor weight trumps the prefix weight, so all routes from that neighbor will be weighted the same.

  • What is different about weight compared to the other attributes?

Weight is actually not a BGP path attribute (PA).  When a route is received from a BGP peer, the weight is set and stored locally; it is not an attribute carried in the routing update like AS_PATH or MED.

  • If you receive the same route from both an eBGP and iBGP peer, what will the local preference be for each route assuming you haven’t changed the explicitly?

The eBGP route’s local preference will be null, and the iBGP route’s will be 100.

  • What is maximum-paths in BGP land?

That’s the maxiumum number of routes that BGP will submit to the RTM if routes are still tied by the IGP metric step of the tie breaker process.

  • I applied a route map to a BGP neighbor to change the AS path, but now all the routes are gone except for the influenced routes; what happened?

BGP always tries to filter routes if you use a route map, so you probably just forgot your explicit permit at the end of the route map.

  • What super-common mechanism is typically used to change BGP attributes like MED or AS path?

route-maps rock!

  • What does “>” mean in the output of show ip bgp?

That means the path indicated is the best path for the prefix.

What Command Was That

What command…

  • …shows the weights for all BGP routes?

show ip bgp

  • …shows the local preference for all BGP routes?

show ip bgp

  • …shows the AS path for all BGP routes?

show ip bgp

  • …show the MED for all BGP routes?

show ip bgp [ look under the Metric column ]

  • …shows all the prefixes that a router knows via BGP?

show ip bgp [ is there a theme here? ]

  • …shows the MED for a specific BGP route in the routing table without using show ip bgp?

show ip route x.x.x.x [ and look for the metric of the route; the number after the AD ]

  • …shows why a BGP route wasn’t inserted into the routing table?

show ip bgp rib-failures

Stubby Post – show ip protocols

I’ve seen and used the command before, but I’ve never really seen any use of the show ip protocols command until tonight while reading up for my ROUTE test.  There’s a lot of good information in the output, and, from the way the book is reading, this is a great candidate for use in a lab question.

To check it out a bit, I set up a small network with four routers connected only to a single Ethernet segment.  I set up one router to run EIGRP, OSPF, and BGP to each one of the other routers just so I could see the output for the different routing protocols.  Here’s what puked out after struggling with GNS for a few minutes.

R1#sh ip protocols
Routing Protocol is "eigrp 1"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Default networks flagged in outgoing updates
  Default networks accepted from incoming updates
  EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
  EIGRP maximum hopcount 100
  EIGRP maximum metric variance 1
  Redistributing: eigrp 1
  EIGRP NSF-aware route hold timer is 240s
  Automatic network summarization is in effect
  Maximum path: 4
  Routing for Networks:
    192.168.0.0
  Routing Information Sources:
    Gateway         Distance      Last Update
  Distance: internal 90 external 170

Routing Protocol is "ospf 1"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Router ID 192.168.0.101
  Number of areas in this router is 1. 1 normal 0 stub 0 nssa
  Maximum path: 4
  Routing for Networks:
    192.168.0.0 0.0.0.255 area 0
 Reference bandwidth unit is 100 mbps
  Routing Information Sources:
    Gateway         Distance      Last Update
  Distance: (default is 110)

Routing Protocol is "bgp 65001"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  IGP synchronization is disabled
  Automatic route summarization is disabled
  Neighbor(s):
    Address          FiltIn FiltOut DistIn DistOut Weight RouteMap
    192.168.0.104
  Maximum path: 1
  Routing Information Sources:
    Gateway         Distance      Last Update
  Distance: external 20 internal 200 local 200

The EIGRP section shows some important details, including what k-values are used, networks configured, and administrative distance (AD) of the various route types (internal and external).  The OSPF section shows the router ID, number of areas on the router, and number of area types (normal, stub, NSSA), as well as the networks configured and the AD.  The section regarding BGP shows summarization status, neighbors (along with any filter lists, distribution lists, local weights, and route-maps if they were configured), and the ADs again.

That’s good stuff to know.  I’ll have to put that command in usual repertoire.

Renesys Analysis of SuproNet Announcement Debacle

This single Czech provider announcing a single prefix caused a huge increase in the global rate of updates, peaking at 107,780 updates per-second. This peak occurred at 16:30:54 UTC, less than 8 minutes after the first announcement.

At Renesys, we call a prefix impacted in a given hour if either suffers an outage or has a non-trivial amount of instability. In the hour before this event, there were 1215 impacted prefixes globally out of a total of 271,175. During the event, that number surged to 12,920 or 4.8% of all prefixes on earth. One announcement from one provider and we have a 10-fold increase in planetary routing instability for an hour. North America suffered the most, increasing from 0.35% to 4.76%, while South America suffered the least, increasing from 0.52% to 1.75%.

It’s an interesting read and shows another example of just how vulnerable the Internet is as a whole.

ACLs and HSRP, BGP, OSPF, VRRP, GLBP…

Here’s a handy list of ACL entries to allow your devices to speak routing protocols, availability protocols, and some other stuff. We’ll assume you have ACL 101 applied to your Ethernet inbound; your Ethernet has an IP of 192.168.0.1.

  • BGP : Runs on TCP/179 between the neighbors

access-list 101 permit tcp any host 192.168.0.1 eq 179

  • EIGRP : Runs on its own protocol number from the source interface IP to the multicast address of 224.0.0.10

access-list 101 permit eigrp any host 224.0.0.10

  • OSPF : Runs on its own protocol number from the source interface IP to the multicast address of 224.0.0.5; also talks to 224.0.0.6 for DR/BDR routers

access-list 101 permit ospf any host 224.0.0.5
access-list 101 permit ospf any host 224.0.0.6

  • HSRP : Runs on UDP/1985 from the source interface IP to the multicast address of 224.0.0.2. I’ve seen in the past that it runs on UDP/1985, but I didn’t find any evidence of that in a quick Google for it. Can someone verify?

access-list 101 permit udp any host 224.0.0.2 eq 1985

  • HSRP version 2 : Runs on UDP/1985 from the source interface IP to the multicast address of 224.0.0.102.

access-list 101 permit udp any host 224.0.0.2 eq 1985

  • RIP : Runs on UDP/520 from the source interface IP to the multicast address of 224.0.0.9

access-list 101 permit udp any host 224.0.0.9 eq 520

  • VRRP : Runs on its own protocol number from the source interface IP to the multicast address of 224.0.0.18

access-list 101 permit 112 any host 224.0.0.18

  • VRRP-E : This is a Foundary thing according to readers, and runs on UDP/8888 from the source interface IP to the multicast address of 224.0.0.2

access-list 101 permit 112 any host 224.0.0.2 eq 8888

  • GLBP : Runs on UDP from the source interface IP to the multicast address of 224.0.0.102

access-list 101 permit udp any host 224.0.0.102

  • DHCPD (or bootps) : Runs on UDP/67 from 0.0.0.0 (since the client doesn’t have an address yet) to 255.255.255.255 (the broadcast).

access-list 101 permit udp any host 255.255.255.255 eq 67
If anyone else has one to add, do so in the comments.