Lab 10-1: Route Reflection

A route reflector setup consists of at least one route reflector and one or several route reflector clients that can also be assigned to a logical cluster via a 4-octet cluster ID. When only one route reflector exists, the implicit cluster ID is the loopback address of the router. The basic idea of the designers was that no changes are necessary on the client.

A connection to a single route reflector does suffice to receive and advertise prefixes. For the purpose of redundancy, it is common practice to connect route reflector clients to at least two redundant route reflectors. In addition, large architectures introduce clustering to create multiple logical groups (BGP CLUSTER-LIST attribute).

The cluster ID has to be consistent throughout a cluster. Of course, all route reflectors require full IBGP connectivity among themselves. Figure 10-6 (part a) demonstrates a single-cluster architecture featuring three fully meshed IBGP route reflectors. In this example, two route reflector clients are connected to multiple route reflectors for redundancy. Figure 10-6 (part b) presents a similar topology featuring multiple clusters.

Figure 10-6. Route Reflector Approaches

graphics/10fig06.jpg


We start with Example 10-5 featuring a conservative full IBGP mesh among the three UNIX servers running Zebra bgpd and scar running Cisco IOS architecture (which was the topology from Chapter 9, "Dynamic Routing Protocols?Interior Gateway Protocols"). The maximum-paths 6 statement in the scar configuration (highlighted) allows for up to six qualified BGP multipath candidate routes to the same destination to be placed in the routing table for load sharing.

Example 10-5. Zebra IBGP Configurations

ganymed-bgpd# show running-config



Current configuration:

!

hostname ganymed-bgpd

password 8 bJFoEOB0obLL6

enable password 8 bJFoEOB0obLL6

log file /var/log/bgpd.log

service advanced-vty

service password-encryption

!

router bgp 65000

 bgp router-id 192.168.44.1

 bgp cluster-id 1.1.1.1

 redistribute connected

 neighbor 192.168.1.1 remote-as 65000

 neighbor 192.168.1.1 update-source lo1

 neighbor 192.168.1.1 soft-reconfiguration inbound

 neighbor 192.168.2.7 remote-as 65000

 neighbor 192.168.2.7 update-source lo1

 neighbor 192.168.2.7 soft-reconfiguration inbound

 neighbor 192.168.201.2 remote-as 65000

 neighbor 192.168.201.2 update-source lo1

 neighbor 192.168.201.2 soft-reconfiguration inbound

!

access-list 1 remark vty-protection

access-list 1 permit 127.0.0.1

access-list 1 permit 192.168.1.0 0.0.0.255

!

line vty

 access-class 1

 exec-timeout 15 0

!

end



castor-bgpd# show running-config



Current configuration:

!

hostname castor-bgpd

password 8 4DwwIFdKLWvU.

enable password 8 dV8x4MhxDAuaw

log file /var/log/bgpd.log

service advanced-vty

service password-encryption

!

router bgp 65000

 bgp router-id 192.168.2.7

 bgp cluster-id 1.1.1.1

 redistribute connected

 neighbor 192.168.1.1 remote-as 65000

 neighbor 192.168.1.1 soft-reconfiguration inbound

 neighbor 192.168.44.1 remote-as 65000

 neighbor 192.168.44.1 soft-reconfiguration inbound

 neighbor 192.168.201.2 remote-as 65000

 neighbor 192.168.201.2 soft-reconfiguration inbound

!

access-list 1 remark vty-protection

access-list 1 permit 127.0.0.1

access-list 1 permit 192.168.1.0 0.0.0.255

!

line vty

 access-class 1

 exec-timeout 15 0

!

end



callisto-bgpd# show running-config



Current configuration:

!

hostname callisto-bgpd

password 8 m6eyKycFMHniQ

enable password 8 bjYlnA9YLBWyM

log file /var/log/bgpd.log

service advanced-vty

service password-encryption

!

router bgp 65000

 bgp router-id 192.168.1.1

 bgp cluster-id 1.1.1.1

 redistribute connected

 neighbor 192.168.2.7 remote-as 65000

 neighbor 192.168.2.7 soft-reconfiguration inbound

 neighbor 192.168.44.1 remote-as 65000

 neighbor 192.168.44.1 soft-reconfiguration inbound

 neighbor 192.168.201.2 remote-as 65000

 neighbor 192.168.201.2 soft-reconfiguration inbound

!

access-list 1 remark vty-protection

access-list 1 permit 127.0.0.1

access-list 1 permit 192.168.1.0 0.0.0.255

!

line vty

 access-class 1

 exec-timeout 0 0

!

end



scar# show running-config

...

!

router bgp 65000

 bgp router-id 192.168.201.2

 bgp cluster-id 1.1.1.1

 bgp log-neighbor-changes

 redistribute connected

 neighbor 192.168.7.7 remote-as 65000

 neighbor 192.168.7.7 update-source Loopback0

 neighbor 192.168.7.7 soft-reconfiguration inbound

 neighbor 192.168.14.1 remote-as 65000

 neighbor 192.168.14.1 update-source Loopback0

 neighbor 192.168.14.1 soft-reconfiguration inbound

 neighbor 192.168.44.1 remote-as 65000

 neighbor 192.168.44.1 update-source Loopback0

 neighbor 192.168.44.1 soft-reconfiguration inbound

 maximum-paths 6

!

...


Examples 10-6 and 10-7 demonstrate BGP-related Zebra show commands and Zebra and Cisco IOS architecture debug choices to gain more insight into the "under-the-hood" operation of BGP. In particular, Example 10-6 highlights a BGP example prefix of incomplete origin (highlighted text) due to the redistribution of connected routes. The lab culminates in detailed packet traces in Example 10-8, where we view OPEN and UPDATE messages. Similar analyzer traces regarding KEEPALIVE and NOTIFICATION messages are left as an exercise.

Example 10-6. Zebra BGP Example Output on Ganymed

ganymed-bgpd# show ip bgp

BGP table version is 0, local router ID is 192.168.44.1

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

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



   Network          Next Hop            Metric LocPrf Weight Path

* i192.168.1.0      192.168.1.1              0    100      0 ?

*>                  0.0.0.0                  0         32768 ?

* i192.168.2.0      192.168.2.7              0    100      0 ?

*>                  0.0.0.0                  0         32768 ?

* i192.168.7.0      192.168.201.2            0    100      0 ?

*>i                 192.168.2.7              0    100      0 ?

*>i192.168.13.0     192.168.201.2            0    100      0 ?

* i192.168.14.0     192.168.201.2            0    100      0 ?

*>i                 192.168.1.1              0    100      0 ?

*>i192.168.17.0     192.168.201.2            0    100      0 ?

*> 192.168.44.0     0.0.0.0                  0         32768 ?

* i192.168.45.0     192.168.1.1              0    100      0 ?

*>                  0.0.0.0                  0         32768 ?

* i192.168.80.0     192.168.2.7              0    100      0 ?

*>                  0.0.0.0                  0         32768 ?

*>i192.168.99.0/30  192.168.1.1              0    100      0 ?

*>i192.168.99.2/32  192.168.2.7              0    100      0 ?

*>i192.168.201.0    192.168.201.2            0    100      0 ?

*> 211.11.117.0     0.0.0.0                  0         32768 ?



Total number of prefixes 13



ganymed-bgpd# show ip bgp 192.168.80.0

BGP routing table entry for 192.168.80.0/24

Paths: (2 available, best #2, table Default-IP-Routing-Table)

  Advertised to non peer-group peers:

  192.168.1.1 192.168.2.7 192.168.201.2

  Local

    192.168.2.7 from 192.168.2.7 (192.168.2.7)

      Origin incomplete, metric 0, localpref 100, valid, internal

      Last update: Mon Apr 21 11:05:30 2003



  Local

    0.0.0.0 from 0.0.0.0 (192.168.44.1)

      Origin incomplete, metric 0, localpref 100, weight 32768, valid, sourced, best

     Last update: Mon Apr 21 10:12:32 2003



ganymed-bgpd# show ip bgp summary

BGP router identifier 192.168.44.1, local AS number 65000

1 BGP AS-PATH entries

0 BGP community entries



Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd

192.168.1.1     4 65000     395     417        0    0    0 05:20:58        4

192.168.2.7     4 65000     400     417        0    0    0 05:21:05        4

192.168.201.2   4 65000     229     233        0    0    0 00:41:24        5



Total number of neighbors 3



ganymed-bgpd# show ip bgp neighbors

BGP neighbor is 192.168.1.1, remote AS 65000, local AS 65000, internal link

  BGP version 4, remote router ID 192.168.1.1

  BGP state = Established, up for 05:21:08

  Last read 00:00:08, hold time is 180, keepalive interval is 60 seconds

  Neighbor capabilities:

    Route refresh: advertised and received (old and new)

    Address family IPv4 Unicast: advertised and received

  Received 394 messages, 2 notifications, 0 in queue

  Sent 413 messages, 5 notifications, 0 in queue

  Route refresh request: received 1, sent 1

  Minimum time between advertisement runs is 5 seconds

  Update source is lo1



 For address family: IPv4 Unicast

  Inbound soft reconfiguration allowed

  Community attribute sent to this neighbor (both)

  4 accepted prefixes



  Connections established 10; dropped 9

Local host: 192.168.44.1, Local port: 34695

Foreign host: 192.168.1.1, Foreign port: 179

Nexthop: 192.168.44.1

Nexthop global: ::1

Nexthop local: fe80::1

BGP connection: non shared network

Read thread: on  Write thread: off



BGP neighbor is 192.168.2.7, remote AS 65000, local AS 65000, internal link

  BGP version 4, remote router ID 192.168.2.7

  BGP state = Established, up for 05:21:15

  Last read 00:00:15, hold time is 180, keepalive interval is 60 seconds

  Neighbor capabilities:

    Route refresh: advertised and received (old and new)

    Address family IPv4 Unicast: advertised and received

  Received 396 messages, 4 notifications, 0 in queue

  Sent 414 messages, 3 notifications, 0 in queue

  Route refresh request: received 1, sent 1

  Minimum time between advertisement runs is 5 seconds

  Update source is lo1



 For address family: IPv4 Unicast

  Inbound soft reconfiguration allowed

  Community attribute sent to this neighbor (both)

  4 accepted prefixes



  Connections established 10; dropped 9

Local host: 192.168.44.1, Local port: 179

Foreign host: 192.168.2.7, Foreign port: 1062

Nexthop: 192.168.44.1

Nexthop global: ::1

Nexthop local: fe80::1

BGP connection: non shared network

Read thread: on  Write thread: off



BGP neighbor is 192.168.201.2, remote AS 65000, local AS 65000, internal link

  BGP version 4, remote router ID 192.168.201.2

  BGP state = Established, up for 00:41:34

  Last read 00:00:33, hold time is 180, keepalive interval is 60 seconds

  Neighbor capabilities:

    Route refresh: advertised and received (old and new)

    Address family IPv4 Unicast: advertised and received

  Received 229 messages, 0 notifications, 0 in queue

  Sent 232 messages, 1 notifications, 0 in queue

  Route refresh request: received 0, sent 0

  Minimum time between advertisement runs is 5 seconds

  Update source is lo1



 For address family: IPv4 Unicast

  Inbound soft reconfiguration allowed

  Community attribute sent to this neighbor (both)

  5 accepted prefixes



  Connections established 5; dropped 4

Local host: 192.168.44.1, Local port: 7928

Foreign host: 192.168.201.2, Foreign port: 179

Nexthop: 192.168.44.1

Nexthop global: ::1

Nexthop local: fe80::1

BGP connection: non shared network

Read thread: on  Write thread: off



ganymed-bgpd# show ip bgp neighbors 192.168.1.1 advertised-routes

BGP table version is 0, local router ID is 192.168.44.1

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

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



   Network          Next Hop            Metric LocPrf Weight Path

*> 192.168.1.0      192.168.44.1             0    100  32768 ?

*> 192.168.2.0      192.168.44.1             0    100  32768 ?

*> 192.168.44.0     192.168.44.1             0    100  32768 ?

*> 192.168.45.0     192.168.44.1             0    100  32768 ?

*> 192.168.80.0     192.168.44.1             0    100  32768 ?

*> 211.11.117.0     192.168.44.1             0    100  32768 ?



Total number of prefixes 6


Example 10-7. Cisco IOS Architecture and Zebra BGP Debug Choices

scar# debug ip bgp ?

  A.B.C.D     BGP neighbor address

  dampening   BGP dampening

  events      BGP events

  in          BGP Inbound information

  keepalives  BGP keepalives

  out         BGP Outbound information

  updates     BGP updates

  vpnv4       VPNv4 NLRI information



scar# debug ip bgp

BGP debugging is on



scar# clear ip bgp 192.168.14.1



00:30:33: BGP: 192.168.14.1 went from Established to Idle

*Mar  1 00:30:36: %BGP-5-ADJCHANGE: neighbor 192.168.14.1 Down User reset

00:30:33: BGP: 192.168.14.1 closing

00:30:33: BGP: 192.168.14.1 went from Idle to Active

00:30:33: BGP: 192.168.14.1 open active, delay 7016ms

00:30:40: BGP: 192.168.14.1 open active, local address 192.168.201.2

00:30:40: BGP: 192.168.14.1 went from Active to OpenSent

00:30:40: BGP: 192.168.14.1 sending OPEN, version 4, my as: 65000

00:30:40: BGP: 192.168.14.1 send message type 1, length (incl. header) 45

00:30:40: BGP: 192.168.14.1 rcv message type 1, length (excl. header) 26

00:30:40: BGP: 192.168.14.1 rcv OPEN, version 4

00:30:40: BGP: 192.168.14.1 rcv OPEN w/ OPTION parameter len: 16

00:30:40: BGP: 192.168.14.1 rcvd OPEN w/ optional parameter type 2 (Capability) len 6

00:30:40: BGP: 192.168.14.1 OPEN has CAPABILITY code: 1, length 4

00:30:40: BGP: 192.168.14.1 OPEN has MP_EXT CAP for afi/safi: 1/1

00:30:40: BGP: 192.168.14.1 rcvd OPEN w/ optional parameter type 2 (Capability) len 2

00:30:40: BGP: 192.168.14.1 OPEN has CAPABILITY code: 128, length 0

00:30:40: BGP: 192.168.14.1 OPEN has ROUTE-REFRESH capability(old) for all address-families

00:30:40: BGP: 192.168.14.1 rcvd OPEN w/ optional parameter type 2 (Capability) len 2

00:30:40: BGP: 192.168.14.1 OPEN has CAPABILITY code: 2, length 0

00:30:40: BGP: 192.168.14.1 OPEN has ROUTE-REFRESH capability(new) for all address-families

00:30:40: BGP: 192.168.14.1 went from OpenSent to OpenConfirm

00:30:40: BGP: 192.168.14.1 send message type 4, length (incl. header) 19

00:30:40: BGP: 192.168.14.1 rcv message type 4, length (excl. header) 0

00:30:40: BGP: 192.168.14.1 went from OpenConfirm to Established

*Mar  1 00:30:43: %BGP-5-ADJCHANGE: neighbor 192.168.14.1 Up

00:30:41: BGP: 192.168.14.1 send message type 4, length (incl. header) 19

00:30:41: BGP: 192.168.14.1 send message type 4, length (incl. header) 19

00:30:41: BGP: 192.168.14.1 rcv message type 4, length (excl. header) 0

00:30:54: BGP: 192.168.7.7 send message type 4, length (incl. header) 19

00:30:54: BGP: 192.168.7.7 rcv message type 4, length (excl. header) 0

00:30:57: BGP: 192.168.44.1 send message type 4, length (incl. header) 19

00:30:57: BGP: 192.168.44.1 rcv message type 4, length (excl. header) 0

00:31:22: BGP: Applying map to find origin for 192.168.13.0/29

00:31:22: BGP: Applying map to find origin for 192.168.14.0/24

00:31:22: BGP: Applying map to find origin for 192.168.201.0/32

00:31:22: BGP: Applying map to find origin for 192.168.7.0/24

00:31:22: BGP: Applying map to find origin for 192.168.17.0/29

00:31:40: BGP: 192.168.14.1 send message type 4, length (incl. header) 19

00:31:40: BGP: 192.168.14.1 rcv message type 4, length (excl. header) 0

00:31:54: BGP: 192.168.7.7 send message type 4, length (incl. header) 19

00:31:54: BGP: 192.168.7.7 rcv message type 4, length (excl. header) 0

00:31:57: BGP: 192.168.44.1 send message type 4, length (incl. header) 19

00:31:57: BGP: 192.168.44.1 rcv message type 4, length (excl. header) 0



scar# show ip bgp summary

BGP router identifier 192.168.201.2, local AS number 65000

BGP table version is 11, main routing table version 11

13 network entries and 19 paths using 1945 bytes of memory

2 BGP path attribute entries using 120 bytes of memory

0 BGP route-map cache entries using 0 bytes of memory

0 BGP filter-list cache entries using 0 bytes of memory

BGP activity 26/13 prefixes, 38/19 paths, scan interval 60 secs



Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd

192.168.7.7     4 65000      21      23       11    0    0 00:00:59        4

192.168.14.1    4 65000      21      24       11    0    0 00:00:39        4

192.168.44.1    4 65000      22      24       11    0    0 00:01:02        6



#

# The effect on callisto (the peer router):

#



callisto-bgpd# debug bgp ?

  events      BGP events

  filters     BGP filters

  fsm         BGP Finite State Machine

  keepalives  BGP keepalives

  updates     BGP updates



callisto-bgpd# debug bgp

BGP debugging is on

callisto-bgpd# BGP: 192.168.201.2 went from Established to Idle

BGP: 192.168.201.2 went from Idle to Connect

BGP: 192.168.201.2 went from Connect to Active

BGP: Performing BGP general scanning

BGP: 192.168.2.7 send message type 4, length (incl. header) 19

BGP: 192.168.2.7 rcv message type 4, length (excl. header) 0

BGP: 192.168.201.2 went from Active to OpenSent

BGP: 192.168.201.2 rcv message type 1, length (excl. header) 26

BGP: 192.168.201.2 rcv OPEN, version 4, remote-as 65000, holdtime 180,  id 192.168.201.2

BGP: 192.168.201.2 sending OPEN, version 4, my as 65000, holdtime 180, id 192.168.1.1

BGP: 192.168.201.2 send message type 1, length (incl. header) 45

BGP: 192.168.201.2 rcv OPEN w/ OPTION parameter len: 16

BGP: 192.168.201.2 rcvd OPEN w/ optional parameter type 2 (Capability) len 6

BGP: 192.168.201.2 OPEN has CAPABILITY code: 1, length 4

BGP: 192.168.201.2 OPEN has MP_EXT CAP for afi/safi: 1/1

BGP: 192.168.201.2 rcvd OPEN w/ optional parameter type 2 (Capability) len 2

BGP: 192.168.201.2 OPEN has CAPABILITY code: 128, length 0

BGP: 192.168.201.2 OPEN has ROUTE-REFRESH capability(old) for all address-families

BGP: 192.168.201.2 rcvd OPEN w/ optional parameter type 2 (Capability) len 2

BGP: 192.168.201.2 OPEN has CAPABILITY code: 2, length 0

BGP: 192.168.201.2 OPEN has ROUTE-REFRESH capability(new) for all address-families

BGP: 192.168.201.2 went from OpenSent to OpenConfirm

BGP: 192.168.201.2 send message type 4, length (incl. header) 19

BGP: 192.168.201.2 rcv message type 4, length (excl. header) 0

BGP: 192.168.201.2 went from OpenConfirm to Established

BGP: 192.168.201.2 send message type 4, length (incl. header) 19

BGP: 192.168.201.2 rcv message type 4, length (excl. header) 0

BGP: 192.168.201.2 rcv message type 4, length (excl. header) 0

BGP: 192.168.44.1 send message type 4, length (incl. header) 19

BGP: 192.168.44.1 rcv message type 4, length (excl. header) 0

BGP: Performing BGP general scanning

BGP: 192.168.2.7 send message type 4, length (incl. header) 19

BGP: 192.168.2.7 rcv message type 4, length (excl. header) 0

BGP: 192.168.201.2 send message type 4, length (incl. header) 19

BGP: 192.168.201.2 rcv message type 4, length (excl. header) 0

BGP: 192.168.44.1 send message type 4, length (incl. header) 19

BGP: 192.168.44.1 rcv message type 4, length (excl. header) 0



callisto-bgpd# show ip bgp summary

BGP router identifier 192.168.1.1, local AS number 65000

1 BGP AS-PATH entries

0 BGP community entries



Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd

192.168.2.7     4 65000     347     356        0    0    0 04:44:50        4

192.168.44.1    4 65000     350     359        0    0    0 04:44:42        6

192.168.201.2   4 65000     188     197        0    0    0 00:04:45        5



Total number of neighbors 3


Example 10-8. BGP Peer Negotiation Sniffer Traces on Callisto

#

# The big picture:

#



[root@callisto:#] tethereal ?i eth0

  0.248208 192.168.201.2 -> 192.168.14.1 TCP 11008 > bgp [FIN, PSH, ACK] Seq=2941710864

graphics/ccc.gif Ack=2857752019 Win=16176 Len=0

  0.266164 192.168.201.2 -> 192.168.14.1 TCP 11008 > bgp [ACK] Seq=2941710865

graphics/ccc.gif Ack=2857752020 Win=16176 Len=0

 10.166053 192.168.201.2 -> 192.168.14.1 TCP 11009 > bgp [SYN] Seq=1316263762 Ack=0

graphics/ccc.gif Win=16384 Len=0

 10.168416 192.168.201.2 -> 192.168.14.1 TCP 11009 > bgp [ACK] Seq=1316263763

graphics/ccc.gif Ack=3128246379 Win=16384 Len=0

 10.173305 192.168.201.2 -> 192.168.14.1 BGP OPEN Message

 10.181018 192.168.201.2 -> 192.168.14.1 BGP KEEPALIVE Message

 10.306394 192.168.201.2 -> 192.168.14.1 BGP UPDATE Message

 10.309838 192.168.201.2 -> 192.168.14.1 BGP KEEPALIVE Message



#

# Frame dissector for BGP OPEN and UPDATE messages:

#



[root@callisto:#] tethereal ?i eth0 -V

Frame 14 (99 bytes on wire, 99 bytes captured)

    Arrival Time: Apr 21, 2003 16:11:54.071528000

    Time delta from previous packet: 0.004929000 seconds

    Time relative to first packet: 8.687585000 seconds

    Frame Number: 14

    Packet Length: 99 bytes

    Capture Length: 99 bytes

Ethernet II, Src: 00:00:0c:1a:a9:ab, Dst: 00:10:5a:d7:93:60

    Destination: 00:10:5a:d7:93:60 (3com_d7:93:60)

    Source: 00:00:0c:1a:a9:ab (Cisco_1a:a9:ab)

    Type: IP (0x0800)

Internet Protocol, Src Addr: 192.168.201.2 (192.168.201.2), Dst Addr: 192.168.14.1 (192

graphics/ccc.gif.168.14.1)

    Version: 4

    Header length: 20 bytes

    Differentiated Services Field: 0xc0 (DSCP 0x30: Class Selector 6; ECN: 0x00)

        1100 00.. = Differentiated Services Codepoint: Class Selector 6 (0x30)

        .... ..0. = ECN-Capable Transport (ECT): 0

        .... ...0 = ECN-CE: 0

    Total Length: 85

    Identification: 0x0002

    Flags: 0x00

        .0.. = Don't fragment: Not set

        ..0. = More fragments: Not set

    Fragment offset: 0

    Time to live: 255

    Protocol: TCP (0x06)

    Header checksum: 0x628c (correct)

    Source: 192.168.201.2 (192.168.201.2)

    Destination: 192.168.14.1 (192.168.14.1)

Transmission Control Protocol, Src Port: 11010 (11010), Dst Port: bgp (179),  Seq:

graphics/ccc.gif 1279472448, Ack: 3236382097, Len: 45

    Source port: 11010 (11010)

    Destination port: bgp (179)

    Sequence number: 1279472448

    Next sequence number: 1279472493

    Acknowledgement number: 3236382097

    Header length: 20 bytes

    Flags: 0x0018 (PSH, ACK)

        0... .... = Congestion Window Reduced (CWR): Not set

        .0.. .... = ECN-Echo: Not set

        ..0. .... = Urgent: Not set

        ...1 .... = Acknowledgment: Set

        .... 1... = Push: Set

        .... .0.. = Reset: Not set

        .... ..0. = Syn: Not set

        .... ...0 = Fin: Not set

    Window size: 16384

    Checksum: 0xbb96 (correct)

Border Gateway Protocol

    OPEN Message

        Marker: 16 bytes

        Length: 45 bytes

        Type: OPEN Message (1)

        Version: 4

        My AS: 65000

        Hold time: 180

        BGP identifier: 192.168.201.2

        Optional parameters length: 16 bytes

        Optional parameters

            Capabilities Advertisement (8 bytes)

                Parameter type: Capabilities (2)

                Parameter length: 6 bytes

                Multiprotocol extensions capability (6 bytes)

                    Capability code: Multiprotocol extensions capability (1)

                    Capability length: 4 bytes

                    Capability value

                        Address family identifier: IPv4 (1)

                        Reserved: 1 byte

                        Subsequent address family identifier: Unicast (1)

            Capabilities Advertisement (4 bytes)

                Parameter type: Capabilities (2)

                Parameter length: 2 bytes

                Route refresh capability (2 bytes)

                    Capability code: Route refresh capability (128)

                    Capability length: 0 bytes

            Capabilities Advertisement (4 bytes)

                Parameter type: Capabilities (2)

                Parameter length: 2 bytes

                Route refresh capability (2 bytes)

                    Capability code: Route refresh capability (2)

                    Capability length: 0 bytes



Frame 16 (125 bytes on wire, 125 bytes captured)

    Arrival Time: Apr 21, 2003 16:11:54.204807000

    Time delta from previous packet: 0.126977000 seconds

    Time relative to first packet: 8.820864000 seconds

    Frame Number: 16

    Packet Length: 125 bytes

    Capture Length: 125 bytes

Ethernet II, Src: 00:00:0c:1a:a9:ab, Dst: 00:10:5a:d7:93:60

    Destination: 00:10:5a:d7:93:60 (3com_d7:93:60)

    Source: 00:00:0c:1a:a9:ab (Cisco_1a:a9:ab)

    Type: IP (0x0800)

Internet Protocol, Src Addr: 192.168.201.2 (192.168.201.2), Dst Addr: 192.168.14.1 (192

graphics/ccc.gif.168.14.1)

    Version: 4

    Header length: 20 bytes

    Differentiated Services Field: 0xc0 (DSCP 0x30: Class Selector 6; ECN: 0x00)

        1100 00.. = Differentiated Services Codepoint: Class Selector 6 (0x30)

        .... ..0. = ECN-Capable Transport (ECT): 0

        .... ...0 = ECN-CE: 0

    Total Length: 111

    Identification: 0x0004

    Flags: 0x00

        .0.. = Don't fragment: Not set

        ..0. = More fragments: Not set

    Fragment offset: 0

    Time to live: 255

    Protocol: TCP (0x06)

    Header checksum: 0x6270 (correct)

    Source: 192.168.201.2 (192.168.201.2)

    Destination: 192.168.14.1 (192.168.14.1)

Transmission Control Protocol, Src Port: 11010 (11010), Dst Port: bgp (179),  Seq:

graphics/ccc.gif 1279472512, Ack: 3236382161, Len: 71

    Source port: 11010 (11010)

    Destination port: bgp (179)

    Sequence number: 1279472512

    Next sequence number: 1279472583

    Acknowledgement number: 3236382161

    Header length: 20 bytes

    Flags: 0x0018 (PSH, ACK)

        0... .... = Congestion Window Reduced (CWR): Not set

        .0.. .... = ECN-Echo: Not set

        ..0. .... = Urgent: Not set

        ...1 .... = Acknowledgment: Set

        .... 1... = Push: Set

        .... .0.. = Reset: Not set

        .... ..0. = Syn: Not set

        .... ...0 = Fin: Not set

    Window size: 16320

    Checksum: 0xe59b (correct)

Border Gateway Protocol

    UPDATE Message

        Marker: 16 bytes

        Length: 71 bytes

        Type: UPDATE Message (2)

        Unfeasible routes length: 0 bytes

        Total path attribute length: 28 bytes

        Path attributes

            ORIGIN: INCOMPLETE (4 bytes)

                Flags: 0x40 (Well-known, Transitive, Complete)

                    0... .... = Well-known

                    .1.. .... = Transitive

                    ..0. .... = Complete

                    ...0 .... = Regular length

                Type code: ORIGIN (1)

                Length: 1 byte

                Origin: INCOMPLETE (2)

            AS_PATH: empty (3 bytes)

                Flags: 0x40 (Well-known, Transitive, Complete)

                    0... .... = Well-known

                    .1.. .... = Transitive

                    ..0. .... = Complete

                    ...0 .... = Regular length

                Type code: AS_PATH (2)

                Length: 0 bytes

            NEXT_HOP: 192.168.201.2 (7 bytes)

                Flags: 0x40 (Well-known, Transitive, Complete)

                    0... .... = Well-known

                    .1.. .... = Transitive

                    ..0. .... = Complete

                    ...0 .... = Regular length

                Type code: NEXT_HOP (3)

                Length: 4 bytes

                Next hop: 192.168.201.2

            MULTI_EXIT_DISC: 0 (7 bytes)

                Flags: 0x80 (Optional, Non-transitive, Complete)

                    1... .... = Optional

                    .0.. .... = Non-transitive

                    ..0. .... = Complete

                    ...0 .... = Regular length

                Type code: MULTI_EXIT_DISC (4)

                Length: 4 bytes

                Multiple exit discriminator: 0

            LOCAL_PREF: 100 (7 bytes)

                Flags: 0x40 (Well-known, Transitive, Complete)

                    0... .... = Well-known

                    .1.. .... = Transitive

                    ..0. .... = Complete

                    ...0 .... = Regular length

                Type code: LOCAL_PREF (5)

                Length: 4 bytes

                Local preference: 100

        Network layer reachability information: 20 bytes

            192.168.7.0/24

            192.168.13.0/24

            192.168.14.0/24

            192.168.17.0/24

            192.168.201.0/24


Obviously, configuring full-meshed IBGP networks does not scale. To remedy this shortcoming, ganymed was configured as a route reflector for scar, castor, and callisto. All routers inhabit the same cluster with the BGP cluster ID 1.1.1.1. Therefore, the configuration of a cluster ID is redundant, although it is a good idea in large architectures. Example 10-9 demonstrates this setup in combination with peer groups, including statements valid for all peer-group members.

Example 10-9. IBGP Lab Improvement (Cluster ID, Ganymed as Route Reflector Server, Peer Group)

ganymed-bgpd# show running-config



Current configuration:

!

hostname ganymed-bgpd

password 8 bJFoEOB0obLL6

enable password 8 bJFoEOB0obLL6

log file /var/log/bgpd.log

service advanced-vty

service password-encryption

!

router bgp 65000

 bgp router-id 192.168.44.1

 bgp cluster-id 1.1.1.1

 redistribute connected

 neighbor INTERNAL peer-group

 neighbor INTERNAL remote-as 65000

 neighbor INTERNAL update-source lo1

 neighbor INTERNAL route-reflector-client

 neighbor INTERNAL soft-reconfiguration inbound

 neighbor 192.168.1.1 peer-group INTERNAL

 neighbor 192.168.2.7 peer-group INTERNAL

 neighbor 192.168.201.2 peer-group INTERNAL

!

access-list 1 remark vty-protection

access-list 1 permit 127.0.0.1

access-list 1 permit 192.168.1.0 0.0.0.255

!

line vty

 access-class 1

 exec-timeout 15 0

!

end



scar# show running-config

...

!

router bgp 65000

 bgp router-id 192.168.201.2

 bgp cluster-id 1.1.1.1

 bgp log-neighbor-changes

 redistribute connected

 neighbor 192.168.44.1 remote-as 65000

 neighbor 192.168.44.1 update-source Loopback0

 neighbor 192.168.44.1 soft-reconfiguration inbound

 maximum-paths 6

!

...



scar# show ip bgp neighbors

BGP neighbor is 192.168.44.1, remote AS 65000, internal link

  BGP version 4, remote router ID 192.168.44.1

  BGP state = Established, up for 00:02:42

  Last read 00:00:42, hold time is 180, keepalive interval is 60 seconds

  Neighbor capabilities:

    Route refresh: advertised and received(new)

    Address family IPv4 Unicast: advertised and received

  Received 150 messages, 5 notifications, 0 in queue

  Sent 143 messages, 0 notifications, 0 in queue

  Route refresh request: received 1, sent 0

  Default minimum time between advertisement runs is 5 seconds



 For address family: IPv4 Unicast

  BGP table version 6, neighbor version 6

  Index 3, Offset 0, Mask 0x8

  Inbound soft reconfiguration allowed

  6 accepted prefixes consume 216 bytes

  Prefix advertised 55, suppressed 0, withdrawn 0

  Number of NLRIs in the update sent: max 5, min 0



  Connections established 10; dropped 9

  Last reset 00:02:57, due to BGP Notification received, cease

Connection state is ESTAB, I/O status: 1, unread input bytes: 0

Local host: 192.168.201.2, Local port: 179

Foreign host: 192.168.44.1, Foreign port: 11513



Enqueued packets for retransmit: 0, input: 0  mis-ordered: 0 (0 bytes)



Event Timers (current time is 0x5C4870):

Timer          Starts    Wakeups            Next

Retrans             8          0             0x0

TimeWait            0          0             0x0

AckHold             8          2             0x0

SendWnd             0          0             0x0

KeepAlive           0          0             0x0

GiveUp              0          0             0x0

PmtuAger            0          0             0x0

DeadWait            0          0             0x0



iss:  465643069  snduna:  465643281  sndnxt:  465643281     sndwnd:  16616

irs: 3432198257  rcvnxt: 3432198602  rcvwnd:      16040  delrcvwnd:    344



SRTT: 197 ms, RTTO: 984 ms, RTV: 787 ms, KRTT: 0 ms

minRTT: 4 ms, maxRTT: 300 ms, ACK hold: 200 ms

Flags: passive open, nagle, gen tcbs



Datagrams (max data segment is 536 bytes):

Rcvd: 14 (out of order: 0), with data: 8, total data bytes: 344

Sent: 10 (retransmit: 0), with data: 7, total data bytes: 211



scar# show ip bgp summary

BGP router identifier 192.168.201.2, local AS number 65000

BGP table version is 6, main routing table version 6

11 network entries and 11 paths using 1463 bytes of memory

2 BGP path attribute entries using 120 bytes of memory

0 BGP route-map cache entries using 0 bytes of memory

0 BGP filter-list cache entries using 0 bytes of memory

BGP activity 65/76 prefixes, 137/126 paths, scan interval 60 secs



Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd

192.168.44.1    4 65000     151     144        6    0    0 00:03:31        6



scar# show ip bgp

BGP table version is 6, local router ID is 192.168.201.2

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

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



   Network          Next Hop            Metric LocPrf Weight Path

* i192.168.1.0      192.168.44.1             0    100      0 ?

* i192.168.2.0      192.168.44.1             0    100      0 ?

*> 192.168.7.0      0.0.0.0                  0         32768 ?

*> 192.168.13.0     0.0.0.0                  0         32768 ?

*> 192.168.14.0     0.0.0.0                  0         32768 ?

*> 192.168.17.0     0.0.0.0                  0         32768 ?

* i192.168.44.0     192.168.44.1             0    100      0 ?

* i192.168.45.0     192.168.44.1             0    100      0 ?

* i192.168.80.0     192.168.44.1             0    100      0 ?

*> 192.168.201.0    0.0.0.0                  0         32768 ?

* i211.11.117.0     192.168.44.1             0    100      0 ?


Exercise 10-1: BGP and IGP Interaction

For demonstration purposes, stop the underlying OSPF Zebra daemon ospfd. This will result in some IBGP sessions remaining in ACTIVE state because of the loss of IGP connectivity to some interfaces (especially the loopbacks).

Exercise 10-2: BGP Synchronization

Turn off IGP synchronization and experiment with the behavior within a transit AS. Develop a good understanding of potential AS traversal problems.