Beruflich Dokumente
Kultur Dokumente
BCMSN v3.02-1
BCMSN v3.02-2
BCMSN v3.02-3
BCMSN v3.02-4
BCMSN v3.02-5
BCMSN v3.02-6
The most recent and preferred Cisco IOS platform switching mechanism is
CEF, which incorporates the best of the previous switching mechanisms.
One of the benefits of CEF is that this mechanism supports per-packet load
balancing, which was previously supported only by process switching.
CEF also supports per-source or per-destination load balancing, fast
destination lookup, and many other features that are not supported by other
switching mechanisms.
CEF uses a Forwarding Information Base (FIB) to make IP destination
prefix-based switching decisions. The FIB is conceptually similar to a
routing table or information base.
When routing or topology changes occur in the network, the IP routing
table is updated, and those changes are reflected in the FIB. The FIB
maintains next-hop address information based on the information in the IP
routing table.
BCMSN v3.02-7
BCMSN v3.02-8
BCMSN v3.02-9
BCMSN v3.02-10
BCMSN v3.02-11
BCMSN v3.02-12
BCMSN v3.02-13
BCMSN v3.02-14
BCMSN v3.02-15
BCMSN v3.02-16
MPLS simply inserts or imposes a 32-bit label between the Layer 2 and
Layer 3 headers (frame mode MPLS).
MPLS labels have a specific format and fields that assist in making
BCMSN v3.02-17
BCMSN v3.02-18
BCMSN v3.02-19
Label Stack
There are some instances where more than one label is used:
MPLS VPNs
MPLS Traffic Engineering (MPLS TE)
MPLS VPNs combined with MPLS TE:
BCMSN v3.02-20
The control plane also requires label exchange protocols, including the
MPLS LDP and BGP, which is used by MPLS VPN. MPLS Traffic Engineering
uses RSVP to reserve resources, or bandwidth, in the network.
2006 Cisco Systems, Inc. All rights reserved.
BCMSN v3.02-21
BCMSN v3.02-22
The data plane then forwards all packets with label 24 through
the appropriate interfaces after swapping label 24 for label 17.
BCMSN v3.02-23
Routers that have all interfaces enabled for MPLS are called LSRs
because they mostly forward labeled packets.
Routers that have some interfaces that are not enabled for MPLS are
usually at the edge of an MPLS domainautonomous systems (ASs).
BCMSN v3.02-24
BCMSN v3.02-25
BCMSN v3.02-26
BCMSN v3.02-27
BCMSN v3.02-28
BCMSN v3.02-29
BCMSN v3.02-30
BCMSN v3.02-31
BCMSN v3.02-32
BCMSN v3.02-33
Step 4
Every LSR builds its LIB, LFIB, and FIB data structures based on
received labels.
These data structures contain label information:
The LIB, in the control plane, is the database that LDP uses. This database is
where an IP prefix is assigned a locally significant label that is mapped to a
next-hop label that has been learned from a downstream neighbor.
The LFIB, in the data plane, is the database used to forward labeled packets.
Local labels, previously advertised to upstream neighbors, are mapped to
next-hop labels, previously received from downstream neighbors.
The FIB, in the data plane, is the database used to forward unlabeled IP
packets. A forwarded packet is labeled if a next-hop label is available for a
specific destination IP network. Otherwise, a forwarded packet is not
labeled.
BCMSN v3.02-34
BCMSN v3.02-35
BCMSN v3.02-36
BCMSN v3.02-37
BCMSN v3.02-38
Label Allocation
Figure shows how all routers learn about a network (Network X in this
example) via an IGP, such as OSPF, IS-IS, or EIGRP. However, at this
time, a next-hop label is not available, which means that all packets are
forwarded in the traditional way as unlabeled packets.
Allocating Labels
Routers generate labels regardless of other routers in the network
(called asynchronous allocation of labels) as shown in Figure .
Router B generates a locally significant and locally unique label (for
this example label 25), and assigns the label to IP Network X.
Note
Labels 0 to 15 are reserved.
BCMSN v3.02-39
BCMSN v3.02-40
The LDP in the control plane exchanges labels and stores them in the LIB.
BCMSN v3.02-41
BCMSN v3.02-42
BCMSN v3.02-43
BCMSN v3.02-44
BCMSN v3.02-45
BCMSN v3.02-46
Step 4
Router B must remove the label because LSR B has
not yet received any next-hop label (the action in the
LFIB is untagged).
Step 5
Router B then forwards the packet as a standard IP
packet.
BCMSN v3.02-47
BCMSN v3.02-48
BCMSN v3.02-49
BCMSN v3.02-50
BCMSN v3.02-51
The LFIB table is populated by indicating the action that should occur
when forwarding the packet based on labels. This action might be to:
swap a label
remove the label (un-tag)
add an outgoing label
to pop the label
The LDP adds labels into the FIB and LFIB tables. Only those labels
that come from the next-hop router are inserted into the outgoing field
in the LFIB table.
BCMSN v3.02-52
BCMSN v3.02-53
BCMSN v3.02-54
BCMSN v3.02-55
Step 5
Router B forwards the packet to Router C (label switching by using the
LFIB table).
Step 6
Router C removes (pops) the label.
Step 7
Router C forwards the unlabeled packet to Router D (label removed by
using the LFIB table).
When a router receives an IP packet, the lookup done is an IP lookup. In
Cisco IOS, this means that the packet is looked up in the CEF table.
The router knows that it receives a labeled packet or an IP packet by
looking at the protocol field in the Layer 2 header.
2006 Cisco Systems, Inc. All rights reserved.
BCMSN v3.02-56
BCMSN v3.02-57
When the downstream router realizes that the router is the final
node in the label switched path (LSP), the router can distribute
the label value of 3 to the upstream router at the time the path is
established.
Note
A pop label is encoded with a value of 3 for LDP. This label
instructs upstream routers to remove the label instead of
swapping the label with label 3.
BCMSN v3.02-58
BCMSN v3.02-59
BCMSN v3.02-60
BCMSN v3.02-61
BCMSN v3.02-62
BCMSN v3.02-63
BCMSN v3.02-64
BCMSN v3.02-65
BCMSN v3.02-66
BCMSN v3.02-67
BCMSN v3.02-68
BCMSN v3.02-69
BCMSN v3.02-70
BCMSN v3.02-71
BCMSN v3.02-72
BCMSN v3.02-73
BCMSN v3.02-74
BCMSN v3.02-75
BCMSN v3.02-76
BCMSN v3.02-77
BCMSN v3.02-78
BCMSN v3.02-79
BCMSN v3.02-80
BCMSN v3.02-81
BCMSN v3.02-82
BCMSN v3.02-83
BCMSN v3.02-84
BCMSN v3.02-85
BCMSN v3.02-86
BCMSN v3.02-87
BCMSN v3.02-88
BCMSN v3.02-89
Step 4
The receiving PE routers strip the RD from the VPNv4
prefix, resulting in an IPv4 prefix.
Step 5
The IPv4 prefix is forwarded to other CE routers
within an IPv4 routing update.
BCMSN v3.02-90
BCMSN v3.02-91
BCMSN v3.02-92
BCMSN v3.02-93
Five customer sites that are communicating within three VPNs. The
VPNs can communicate with the following sites:
VPN1 with Sites 2 and 4
VPN2 with Sites 1, 3, and 4
VPN3 with Sites 1,3, and 5
A given site can be a member of multiple VPNs. However, a site can only
associate with one VRF
At this point, you may ask that since there is no one-to-one mapping
between VPN and VRF, how does the router know which routes need to
be inserted into which VRF?
The introduction of another concept in the MPLS/VPN architecture, the
route target, solves this dilemma.
BCMSN v3.02-94
Every VPN route is tagged with one or more route targets when it is
exported from a VRF (to be offered to other VRFs).
The distribution of VPN routing information is controlled using VPN
route target communities, implemented by BGP extended communities.
BCMSN v3.02-95
For example, if the import list for a particular VRF includes route
target communities A, B, and C, then any VPN route that carries
any of those route target extended communitiesA, B, or Cis
imported into the VRF.
.
BCMSN v3.02-96
BCMSN v3.02-97
BCMSN v3.02-98
BCMSN v3.02-99
BCMSN v3.02-100
P Router Perspective
The P routers do not participate in MPLS VPN routing and do not carry
VPN routes.
The P routers run only a backbone Interior Gateway Protocol (IGP) with
other P routers and with PE routers and exchange information about
core subnetworks and loopbacks.
BCMSN v3.02-101
PE Router Perspective
The PE routers are the only routers in MPLS VPN architecture that see
all routing aspects of the MPLS VPN.
PE routers are able to exchange three routes:
IPv4 VPN routes with CE routers via various routing protocols
running in the VRF tables of the PE.Static routing can also be used
between the CE and PE.
VPNv4 routes via MPBGP sessions with other PE routers
Core routes with P routers and other PE routers via core IGP
BCMSN v3.02-102
BCMSN v3.02-103
Step 4
The VPNv4 routes that are installed in the VRF tables are converted to
IPv4 routes and then propagated to the CE routers.The CE routers, PE
routers, and P routers have specific requirements for end-to-end
routing information flow.
BCMSN v3.02-104
BCMSN v3.02-105
BCMSN v3.02-106
BCMSN v3.02-107
BCMSN v3.02-108
BCMSN v3.02-109
BCMSN v3.02-110
BCMSN v3.02-111
BCMSN v3.02-112
When using the label stack, the ingress PE router labels the incoming
IP packet with two labels:
The top label in the stack is the LDP label for normal frame forwarding
in the MPLS network. This label guarantees that the packet will
traverse the MPLS VPN backbone and arrive at the egress PE router.
The second label point to a VRF table. For this case, the egress PE
router first performs a label lookup to find the target VRF table and
then performs an IP lookup within the VRF table.
BCMSN v3.02-113
BCMSN v3.02-114
BCMSN v3.02-115
BCMSN v3.02-116