QoS and BGP Interaction

This topic describes the interaction between QoS and BGP.

This topic describes the interaction between QoS and BGP.

When using QPPB, the QoS feature works independently from BGP routing. BGP is only used to propagate the QoS policy.

In QBBP configurations, you specify whether to use IP precedence or the QoS group ID obtained from the source (input) address or destination (output) address entry in the route table. You can specify either the input or output address.

Cisco Express Forwarding

This topic describes CEF switching on Cisco IOS platforms.

This topic describes CEF switching on Cisco IOS platforms.

Cisco Express Forwarding

When you initialize the router for CEF, two main tables are built inside the router:

■ Forwarding Information Base (FIB), which lists all paths to all reachable networks, together with the output interface information

■ Adjacency table, which lists all required next-hops on output interfaces

To enable scalable forwarding, CEF builds a forwarding table called the FIB. Contrary to demand-switching methods, the FIB is not a small subset of the routing table. The FIB is a full extract of the routing table, with all the forwarding parameters precalculated at the time of FIB creation, and updated with any topology (routing table) changes.

The second table is the adjacency table, which contains all the Layer 2 next-hops currently being used by the router to forward traffic.

The two tables are interconnected, so that every destination network is linked to its appropriate local next-hop adjacency. Many destinations can be linked to the same next-hop adjacency, removing redundancy and increasing manageability of CEF tables. Moreover, a single destination can point to multiple next-hop adjacencies, enabling flexible traffic load balancing.

Cisco Express Forwarding Review: Standard IP Switching

Logicals Leicht Kostenlos Zum Ausdrucken

The figure shows a sequence of events when process switching and fast switching for destinations learned through BGP, as follows:

Step 7 When a BGP update is received and processed, an entry is created in the routing table.

Step 8 When the first packet arrives for this destination, the router tries to find the destination in the fast-switching cache. Because the packet is not there, process switching has to switch the packet when the process is run. The process performs a recursive lookup to find the outgoing interface. The process may possibly trigger an Address Resolution Protocol (ARP) request or find the Layer 2 address in the ARP cache. Finally, the process creates an entry in the fast-switching cache.

Step 9 All subsequent packets for the same destination are fast-switched. The switching occurs in the interrupt code (the packet is processed immediately). Fast destination lookup is performed (no recursion).

The encapsulation uses a pregenerated Layer 2 header that contains the destination as well as

Layer 2 source (MAC) address. No ARP request or ARP cache lookup is necessary.

Cisco Express Forwarding Review: CEF Switching

Routing Table Arp

The generation of entries in the FIB table is not packet-triggered, but change-triggered. When something changes in the IP routing table, the change is also reflected in the FIB table.

Because the FIB contains the complete IP switching table, the router can make definitive decisions based on the FIB. Whenever a router receives a packet that should be CEF-switched, but the destination is not in the FIB, the packet is dropped.

The FIB table is also different from other fast-switching caches in that it does not contain information about the outgoing interface and the corresponding Layer 2 header. That information is stored in a separate table—the adjacency table. The adjacency table is more or less a copy of the ARP cache, but instead of holding only the destination MAC address, the adjacency table holds the Layer 2 header (source and destination MAC address).

The figure illustrates how the CEF switching entries are built. When a route is added or changed in the main routing table (for example, learned via BGP), a new FIB entry is created, and the next hop is calculated via recursive lookups to the routing table (if necessary). The FIB entry is then linked to the next-hop adjacency entry, which provides the necessary Layer 2 information used to forward the packet on the output medium.

CEF Switching with QoS Packet Marking

In the figure, the tables are again displayed, with the difference that BGP communities being translated to IP precedence and QoS group are also inserted into the FIB table.

QPPB Configuration Tasks

This topic describes how to configure QPPB on Cisco routers.

This topic describes how to configure QPPB on Cisco routers.

When setting up a BGP policy, there are three required steps to consider:

Step 10 Create a route map to set IP precedence or QoS group. Use the route-map command to accomplish this task, as follows:

route-map <route-map name> permit 10 match community <community-list> set ip precedence <IP precedence value> set ip qos-group <qos-group #>

Step 11 Apply the route map to BGP routes that are in the BGP table. Use the table-map command to accomplish this task, as follows:

router bgp <as #> table-map <route-map name>

Step 12 Enable the required interface for packet marking. Use the bgp-policy command to accomplish this task, as follows:

interface X

bgp-policy <source | destination> ip-prec-map

This topic describes the Cisco IOS commands that are required to configure QPPB.

Setting IP Precedence or QoS Group in the IP Routing Table

router(config)#

route-map name permit seq match as-path path-list-number match ip address access-list-number match community community-list set ip precedence precedence set ip qos-group group

• Defines a route map to set IP precedence or QoS-group

• Specifies IP precedence and QoS group values in the routing table/FIB table entry

router(config-router)#

table-map route-map-name

• Specifies the route map used to set additional routing table attributes

— —- — 1

Use the route-map command to define a route map to match based on a BGP community list, BGP AS path, or access list, and to set the IP precedence or QoS group. To set the IP precedence value (and an optional IP number or IP name) in the IP header, use the set IP precedence route-map configuration command. To leave the precedence value unchanged, use the no form of this command.

set ip precedence {precedence | name]

Syntax Description

Parameter

Descri ption

precedence | name

A number or name that sets the precedence bits in the IP header. The values for the precedence argument and the corresponding name argument are listed in the table from least to most important.

The table lists the values for the precedence argument and the corresponding name argument for precedence values in the IP header. They are listed from least to most important.

Precedence

Name

0

routine

1

priority

2

immediate

3

flash

4

flash-override

5

critical

6

Internet

7

network

To set a group ID that can be used later to classify packets, use the set qos-group QoS policy map configuration command. To remove the group ID, use the no form of this command.

set qos-group group-id Syntax Description

Parameter

Description

group-id

Group ID number in the range from 0 to 99

Note To display QoS group information, use the show ip cef command.

Note To display QoS group information, use the show ip cef command.

Use the BGP table-map command to apply the route map to the BGP routing process. This will populate the corresponding BGP routes in the IP routing table and FIB with the CoS (IP precedence and/or QoS group) information. To modify metric and tag values when the IP routing table is updated with BGP learned routes, use the table-map command in address family or router configuration mode. To disable this function, use the no form of the command.

table-map map-name Syntax Description

Parameter

Description

map-name

Route map name, from the route-map command

Enable Per-Interface Packet Marking

router(config-if)#

1

bgp-policy {source | destination} ip-prec-map

• Marks packets using the IP precedence based on the packet source address or destination address.

• If both source and destination are specified on an interface, the software lookup for the destination address occurs last and the packet is re-marked based on the destination address.

router(config-if)#

bgp-policy {source | destination} ip-qos-map

]

• Marks packets using the QoS group ID based on the packet source address or destination address.

—j

After the CoS information (IP precedence or QoS group) in the IP routing table and the FIB table, you can configure CEF-based markings on the input interfaces by using the bgp-policy interface configuration command.

Using the bgp-policy interface configuration command, you can furnish the CEF-based markings based on the source or destination address of an incoming packet. Use the source option to mark packets sourced from a customer. Use the destination option to mark packets destined to a customer.

You can mark the packets with the IP precedence or QoS group value from the FIB table. Use the ip-prec-map option to mark the packets with IP precedence and use the ip-qos-map option to mark the packets with a QoS group.

Was this article helpful?

+1 0

Post a comment