Pete's Packet

Limitless

Archive for the ‘BGP’ Category

How to Implement Multiprotocol BGP for IPv6

Posted by Peter Kurdziel on February 29, 2012

 

Configuring a BGP Process, BGP Router ID, and IPv6 Multiprotocol BGP Peer

ipv6 unicast-routing
!
router bgp 65000
no bgp default ipv4-unicast
bgp router-id 192.168.99.70
neighbor 2001:DB8:0:CC00::1 remote-as 64600
address-family ipv6 unicast
  neighbor 2001:DB8:0:CC00::1 activate

Configuring an IPv6 Multiprotocol BGP Peer Using a Link-Local Address

router bgp 65000
 neighbor FE80::XXXX:BFF:FE0E:A471 remote-as 64600
 neighbor FE80::XXXX:BFF:FE0E:A471 update-source fastethernet0
address-family ipv6
 neighbor FE80::XXXX:BFF:FE0E:A471 activate
 neighbor FE80::XXXX:BFF:FE0E:A471 route-map nh6 out
route-map nh6 permit 10
 match ipv6 address prefix-list cisco
 set ipv6 next-hop 2001:DB8:5y6::1
ipv6 prefix-list cisco permit 2001:DB8:2Fy2::/48 le 128
ipv6 prefix-list cisco deny ::/0
Note  


If you specify only the global IPv6 next-hop address (the ipv6-address argument) with the set ipv6 next-hop command after specifying the neighbor interface (the interface-type argument) with the neighbor update-source command, the link-local address of the interface specified with the interface-type argument is included as the next hop in the BGP updates. Therefore, only one route map that sets the global IPv6 next-hop address in BGP updates is required for multiple BGP peers that use link-local addresses.


Configuring an IPv6 Multiprotocol BGP Peer Group

router bgp 65000
no bgp default ipv4-unicast
neighbor group1 peer-group
neighbor 2001:DB8:0:CC00::1 remote-as 64600
address-family ipv6 unicast
 neighbor group1 activate
 neighbor 2001:DB8:0:CC00::1 peer-group group1

Advertising Routes into IPv6 Multiprotocol BGP

router bgp 65000
 no bgp default ipv4-unicast
address-family ipv6 unicast
  network 2001:DB8::/24

Configuring a Route Map for IPv6 Multiprotocol BGP Prefixes

router bgp 64900
no bgp default ipv4-unicast
neighbor 2001:DB8:0:CC00::1 remote-as 64700
address-family ipv6 unicast
 neighbor 2001:DB8:0:CC00::1 activate
 neighbor 2001:DB8:0:CC00::1 route-map rtp in
ipv6 prefix-list cisco seq 10 permit 2001:DB8::/24
route-map rtp permit 10
 match ipv6 address prefix-list cisco

Redistributing Prefixes into IPv6 Multiprotocol BGP

router bgp 64900
no bgp default ipv4-unicast
address-family ipv6 unicast
 redistribute rip

Advertising IPv4 Routes Between IPv6 Peers

router bgp 65000
!
 neighbor 6peers peer-group
 neighbor 2001:DB8:yyyy::2 remote-as 65002
 address-family ipv4
 neighbor 6peers activate
 neighbor 6peers soft-reconfiguration inbound
 neighbor 2001:DB8:yyyy::2 peer-group 6peers
 neighbor 2001:DB8:yyyy::2 route-map rmap in
!   
route-map rmap permit 10
 set ip next-hop 10.21.8.10

 

Posted in BGP, IPV6 | Leave a Comment »

Troubleshooting BGP

Posted by Peter Kurdziel on February 29, 2012

Main Troubleshooting Flowchart

bgp_trouble_main.jpg

Troubleshooting BGP Neighbor Establishment

bgp_trouble_neighbor.jpg

Note: *Sample log messages to be checked when neighbor is not coming up:

BGP_SESSION-5-ADJCHANGE: neighbor[ip address] IPv4 Unicast topology base removed
  from session Peer closed the session
BGP_SESSION-5-ADJCHANGE: neighbor[ip address] IPv4 Unicast topology base removed
  from session Unknown path error

Note: **Example of ping with packet size and enable does not fragment bit in IP header:

Router#ping 10.10.10.2 size 1400 df-bit

Type escape sequence to abort.
Sending 5, 1400-byte ICMP Echos to 10.10.10.2, timeout is 2 seconds:
Packet sent with the DF bit set
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/37/84 ms

Troubleshooting Routes Missing from the Routing Table

bgp_trouble_route_missing.jpg

Note: In the debug ip bgp x.x.x.x updates command, x.x.x.x is the neighbor to which the route should be advertised.

Troubleshooting Multihoming Inbound

bgp_trouble_multi_in.jpg

Troubleshooting BGP Route Advertisement

bgp_trouble_route_adv.jpg

Troubleshooting Multihoming Outbound

bgp_trouble_multi_out.jpg

Source:

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a008009478a.shtml#bgp_trouble_neighbor

 

Posted in BGP, Troubleshooting | Leave a Comment »

UC300 VOIP PBX

Posted by Peter Kurdziel on March 16, 2011

http://www.youtube.com/watch?v=1rE7oiIQ7fY&feature=player_embedded

Posted in BGP, IPV6, Service Provider | Leave a Comment »

ISP BGP templates for a default route and partial routes

Posted by Peter Kurdziel on January 10, 2011

Partial routes – routes that originate in your AS and the AS’s you are directly connected to.

Router bgp (AS number)
Neighbor x.x.x.x remote-as (AS number)
Neighbor x.x.x.x route-map PARTIALS out
ip as-path access-list 1 permit ^[1-9]*$
route-map PARTIALS per 10
match as-path 1

 

Default route and partial routes that originate in your AS and the AS’s you are directly connected to.

Router bgp (AS number)
Neighbor x.x.x.x remote-as (AS number)
Neighbor x.x.x.x default-originate !since there is no
default route in the routing table
Neighbor x.x.x.x route-map PARTIALS out
ip as-path access-list 1 permit ^[1-9]*$
ip prefix-list 1 seq 5 permit
0.0.0.0/0
route-map PARTIALS per 10
match ip address prefix 1
route-map PARTIALS per 20
match as-path 1

Default route only

Router bgp (AS number)
Neighbor x.x.x.x remote-as (AS number)
Neighbor x.x.x.x   default-originate !since there is no default
route in the routing table
Neighbor x.x.x.x route-map DEFAULTOUT out
ip prefix-list 1 seq 5 permit 0.0.0.0/0
route-map DEFAULTOUT permit 10
match ip address prefix-list 1

Posted in BGP | Leave a Comment »

Displaying BGP routes

Posted by Peter Kurdziel on September 15, 2010

show ip bgp neighbors <x.x.x.x> advertised-routes
This shows you the routes that you advertised to this peer.

show ip bgp neighbors <x.x.x.x> routes
This shows you the routes you received from this peer that made it through the inbound filters.

show ip bgp neighbors <x.x.x.x> received-routes
This shows you the routes you received from this peer, even those that were denied(filtered).

In order to use this last command you must configure:
 bgp <as>
 neighbor <x.x.x.x> soft-reconfiguration inbound

Posted in BGP, Troubleshooting | 1 Comment »

In order for VoIP traffic to not be in violation of the RTP standards and best practices, even/odd pairing of ports for RTP and RTCP traffic for SIP ALG, Skinny and H.323 has been made available.

Posted by Peter Kurdziel on July 15, 2010

User Defined Source Port Ranges for PAT Overview

In order for VoIP traffic to not be in violation of the RTP standards and best practices, even/odd pairing of ports for RTP and RTCP traffic for SIP ALG, Skinny and H.323 has been made available.

Following is a scenario of what happens to VoIP traffic translated using PAT without user defined ports.

The first VoIP traffic getting translated using PAT, would request for port 16384 and would get to use port 16384 for its RTP traffic.

The second VoIP traffic stream getting translated using PAT would also request 16384 for its RTP. Since this port number is already in use by the first call, PAT would translate the 16384 source port for the second phone to 1024 (assuming the port was free) and this would be in violation of the RTP standards/best practices.

A third call would end up using port 1025 and others would increment from there.

Each call after the first call would end up having its inside source port translated to an external port assignment that is out of specifications for RTP, and this would continue until PAT binding fir the first call expires.

Problems associated with RTP traffic being assigned to a non-standard port by PAT:

Inability for compressed RTP (cRTP) to be invoked in the return direction, as it only operates on RTP flows with compliant port numbers.

Difficulty in properly classifying voice traffic for corresponding QoS treatment.

Violation of standard firewall policies that specifically account for RTP/TRCP traffic by specified standard port range.

Here is an example from a debug ip nat sip I did:
02:02:14: NAT: SIP: [1] translate embedded port 1029->5060

Here is an example from show ip nat trans:
Pro Inside global      Inside local       Outside local      Outside global
udp 192.1.271:1024 10.1.1.252:5060   192.168.8.13:5060 192.168.8.13:5060

Even Port Parity

Cisco IOS NAT SIP gateways normally select the next available port+1 for SIP fixup in the NAT translations. The NAT gateway does not check for even/odd pair for RTP/TRCP port numbers, and as a result issues may arise with SIP user agents that are strictly following the encouraged even/odd parity for RTP/RTCP port numbers.

Even port parity for SIP, H.323, and skinny is supported by default and it can be turned off forcing the odd RTP ports allocation.

User Defined Source Port Ranges for PAT: Example

The following examples shows how to assign a set of ports and associate a map to them.

ip nat portmap NAT-I

 cisco-rtp-h323-low
 appl sip-rtp startport 32128 size 128
 appl sip-rtp startport 32000 size 64
ip nat inside source list 1 pool A overload portmap NAT-I

Table 1 Macro Names and Ports

Macro Name

Ports

Application

cisco-rtp-h323-low

16384-32767

H.323

cisco-rtp-h323-high

49152-65535

H.323

cisco-rtp-skinny-low

16384-32767

Skinny

cisco-rtp-skinny-high

49152-65535

Skinny

cisco-rtp-sip-low

16384-32767

SIP

cisco-rtp-sip-high

49152-65535

SIP

Configuration Examples for Even Port Parity

Even Port Parity: Example

The following example enables even port parity for H.323.

ip nat service allow-h323-even-rtp-ports

The following example enables even port parity for SIP.

ip nat service allow-sip-even-rtp-ports

The following example enables even port parity for the skinny protocol.

ip nat service allow-skinny-even-rtp-ports

source: http://www.cisco.com/en/US/docs/ios/ipaddr/configuration/guide/iad_pat_pt_rng.html

http://www.cisco.com/en/US/prod/collateral/iosswrel/ps6537/ps6586/ps6640/prod_white_paper0900aecd80597bc7.html

Posted in BGP, Troubleshooting | Leave a Comment »

BGP neighbor failover taking too long.

Posted by Peter Kurdziel on July 5, 2010

BGP neighbor failover taking too long.

Try lowering the timer values. BGP will use the lower value.
Try using neighbor ip-address fall-over [bfd | route-map map-name]
Try using OER/PfR

ICMP Echo Example
The following example, starting in global configuration mode, configures an active probe using an ICMP echo (ping) message. The 10.5.5.55 address is the target. No explicit configuration is required on the target device.

Router(config)# oer master
Router(config-oer-mc)# active-probe echo 10.5.5.55

TCP Connection Example
The following example, starting in global configuration mode, configures an active probe using a TCP connection message. The 10.5.55.56 address is the target. The target port number must be specified when configuring this type of probe.

Router(config)# oer master
Router(config-oer-mc)# active-probe tcp-conn 10.5.5.56 target-port 23

Posted in BGP, Troubleshooting | Leave a Comment »

Multiprotocol BGP for IPv6 example

Posted by Peter Kurdziel on April 19, 2010

Configuring an IPv6 Multiprotocol BGP Peer Group and advertising a route example.

Scenario
Configure R1 & R2 for IPv6 Multiprotocol BGP using a Peer Group and
advertising R1 & R2′s loopbacks.
Simple two router network for demonstration purposes.

R1<—->FR<—–>R2

 
Configuration
r1

ipv6 unicast-routing

interface Loopback99
 no ip address
 ipv6 address 2001:DB8:1111::1/48

interface Serial2/0
 ipv6 address 2001:DB8:0:CC00::1/48

router bgp 65100
 no bgp default ipv4-unicast
 neighbor group1 peer-group
 neighbor 2001:DB8:0:CC00::2 remote-as 65100
 neighbor 2001:DB8:0:CC00::2 peer-group group1

 address-family ipv6
 neighbor group1 activate
 neighbor 2001:DB8:0:CC00::2 peer-group group1
 network 2001:DB8:1111::1/48
 exit-address-family

r2
ipv6 unicast-routing

interface Loopback99
 no ip address
 ipv6 address 2001:DB8:1111::2/48

interface Serial2/0
 ipv6 address 2001:DB8:0:CC00::2/48

router bgp 65100
 no bgp default ipv4-unicast
 neighbor group1 peer-group
 neighbor 2001:DB8:0:CC00::1 remote-as 65100
 neighbor 2001:DB8:0:CC00::1 peer-group group1

 address-family ipv6
 neighbor group1 activate
 neighbor 2001:DB8:0:CC00::1 peer-group group1
 network 2001:DB8:1111::2/48
 exit-address-family

Verification

R1#sh ipv6 int br

Serial2/0             [up/up]
    FE80::C804:12FF:FEDC:8
    2001:DB8:0:CC00::1

Loopback99                 [up/up]
    FE80::C804:12FF:FEDC:8
    2001:DB8:1111::1

R2#sh ipv int b
Serial2/0               [up/up]
    FE80::C805:12FF:FEDC:8
    2001:DB8:0:CC00::2
Loopback99                 [up/up]
    FE80::C805:12FF:FEDC:8
    2001:DB8:1111::2

R1#
sh bgp ipv6 unicast sum
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
2001:DB8:0:CC00::2
                4   65100       6       6        2    0    0 00:02:17        1

R2#
sh bgp ipv6 unicast sum
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
2001:DB8:0:CC00::1
                4   65100       6       6        2    0    0 00:02:41        1

R1#
sh bgp ipv6 unicast neighbors 2001:DB8:0:CC00::2 advertised-routes
BGP table version is 2, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
              r RIB-failure, S Stale
Origin codes: i – IGP, e – EGP, ? – incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 2001:DB8:1111::1/48
                    ::                       0         32768 i

R2#
sh bgp ipv6 uni nei 2001:DB8:0:CC00::1 adver
BGP table version is 2, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
              r RIB-failure, S Stale
Origin codes: i – IGP, e – EGP, ? – incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 2001:DB8:1111::2/48
                    ::                       0         32768 i

       
R1#
sh bgp ipv6 unicast neighbors 2001:DB8:0:CC00::2 routes
BGP table version is 2, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
              r RIB-failure, S Stale
Origin codes: i – IGP, e – EGP, ? – incomplete

   Network          Next Hop            Metric LocPrf Weight Path
* i2001:DB8:1111::1/48
                    2001:DB8:0:CC00::2
                                             0    100      0 i

R2#
sh bgp ipv6 uni nei 2001:DB8:0:CC00::1 routes
BGP table version is 2, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
              r RIB-failure, S Stale
Origin codes: i – IGP, e – EGP, ? – incomplete

   Network          Next Hop            Metric LocPrf Weight Path
* i2001:DB8:1111::2/48
                    2001:DB8:0:CC00::1
                                             0    100      0 i

Troubleshooting

R2#deb bgp ipv6 unicast updates

R2#clear bgp ipv6 unicast * soft
R2#
00:22:50: BGP(1): 2001:DB8:0:CC00::1 send UPDATE (format) 2001:DB8:1111::2/48, next 2001:DB8:0:CC00::2, metric 0, path
00:22:50: BGP(1): updgrp 1 – 2001:DB8:0:CC00::1 enqueued 1 updates, average/maximum size (bytes) 75/75
00:22:50: BGP(1): 2001:DB8:0:CC00::1 rcvd UPDATE w/ attr: nexthop 2001:DB8:0:CC00::1, origin i, localpref 100, metric 0
00:22:50: BGP(1): 2001:DB8:0:CC00::1 rcvd 2001:DB8:1111::/48

Everything is as expected.

More info: Cisco IOS IPv6 Configuration Guide, Release 12.4 Implementing Multiprotocol BGP for IPv6
http://www.cisco.com/en/US/docs/ios/ipv6/configuration/guide/ip6-mptcl_bgp.html#wp1027258

Posted in BGP, IPV6, Service Provider | Leave a Comment »

Awesome flow chart- BPG path selection -

Posted by Peter Kurdziel on January 4, 2010

http://rbcciequest.wordpress.com/2008/02/27/bgp-path-selection/

Posted in BGP | Leave a Comment »

Tutorial: BGP/MPLS Layer 3 VPNs

Posted by Peter Kurdziel on October 24, 2009


Tutorial: BGP/MPLS Layer 3 VPNs

http://www.nanog.org/meetings/nanog30/abstracts.php?pt=NjIxJm5hbm9nMzA=&nm=nanog30


Posted in BGP, MPLS, VPN | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.