Thursday, August 5, 2010

MPLS Label Distribution Modes

In an MPLS domain running LDP, a label is assigned to a destination prefix found in the FIB, and it is distributed to upstream neighbors in the MPLS domain after session establishment. The labels that are of local significance on the router are exchanged with adjacent LSRs during label distribution. Label binding of a specific prefix to a local label and a next-hop label (received from downstream LSR) is then stored in the LFIB and LIB structures. The label distribution methods used in MPLS are as follows:


Downstream on demand : -This mode of label distribution allows an LSR to explicitly request from its downstream next-hop router a label mapping to a particular destination prefix and is thus known as downstream on demand label distribution.


Unsolicited downstream : - This mode of label distribution allows an LSR to distribute bindings to upstream LSRs that have not explicitly requested them and is referred to as unsolicited downstream label distribution.


Depicts the two modes of label distribution between R1 (Edge LSR) and R2 (LSR). In the downstream-on-demand distribution process, LSR R2 requests a label for the destination 172.16.10.0. R1 replies with a label mapping of label 17 for 172.16.10.0. In the unsolicited downstream distribution process, R1 does not wait for a request for a label mapping for prefix 172.16.10.0 but sends the label mapping information to the upstream LSR R2




Forwarding Equivalence Class in MPLS

Forwarding Equivalence Class (FEC) : - As noted in RFC 3031(MPLS architecture), this group of packets are forwarded in the same manner (over the same path with the same forwarding treatment).

In MPLS Domain FEC will not perform on every HOP, It will perform only on Ingress & Egress router in MPLS domain.

But in traditional IP network FEC will perform on every HOP that comes between source & destination.

The LER is the place where aggregation is completed. LER is responsible for classifying incoming packets and relating them to FECs. Each FEC is associated with an appropriate label and forwarding path. LER uses several modes to classify traffic. For example, using the packet destination adress and port as is indicated in the following table:




When packets leave the LER to go into the MPLS domain they will be forwarded using LSRs. To do this, the LSR looks just for labels on the MPLS packet and matches it with labels within its forwarding table. This forwarding table is called the Label Information Base (LIB). The LSR will push, pop or swap labels and forward packets according with LIB instructions. One representation of such a table is as follows:




Finally when the packet reaches again another LER to leave the MPLS domain, the LER removes the MPLS header and forward the packet to an IP network.





LDP Session Establishment

There are four categories of LDP messages

1] Discovery messages : - Announce and sustain an LSR's presence in the network
2] Session messages : - Establish, upkeep, and tear down sessions between LSRs
3] Advertisement messages : - Advertise label mappings to FECs
4] Notification messages : - Signal errors

All LDP messages follow the type, length, value (TLV) format. LDP uses TCP port 646, and the LSR with the higher LDP router ID opens a connection to port 646 of another LSR:


1] LDP sessions are initiated when an LSR sends periodic hellos (using UDP multicast on 224.0.0.2) on interfaces enabled for MPLS forwarding. If another LSR is connected to that interface (and the interface enabled for MPLS), the directly connected LSR attempts to establish a session with the source of the LDP hello messages. The LSR with the higher LDP router ID is the active LSR. The active LSR attempts to open a TCP connection with the passive LSR (LSR with a lower router ID) on TCP port 646 (LDP).


2] The active LSR then sends an initialization message to the passive LSR, which contains information such as the session keepalive time, label distribution method, max PDU length, and receiver's LDP ID, and if loop detection is enabled.


3] The passive LDP LSR responds with an initialization message if the parameters are acceptable. If parameters are not acceptable, the passive LDP LSR sends an error notification message.

4] Passive LSR sends keepalive message to the active LSR after sending an initialization message.

5] The active LSR sends keepalive to the passive LDP LSR, and the LDP session comes up. At this juncture, label-FEC mappings can be exchanged between the LSRs

Special Outgoing Label Types

  • Untagged : -- The incoming MPLS packet is converted to an IP packet and forwarded to the destination (MPLS to IP Domain transition). This is used in the implementation of MPLS VPN

  • Implicit-null or POP label : -- This label is assigned when the top label of the incoming MPLS packet is removed and the resulting MPLS or IP packet is forwarded to the next-hop downstream router. The value for this label is 3 (20 bit label field). This label is used in MPLS networks that implement penultimate hop popping .

  • Explicit-null Labe : -- This label is assigned to preserve the EXP value of the top label of an incoming packet. The top label is swapped with a label value of 0 (20 bit label field) and forwarded as an MPLS packet to the next-hop downstream router. This label is used in the implementation of QoS with MPLS.

  • Aggregate : -- In this label, the incoming MPLS packet is converted to an IP packet (by removing all labels if label stack is found on incoming packet), and an FIB (CEF) lookup is performed to identify the outgoing interface to destination

Friday, July 30, 2010

VPLS implementation

To illustrate the flexibility of how you can connect CE devices, the configuration example uses different switch port modes and service-delimiting VLAN tags on each PE router as follows:

1] CE1 sends and receives untagged Ethernet packets that is, null service-delimiting VLAN tags. PE1 configures the switch port mode as dot1q-tunnel to forward packets that have an unmodified Ethernet header. The internal VLAN that is associated with the switch port is 2.

2] CE2 sends and receives tagged Ethernet VLAN packets of which the service-delimiting VLAN
tag is 4. PE2 configures the switch port mode as a trunk to remove or add the service-delimiting VLAN tag accordingly. The internal VLAN that is associated with the switch port is 4.

3] CE3 sends and receives untagged Ethernet packetsthat is, null service-delimiting VLAN tags. PE2 configures the switchport mode as access to forward all untagged packets. The internal VLAN that is associated with the switchport is 8.

4] CE4 sends and receives tagged Ethernet VLAN packets of which the service-delimiting VLAN tag is 10. PE4 configures the switchport mode as a trunk to remove or add the service-delimiting VLAN tag accordingly. The internal VLAN that is associated with the switchport is 10.




Example 15-5. PE1 Configuration

hostname PE1
!
mpls label protocol ldp
mpls ldp logging neighbor-changes
mpls ldp router-id Loopback0
!
l2 vfi l2vpn manual
vpn id 1
neighbor 10.0.0.2 encapsulation mpls
neighbor 10.0.0.3 encapsulation mpls
neighbor 10.0.0.4 encapsulation mpls
!
interface Loopback0
ip address 10.0.0.1 255.255.255.255
!
interface POS3/1
ip address 10.0.1.1 255.255.255.252
mpls ip
!
interface FastEthernet4/2
no ip address
switchport
switchport access vlan 2
switchport mode dot1q-tunnel
!
interface Vlan2
no ip address
xconnect vfi l2vpn

Example 15-6. PE2 Configuration

hostname PE2
!
mpls label protocol ldp
mpls ldp logging neighbor-changes
mpls ldp router-id Loopback0
!
l2 vfi l2vpn manual
vpn id 1
neighbor 10.0.0.1 encapsulation mpls
neighbor 10.0.0.3 encapsulation mpls
neighbor 10.0.0.4 encapsulation mpls
!
interface Loopback0
ip address 10.0.0.2 255.255.255.255
!
interface POS3/1
ip address 10.0.2.1 255.255.255.252
mpls ip
!
interface FastEthernet4/2
no ip address
switchport
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 4
switchport mode trunk
!
interface Vlan4
no ip address
xconnect vfi l2vpn


Example 15-7. PE3 Configuration

hostname PE3
!
mpls label protocol ldp
mpls ldp logging neighbor-changes
mpls ldp router-id Loopback0
!
l2 vfi l2vpn manual
vpn id 1
neighbor 10.0.0.1 encapsulation mpls
neighbor 10.0.0.2 encapsulation mpls
neighbor 10.0.0.4 encapsulation mpls
!
interface Loopback0
ip address 10.0.0.3 255.255.255.255
!
interface POS3/1
ip address 10.0.3.1 255.255.255.252
mpls ip
!
interface FastEthernet4/2
no ip address
switchport
switchport access vlan 8
switchport mode access
!
interface Vlan8
no ip address
xconnect vfi l2vpn


Example 15-8. PE4 Configuration

hostname PE4
!
mpls label protocol ldp
mpls ldp logging neighbor-changes
mpls ldp router-id Loopback0
!
l2 vfi l2vpn manual
vpn id 1
neighbor 10.0.0.1 encapsulation mpls
neighbor 10.0.0.2 encapsulation mpls
neighbor 10.0.0.3 encapsulation mpls
!
interface Loopback0
ip address 10.0.0.4 255.255.255.255
!
interface POS3/1
ip address 10.0.4.1 255.255.255.252
mpls ip
!
interface FastEthernet4/2
no ip address
switchport
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 10
switchport mode trunk
!
interface Vlan10
no ip address
xconnect vfi l2vpn


Example 15-9. Verifying the VFI Status
PE1#show vfi l2vpn
VFI name: l2vpn, state: up
Local attachment circuits:
Vlan2
Neighbors connected via pseudowires:
10.0.0.2 10.0.0.3 10.0.0.4

PE1#show mac-address-table vlan 2
Legend: * - primary entry
vlan mac address type learn ports
------+---------------+-------+-----+-----------------------
* 2 000b.5fb5.0080 dynamic Yes Fa4/2
* 2 000b.5fad.e580 dynamic Yes
* 2 000b.5fb1.5780 dynamic Yes
* 2 000b.5fb1.5480 dynamic Yes

PE1#show mpls l2transport vc
Local intf Local circuit Dest address VC ID Status
------------- -------------------- --------------- ---------- ----------
VFI l2vpn VFI 10.0.0.2 1 UP
VFI l2vpn VFI 10.0.0.3 1 UP
VFI l2vpn VFI 10.0.0.4 1 UP

SSO/NSF with GR and / or NSR

Some definitions


HA- High AvailabilityHigh level terminology

SSO -StatefulSwitchover

StatefulSwitchoverAn operating mode where a dual processor router has transferred state information to a standby processor to allow the standby to pickup necessary router functions in the event of an active failure. Mostly refers to L2 information (PPP state, FIB ect) but some L3 applicability. In this operating mode both processors must run identical software versions.


NSF-Non Stop ForwardingNSF


NSF refers to a routers ability to almost immediately start forwarding packets following an active processor failure. The FIB (Forwarding Information Base) is initially transferred and actively updated so that when a failure occurs, the router is able to forward packets while the control plane is rebuilt or refreshed


GR-Graceful Restart


IETF specified mechanisms for interaction between routing protocol peers which allow the peer of a failing device to continue forwarding packets to that device, even though the neighbor relationship has been destroyed.


NSR –Non Stop Routing


A routing protocol operating mode where all information needed to fully maintain the neighbor relationship and all its relevant routing information is transferred (or "checkpointed") to the standby processor. No additional communication or interaction with the routing protocol peer is needed in this mode.Some implementations allow the use of both GR and NSR for the same protocol, but single routing protocol session must be either GR or NSR.






BGP NSF Awareness Timers

This section documents the configuration of the BGP graceful restart timers.

(Optional) The restart-time argument determines how long peer routers will wait to delete stale routes before a BGP open message is received. The default value is 120 seconds.

(Optional) The stalepath-time argument determines how long a router will wait before deleting stale routes after an end of record (EOR) message is received from the restarting router. The default value is 360 seconds



Thursday, July 29, 2010

Optical Fiber Type & Length


Optical fiber

Optical fiber are classified according to several parameters. The most important ones are:


1] Diameter: 9 μm, 10 μm, 50 μm and 62.5 μm
2] Wavelength: 850nm, 1300nm, 1310nm and 1550nm
3] Number of wavelength: Multi-mode Fiber (MMF) OR Single-mode Fiber (SMF)
4] Supported distant range: in meters / kilometers

Generally speaking, the "S" stands for "Short Wave Length" and "L" stands for "Long Wave
Length".

  • LX fibre - e.g. 1GBASE-LX / 1000BASE-LX is available in 50 μm and 62.5 μm as multi-mode fibre (mmf) supporting about 550 meters distance at 1300 nm wavelength. Distances of 2..10 km are possible in case of single-mode fibre (smf).

  • SX fibre - e.g. 1GBASE-SX / 1000BASE-SX is available in 50 μm and 62.5 μm as multi-mode fibre supporting about 250 meters distance at 850 nm wavelength. This wavlength allows for the use of LED transmitters, which are cheaper available then the normally used laser components.

  • FX fibre refers to the 100BASE-FX fast ethernet standard. This fibre type is the long wavelength optics fibre type for 100Mbps transmission systems.