Lab Objective:
The focus of this lab is to understand MP-BGP implementation and configuration in Cisco IOS routers. Additional technologies include path control, attribute manipulation and filtering.
Lab Topology:
The lab network topology is illustrated below:
|
IMPORTANT NOTE If you are using the www.howtonetwork.net racks, please bring up the LAN interfaces connected to the routers by issuing the no shutdown command on the connected switches. If you are using a home lab with no interface fastethernet 0/0 Alternately, you can simply connect the interfaces to a hub or switch if you have one available in your own lab. |
Task 1
Configure hostnames and IPv6 addressing on all routers as illustrated in the network topology.
Task 2
Configure MP-BGP on R1. This router will reside in AS 1 and will peer with R2 and R3. Use the global Unicast IPv6 addresses for peering.
Task 3
Configure MP-BGP on R2, R3, and R4. R2 and R3 will peer with R1. R2 will peer with R1 and R3. R3 will peer with R1, R2, and R4. R4 will peer only with R3. Use the global Unicast IPv6 addresses for peering. Verify your configuration.
Task 4
Advertise the 3ffe:abcd:1111:1/64 prefix connected to R1 using MP-BGP. This prefix should have an ORIGIN code of IGP and should be assigned the community 123:1. Verify your configuration using the appropriate commands.
Task 5
Advertise the 3ffe:abcd:1111:2/64 prefix as well as the 3ffe:abcd:1111:4/64 prefix connected to the LAN interfaces of R2 and R4, respectively, via MP-BGP. Ensure that R2 and R4 can ping each other LAN to LAN following this configuration. You are NOT allowed to configure R3 as a route-reflector, or use confederations. Instead, use BGP default routing. However, ensure that a default route is NEVER advertised to AS 123. Do NOT use any type of filters to complete this task. Verify your configuration.
Task 6
In the future, AS 123 will be advertising thousands of prefixes to AS 456. Configure AS 456 so that R2 prefers the path via R3 to reach all prefixes originated in AS 123 only.
The direct path to AS 123 via R2 should only be used in the event that the R2-R3 link is down. As 123 should therefore also prefer the R1-R3 for all traffic destined to AS 456.
This configuration should have no impact on any other router in the network and should be implemented on R3 and R1. Verify your configuration using the appropriate commands.
If you have completed all previous requirements correctly, R1, R2 and R4 will be able to ping each other LAN-to-LAN. Verify this using extended pings.
Lab Validation
Task 1
| Router(config)#hostname R1 R1(config)#ipv6 unicast-routing R1(config)#ipv6 cef R1(config)#interface fastethernet 0/0 R1(config-if)#ipv6 address 3ffe:abcd:1111:1::1/64 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#interface serial 0/0 R1(config-if)#ipv6 address 2001:abcd:1111:1::1/64 R1(config-if)#clock rate 2000000 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#interface serial 0/1 R1(config-if)#ipv6 address 2001:abcd:1111:2::1/64 R1(config-if)#no shutdown R1(config-if)#exit |
| Router(config)#hostname R2 R2(config)#ipv6 unicast-routing R2(config)#ipv6 cef R2(config)#interface fastethernet 0/0 R2(config-if)#ipv6 address 3ffe:abcd:1111:2::2/64 R2(config-if)#no shutdown R2(config)#interface serial 0/0 R2(config-if)#ipv6 address 2001:abcd:1111:1::2/64 R2(config-if)#no shutdown R2(config-if)#exit R2(config)#interface serial 0/1 R2(config-if)#ipv6 address 2001:abcd:1111:3::2/64 R2(config-if)#no shutdown R2(config-if)#exit |
| Router(config)#hostname R3 R3(config)#ipv6 unicast-routing R3(config)#ipv6 cef R3(config)#interface serial 1/0 R3(config-if)#ipv6 address 2001:abcd:1111:2::3/64 R3(config-if)#clock rate 128000 R3(config-if)#no shutdown R3(config-if)#exit R3(config)#interface serial 1/1 R3(config-if)#ipv6 address 2001:abcd:1111:3::3/64 R3(config-if)#clock rate 128000 R3(config-if)#no shutdown R3(config-if)#exit R3(config)#interface serial 1/2 R3(config-if)#ipv6 address 2001:abcd:1111:4::3/64 R3(config-if)#clock rate 128000 R3(config-if)#no shutdown R3(config-if)#exit |
| Router(config)#hostname R4 R4(config)#ipv6 unicast-routing R4(config)#ipv6 cef R3(config)#interface fastethernet 0/0 R3(config-if)#ipv6 address 3ffe:abcd:1111:4::4/64 R3(config-if)#no shutdown R3(config-if)#exit R4(config)#interface serial 0/0 R4(config-if)#ipv6 address 2001:abcd:1111:4::4/64 R4(config-if)#clock rate 128000 R4(config-if)#no shutdown R4(config-if)#exit |
Task 2
| R1(config)#router bgp 123 R1(config-router)#bgp router-id 1.1.1.1 R1(config-router)#address-family ipv6 unicast R1(config-router-af)#neighbor 2001:abcd:1111:1::2 remote-as 456 R1(config-router-af)#neighbor 2001:abcd:1111:2::3 remote-as 456 R1(config-router-af)#exit R1(config-router)#exit |
Task 3
| R2(config)#router bgp 456 R2(config-router)#bgp router-id 2.2.2.2 R2(config-router)#address-family ipv6 unicast R2(config-router-af)#neighbor 2001:abcd:1111:1::1 remote-as 123 R2(config-router-af)#neighbor 2001:abcd:1111:3::3 remote-as 456 R2(config-router-af)#exit R2(config-router)#exit |
| R3(config)#router bgp 456 R3(config-router)#bgp router-id 3.3.3.3 R3(config-router)#address-family ipv6 unicast R3(config-router-af)#neighbor 2001:abcd:1111:2::1 remote-as 123 R3(config-router-af)#neighbor 2001:abcd:1111:3::2 remote-as 456 R3(config-router-af)#neighbor 2001:abcd:1111:4::4 remote-as 456 R3(config-router-af)#exit R3(config-router)#exit |
| R4(config)#router bgp 456 R4(config-router)#bgp router-id 4.4.4.4 R4(config-router)#address-family ipv6 unicast R4(config-router-af)#neighbor 2001:abcd:1111:4::3 remote-as 456 R4(config-router-af)#exit R4(config-router)#exit |
Verify your configuration using the show bgp ipv6 unicast summary command on all MP-BGP speakers.
| R1#show bgp ipv6 unicast summary BGP router identifier 1.1.1.1, local AS number 123 BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd |
| R2#show bgp ipv6 unicast summary BGP router identifier 2.2.2.2, local AS number 456 BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd |
| R3#show bgp ipv6 unicast summary BGP router identifier 3.3.3.3, local AS number 456 BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd |
| R4#show bgp ipv6 unicast summary BGP router identifier 4.4.4.4, local AS number 456 BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd |
Task 4
By default, all prefixes injected into MP-BGP using the network statement will be assigned an ORIGIN code of IGP. To complete the second requirement of this task, we need to use a route-map to assign this prefix the specified COMMUNITY attribute. In addition to this, we need to configure MP-BGP so that this attribute is included in updates to peers:
| R1(config)#route-map COMMUNITY permit 10 R1(config-route-map)#set community 123:1 R1(config-route-map)#exit R1(config)#ip bgp-community new-format R1(config)#router bgp 123 R1(config-router)#address-family ipv6 unicast R1(config-router-af)#network 3FFE:abcd:1111:1::/64 route-map COMMUNITY R1(config-router-af)#neighbor 2001:ABCD:1111:1::2 send-community standard R1(config-router-af)#neighbor 2001:ABCD:1111:2::3 send-community standard R1(config-router-af)#exit R1(config-router)#exit |
NOTE: The ip bgp-community new-format command is required to display a configured COMMUNITY value in ASN:nn notation. The Cisco default community format is one 32-bit number. The ip bgp-community new-format command changes the community format to AA:NN to conform to RFC 1997.
If this command is issued, the configured COMMUNITY would be displayed as follows:
| R1#show bgp ipv6 unicast 3FFE:abcd:1111:1::/64 BGP routing table entry for 3FFE:ABCD:1111:1::/64, version 3 Paths: (1 available, best #1, table Global-IPv6-Table) Advertised to update-groups: 1 Local :: from 0.0.0.0 (1.1.1.1) Origin IGP, metric 0, localpref 100, weight 32768, valid, sourced, local, best Community: 8060929 |
However, with this command enabled, the COMMUNITY is displayed in RFC 1997 format:
| R1#show bgp ipv6 unicast 3FFE:abcd:1111:1::/64 BGP routing table entry for 3FFE:ABCD:1111:1::/64, version 3 Paths: (1 available, best #1, table Global-IPv6-Table) Advertised to update-groups: 1 Local :: from 0.0.0.0 (1.1.1.1) Origin IGP, metric 0, localpref 100, weight 32768, valid, sourced, local, best Community: 123:1 |
To complete this task, we also therefore need to issue this command on R2, R3, and R4. Also, we need to ensure that the COMMUNITY attribute is sent to all internal MP-BGP peers. In other words, this attribute should be included in updates from R2 to R3, and in updates from R3 to R2 and R4. Since R4 is not receiving and advertising any prefixes with this attribute, it does not need to include it in updates sent to R3. This part of the task is completed as follows:
| R2(config)#router bgp 456 R2(config-router)#address-family ipv6 unicast R2(config-router-af)#neighbor 2001:abcd:1111:3::3 send-community standard R2(config-router-af)#exit R2(config-router)#exit R2(config)#ip bgp-community new-format R2(config)#exit |
| R3(config)#router bgp 456 R3(config-router)#address-family ipv6 unicast R3(config-router-af)#neighbor 2001:abcd:1111:3::2 send-community standard R3(config-router-af)#neighbor 2001:abcd:1111:4::4 send-community standard R3(config-router-af)#exit R3(config-router)#exit R3(config)#ip bgp-community new-format R3(config)#exit |
| R4(config)#ip bgp-community new-format |
Finally, verify that the prefix is received by R2 and R4 with the assigned COMMUNITY:
| R2#show bgp ipv6 unicast 3FFE:abcd:1111:1::/64 BGP routing table entry for 3FFE:ABCD:1111:1::/64, version 4 Paths: (2 available, best #2, table Global-IPv6-Table) Advertised to update-groups: 2 123 2001:ABCD:1111:2::1 (inaccessible) from 2001:ABCD:1111:3::3 (3.3.3.3) Origin IGP, metric 0, localpref 100, valid, internal Community: 123:1 123 2001:ABCD:1111:1::1 (FE80::20F:23FF:FE5E:EC80) from 2001:ABCD:1111:1::1 (1.1.1.1) Origin IGP, metric 0, localpref 100, valid, external, best Community: 123:1 |
| R3#show bgp ipv6 unicast 3FFE:abcd:1111:1::/64 BGP routing table entry for 3FFE:ABCD:1111:1::/64, version 4 Paths: (2 available, best #2, table Global-IPv6-Table) Advertised to update-groups: 2 123 2001:ABCD:1111:1::1 (inaccessible) from 2001:ABCD:1111:3::2 (2.2.2.2) Origin IGP, metric 0, localpref 100, valid, internal Community: 123:1 123 2001:ABCD:1111:2::1 (FE80::20F:23FF:FE5E:EC80) from 2001:ABCD:1111:2::1 (1.1.1.1) Origin IGP, metric 0, localpref 100, valid, external, best Community: 123:1 |
| R4#show bgp ipv6 unicast 3FFE:abcd:1111:1::/64 BGP routing table entry for 3FFE:ABCD:1111:1::/64, version 0 Paths: (1 available, no best path) Not advertised to any peer 123 2001:ABCD:1111:2::1 (inaccessible) from 2001:ABCD:1111:4::3 (3.3.3.3) Origin IGP, metric 0, localpref 100, valid, internal Community: 123:1 |
Task 5
The requirements of this task are two-fold. First, we need to advertise the LAN subnets that are connected to R2 and R4 via MP-BGP. This first part is completed as follows:
| R2(config)#router bgp 456 R2(config-router)#address-family ipv6 unicast R2(config-router-af)#network 3ffe:abcd:1111:2::/64 R2(config-router-af)#exit R2(config-router)#exit |
| R4(config)#router bgp 456 R4(config-router)#address-family ipv6 unicast R4(config-router-af)#network 3ffe:abcd:1111:4::/64 R4(config-router-af)#exit R4(config-router)#exit |
Verify your configuration using the show bgp ipv6 unicast command on R2 and R4:
| R2#show bgp ipv6 unicast 3ffe:abcd:1111:2::/64 BGP routing table entry for 3FFE:ABCD:1111:2::/64, version 5 Paths: (1 available, best #1, table Global-IPv6-Table) Advertised to update-groups: 1 2 Local :: from 0.0.0.0 (2.2.2.2) Origin IGP, metric 0, localpref 100, weight 32768, valid, sourced, local, best |
| R4#show bgp ipv6 unicast 3ffe:abcd:1111:4::/64 BGP routing table entry for 3FFE:ABCD:1111:4::/64, version 2 Paths: (1 available, best #1, table Global-IPv6-Table) Advertised to update-groups: 1 Local :: from 0.0.0.0 (4.4.4.4) Origin IGP, metric 0, localpref 100, weight 32768, valid, sourced, local, best |
The second part of this task requires some thought. In a typical BGP implementation, router R3 would be configured as a route reflector, allowing these prefixes to be advertised to its clients R2 and R4; however the task states that this is forbidden. To complete this task, we need to use BGP default routing as stated. However, to ensure that the default route is not advertised to AS 123, we need to use the COMMUNITY attribute (LOCAL_AS or NO_EXPORT) since we are forbidden from using any types of filters. The second part of this task is completed as follows:
| R3(config)#route-map LOCAL permit 10 R3(config-route-map)#set community local-AS R3(config-route-map)#exit R3(config)#router bgp 456 R3(config-router)#address-family ipv6 unicast R3(config-router-af)#$01:abcd:1111:3::2 default-originate route-map LOCAL R3(config-router-af)#neighbor 2001:abcd:1111:4::4 default-originate R3(config-router-af)#exit |
Following this configuration, verify the default routes received by R2 and R4:
| R2#show bgp ipv6 unicast ::/0 BGP routing table entry for ::/0, version 7 Paths: (1 available, best #1, table Global-IPv6-Table, not advertised outside local AS) Flag: 0x880 Not advertised to any peer Local 2001:ABCD:1111:3::3 from 2001:ABCD:1111:3::3 (3.3.3.3) Origin IGP, metric 0, localpref 100, valid, internal, best Community: local-AS |
NOTE: You do NOT have to specify the NO_EXPORT or LOCAL_AS for the default route that is advertised to R4 because this BGP speaker is not peered with AS 123.
| R4#show bgp ipv6 unicast ::/0 BGP routing table entry for ::/0, version 6 Paths: (1 available, best #1, table Global-IPv6-Table) Not advertised to any peer Local 2001:ABCD:1111:4::3 from 2001:ABCD:1111:4::3 (3.3.3.3) Origin IGP, metric 0, localpref 100, valid, internal, best |
Finally, complete this task by ensuring that R2 and R4 can ping each other LAN to LAN:
| R2#ping 3FFE:ABCD:1111:4::4 source fastethernet 0/0 repeat 10 size 1500
Type escape sequence to abort. |
| R4#ping 3FFE:ABCD:1111:2::2 source fastethernet 0/0 repeat 10 size 1500
Type escape sequence to abort. |
Task 6
To complete this task, you can use the LOCAL_PREF attributes on R3 so that it sends updates for prefixes originated in AS 123 with a higher value than the default LOCAL_PREF value. Because there will be a lot of prefixes from AS 123, use an AS_PATH filter on R3. This task is completed by implementing the following configuration on R3:
| R3(config)#ip as-path access-list 1 permit ^123$ R3(config)#route-map PREF permit 10 R3(config-route-map)#match as-path 1 R3(config-route-map)#set local-preference 200 R3(config-route-map)#exit R3(config-router)#route-map PREF permit 20 R3(config-route-map)#exit R3(config)#router bgp 456 R3(config-router)#address-family ipv6 R3(config-router-af)#neighbor 2001:abcd:1111:3::2 route-map PREF out R3(config-router-af)#exit R3(config-router)#exit |
Following this configuration, the MP-BGP RIB shows the following entry for the R1 prefix:
| R2#show bgp ipv6 unicast 3FFE:ABCD:1111:1::/64 BGP routing table entry for 3FFE:ABCD:1111:1::/64, version 8 Paths: (2 available, best #1, table Global-IPv6-Table) Advertised to update-groups: 1 123 2001:ABCD:1111:2::1 from 2001:ABCD:1111:3::3 (3.3.3.3) Origin IGP, metric 0, localpref 200, valid, internal, best Community: 123:1 123 2001:ABCD:1111:1::1 (FE80::20F:23FF:FE5E:EC80) from 2001:ABCD:1111:1::1 (1.1.1.1) Origin IGP, metric 0, localpref 100, valid, external Community: 123:1 |
To complete the second part of this task, you can use either LOCAL_PREF or WEIGHT to ensure that R1 prefers the path via R3 for all prefixes originated in AS 456:
| R1(config)#ip as-path access-list 1 permit ^456$ R1(config)#route-map WEIGHT permit 10 R1(config-route-map)#match as-path 1 R1(config-route-map)#set weight 1 R1(config-route-map)#exit R1(config)#route-map WEIGHT permit 20 R1(config-route-map)#exit R1(config)#router bgp 123 R1(config-router)#address-family ipv6 R1(config-router-af)#neighbor 2001:ABCD:1111:2::3 route-map WEIGHT in R1(config-router-af)#exit R1(config-router)#exit |
Following this configuration, the MP-BGP RIB shows the following entry for the R2 prefix:
| R1#show bgp ipv6 unicast 3FFE:ABCD:1111:2::/64 BGP routing table entry for 3FFE:ABCD:1111:2::/64, version 10 Paths: (2 available, best #1, table Global-IPv6-Table) Flag: 0x840 Advertised to update-groups: 1 456 2001:ABCD:1111:2::3 (FE80::213:7FFF:FEAF:3E00) from 2001:ABCD:1111:2::3 (3.3.3.3) Origin IGP, localpref 100, weight 1, valid, external, best 456 2001:ABCD:1111:1::2 (FE80::20D:28FF:FE9E:F940) from 2001:ABCD:1111:1::2 (2.2.2.2) Origin IGP, metric 0, localpref 100, valid, external |
Finally, verify your configurations using extended pings LAN-to-LAN between R1, R2, and R4:
| R1#ping 3FFE:ABCD:1111:2::2 source fastethernet 0/0 repeat 10 size 1500
Type escape sequence to abort. R1#ping 3FFE:ABCD:1111:4::4 source fastethernet 0/0 repeat 10 size 1500 Type escape sequence to abort. |
| R2#ping 3FFE:ABCD:1111:1::1 source fastethernet 0/0 repeat 10 size 1500
Type escape sequence to abort. |
| R4#ping 3FFE:ABCD:1111:1::1 source fastethernet 0/0 repeat 10 size 1500
Type escape sequence to abort. |
Final Router Configurations
R1
|
R1#term len 0 Current configuration : 1703 bytes R1# |
R2
|
R2#term len 0 Current configuration : 1386 bytes R2# |
R3
|
R3#term len 0 Current configuration : 2297 bytes R3# |
R4
|
R4#term len 0 Current configuration : 1187 bytes R4# |
