This article will show you how you can configure the border gateway protocol (BGP). BGP is a protocol used to exchange routes between two different autonomous systems (AS). An AS is a set of networks/subnets under a single administration that share common routing policies. Usually, the customers are running IGPs inside their AS and BGP with their ISP. In this way, the customers know about the networks that their ISPs can reach and the ISPs are advertising the customers’ networks in the Internet. There are two different types of BGP sessions: internal and external. The internal one is established between routers inside the same AS and the external session is established between routers in different AS.

The protocol in its essence is very complicated and needs study to understand it completely.

You can start reading about it using this link from here: Border Gateway Protocol

Cisco Packet Tracer offers some limited functionality of BGP and it is very good to understand how it works at a very high level.

Regarding the simulation, you have two files:

    • configuring_bgp_init.pkt contains the initial topology. The hosts don’t have connectivity between them. However, there is connectivity between devices inside the same AS. For instance, PC_1 can reach R2.
    • configuring_bgp_final.pkt is the final configuration, showing what you should have configured. You can use this file to check your configuration.

Regarding the topology and all predefined things:

  • PC 1, R1 and R2 are part of AS 10.
  • PC 2, R3 and R4 are part of AS 100.
  • OSPF is running in AS 10 and AS 100 so that all devices inside any AS will have reachability between them. For instance, PC 1 can reach R2, but it cannot reach R3.
  • The subnets are already written on the diagram.
  • Each host has the last octet .100 and the default gateway is .1.
  • The routers on a subnet use the last octet their router number. For instance, on subnet 10.10.12.0/24, R1 is configured with 10.10.12.1 and R2 with 10.10.12.2.

Task 1 requirements

  1. On R2, configure BGP running for AS 10.
  2. On R2, specify as a BGP neighbor the IP address of R3 from the common subnet.
  3. On R2, advertise the two subnets from AS 10.
  4. On R2, change the BGP timers to have the keepalive at 10 seconds and holdtime at 30 seconds.
  5. On R2, configure OSPF to advertise all the routes that were learned from BGP.
  6. On R3, configure BGP running for AS 100.
  7. On R3, specify as BGP neighbor the IP address of R2 from the common subnet.
  8. On R3, advertise the two subnets from AS 100.
  9. On R3, change the BGP timers to have the keepalive at 10 seconds and holdtime at 30 seconds.
  10. On R3, configure OSPF to advertise all the routes that were learned from BGP.

Task 1 verification

  1. On R2 and R3, use the command “show ip bgp summary” to confirm that the BGP sessions is established. You should get output similar to this:
    R2#show ip bgp summary
    BGP router identifier 172.16.1.2, local AS number 10
    BGP table version is 15, main routing table version 6
    4 network entries using 528 bytes of memory
    4 path entries using 208 bytes of memory
    2/2 BGP path/bestpath attribute entries using 368 bytes of memory
    2 BGP AS-PATH entries using 48 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
    Bitfield cache entries: current 1 (at peak 1) using 32 bytes of memory
    BGP using 1184 total bytes of memory
    BGP activity 4/0 prefixes, 4/0 paths, scan interval 60 secs
    Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd172.16.1.3 4 100 627 626 15 0 0 01:26:30 4
    R2#
  2. On R2 and R3, use the command “show ip route bgp” to check if there are any BGP routes in the routing table. You should get output similar to this:
    R2#show ip route bgp
    B 10.100.20.0 [20/0] via 172.16.1.3, 03:13:56
    B 10.100.34.0 [20/0] via 172.16.1.3, 03:13:56
    R2#
  3. On R1 and R4, use the command “show ip route” to confirm that the subnets from remote AS are learned as OSPF external routes. You should get output similar to this:
    Gateway of last resort is not set
    10.0.0.0/24 is subnetted, 4 subnets
    C 10.10.10.0 is directly connected, FastEthernet0/0
    C 10.10.12.0 is directly connected, FastEthernet0/1
    O E2 10.100.20.0 [110/20] via 10.10.12.2, 01:28:58, FastEthernet0/1
    O E2 10.100.34.0 [110/20] via 10.10.12.2, 01:28:58, FastEthernet0/1
    R1#
  4. On PC 1, from the Desktop tab, choose “Command Prompt” and start a traceroute to PC 2. You should get a similar output confirming that there is reachability between the two hosts:
    PC>tracert 10.100.20.100
    Tracing route to 10.100.20.100 over a maximum of 30 hops:
    1 1 ms 0 ms 0 ms 10.10.10.1
    2 0 ms 0 ms 0 ms 10.10.12.2
    3 0 ms 1 ms 0 ms 172.16.1.3
    4 0 ms 0 ms 0 ms 10.100.34.4
    5 0 ms 0 ms 0 ms 10.100.20.100
    Trace complete.
    PC>
    Task 1 hints
  5. On R2, use the command “router bgp 10” to configure BGP on AS 10.
  6. On R2, use the command “neighbor 172.16.1.3 remote-as 100” to configure R3 as an external neighbor.
  7. On R2, use the commands “network 10.10.12.0 mask 255.255.255.0” and “network 10.10.10.0 mask 255.255.255.0” to advertise the internal subnets of AS 10 through BGP.
  8. On R2, use the command “timers bgp 10 30” to change the timers.
  9. On R2, use the command “redistribute bgp 10 subnets” under OSPF protocol configuration to advertise all the routes learned through BGP into OSPF.
  10. On R3, use the command “router bgp 100” to configure BGP on AS 100.
  11. On R3, use the command “neighbor 172.16.1.2 remote-as 10” to configure R2 as external neighbor.
  12. On R3, use the commands “network 10.100.34.0 mask 255.255.255.0” and “network 10.100.20.0 mask 255.255.255.0” to advertise the internal subnets of AS 100 through BGP.
  13. On R3, use the command “timers bgp 10 30” to change the timers.
  14. On R3, use the command “redistribute bgp 10 subnets” under the OSPF protocol configuration to advertise all the routes learned through BGP into OSPF.

As you can see, BGP seems simple to configure. Actually, it is if you are looking for its basic features, which are the ones that Packet Tracer supports and the ones needed to get a feeling of what BGP is and how it can help you.