gov.nist.antd.mpls.mgmt.fwrd_table
Class MPLSForwardingTable

java.lang.Object
  |
  +--gov.nist.antd.mpls.mgmt.fwrd_table.MPLSForwardingTable

public class MPLSForwardingTable
extends java.lang.Object

MPLS Forwarding Table.

 This MPLSForwardingTable has three Table to maintain Label swapping 
 informations.
- FTNTabl - ILMTable - TunelTable The ForwardingTable is consists of a ForwardingInformation and a NHLFE.
- The ForwardingInformation class is the super calss of FTN(FEC Information), ILMEntry and tunnelInfo class. It maintains incoming interface, label, etc.. information. - The NHLFE has outgoing interface, label, encoding type and any kind of LSP information =================== MPLSForwardingTable =================== - FTNTable -- ForwardingInformation - FEC to NHLFE table - A FEC can have multiful NHLFE informatons(such as active LSPs and backup LSPs) - this table is used at the Ingress LSRs +------------------------------------------------------------------+ | FTNTable +-- | | +----------------------+ | +-----------------------------+ | | | FEC Information | | | NHLFE - Out Interface/Label | | | | - FTN Class | | +-----------------------------+ | | | - Src/Dest IP addr | | +-----------------------------+ | | | - Src/Dest Port Num | | | NHLFE - Out Interface/Label | | | | - Protocol Num | | +-----------------------------+ | | | - NHLFE List -----+------+ +-----------------------------+ | | +----------------------+ | | NHLFE - Out Interface/Label | | | : | +-----------------------------+ | | : | : | | +-- | | | +------------------------------------------------------------------+ - ILMTable -- ForwardingInformation - Incoming Label Map table ( Incoming Label information - NHLFE ) - A ILM can have multiful NHLFE informations(such as active LSPs and backup LSPs) - this table is used at the core/egress LSRs +------------------------------------------------------------------+ | ILMTable +-- | | +----------------------+ | +-----------------------------+ | | | ILM Information | | | NHLFE - Out Interface/Label | | | | - ILMEntry Class | | +-----------------------------+ | | | - In InterfaceID | | +-----------------------------+ | | | - In Label | | | NHLFE - Out Interface/Label | | | | - NHLFE List -----+------+ +-----------------------------+ | | +----------------------+ | +-----------------------------+ | | : | | NHLFE - Out Interface/Label | | | : | +-----------------------------+ | | : | : | | +-- | | | +------------------------------------------------------------------+ - TunnelTable -- ForwardingInformation - Tunnel LSP Information tbale - A Tunnel can have multiful NHLFE informations(such as active LSPs and backup LSPs) ======================================== ForwardingTable and Forwarding functions ======================================== +----------------------+ | MPLSForwadingTable | | (3) finds a proper | | LSP information | | in the table | +------+--------+------+ (2) requests Outgoing | | (4) returns LSP information LSP Information | | to the MPLSForwarding +------+--------+----------+ | MPLSForwarding Module | +----------------+ | | | IP Packet | | (5) Label swapping or | +----------------+ (1) | Label stacking or | (6) +----------------+ or =====> | Pop operation.. | =====>| Labeled Packet | +----------------+ | | +----------------+ | Labeled Packet | | | +----------------+ +--------------------------+ Packet Incoming Packet Forwarding to the next hop

 This class was developed at the National Institute of Standards and
 Technology by employees of the Federal Government in the course of
 their official duties. Pursuant to title 17 Section 105 of the United
 States Code this software is not subject to copyright protection and
 is in the public domain.
 NIST assumes no responsibility whatsoever for its use by other parties,
 and makes no guarantees, expressed or implied, about its quality,
 reliability, or any other characteristic.
 
We would appreciate acknowledgement if the software is used.
NIST ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION AND DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.

Author:
EunHyuk Lim (ehlim@antd.nist.gov, othree28@hotmail.com)
, borchert , Chul Kim

Field Summary
 int FTNIndexCount
          Field FTNIndexCount - FTN Index count
 java.util.Vector FTNTable
          Field FTNTable - FTN Table
 int ILMIndexCount
          Field ILMIndexCount - Total ILM index count
 java.util.Vector ILMTable
          Field ILMTable - ILM Table
 MPLSInterfaceMgmt interfacemgmt
          Field interfacemgmt - MPLS Interface Management Object
 MPLSMgmt mplsmgmt
          Field mplsmgmt - MPLS Management Object
 int TunnelCount
          Field TunnelCount - Tunnel Count
 int TunnelInterfaceCount
          Field TunnelInterfaceCount - Tunnel Interface count
 java.util.Vector TunnelTable
          Field TunnelTable - Tunnel Table
 
Constructor Summary
MPLSForwardingTable(MPLSMgmt info)
          Constructs a mpls forwarding table.
 
Method Summary
 int addFEC(int diffservflowid, int addrType, int SrcAddrMin, int SrcAddrMax, int DestAddrMin, int DestAddrMax, int SrcPortMin, int SrcPortMax, int DestPortMin, int DestPortMax, int tos, int PrtNum, NHLFE nhlfe)
          Method addFEC Create the FEC information and add it to the table
 ILMEntry addILM(int interfaceID, int labelvalue, NHLFE nhlfe)
          Method addILM Add ILM entry to the table
 MPLSInterfaceInfo addTunnel(java.lang.String srclsrid, int srcintfid, java.lang.String destlsrid, int destintfid, java.util.Vector destiplist, double totalbandwidth, int hopcount, double delay, NHLFE nhlfe, java.util.Vector tunnelpath)
          Method addTunnel Create the tunnel information and add it to the tunnel table
 FTN getDiffServFEC(int diffservindex)
          Method getDiffServFEC get FTN information using DeiffServIndex
 FTN getFEC(int fecindex)
          Method getFEC Retrieve FTN informaton using FECIndex
 FTN getFEC(int addrType, int srcAddr, int destAddr, int srcPort, int destPort, int tos, int protocolNum)
          Method getFEC Get FTN informaton using FEC information
 java.lang.String getFECInformation(int index)
          Method getFECInformation Get FEC information using FEC index
 ForwardingInformation getForwardingInformation(int ingresslsrid, int locallspid)
          Method getForwardingInformation Retrieves the Forwarding Information using Ingress LSR ID and Local LSP ID
 ForwardingInformation getForwardingInformation(java.lang.String pathid)
          Method getForwardingInformation Retrieve the Forwarding Information(FEC, Tunnel, or ILM)
 ILMEntry getILM(int interfaceID, int inlabelvalue)
          Method getILM Retrieve the ILM that belongs to the specific LSP
 NHLFE getNHLFEEntry(int ingresslsrid, int locallspid)
          Method getNHLFEEntry Retrieves the NHFE entry using the Ingress LSR ID and Local LSP ID
 NHLFE getNHLFEEntry(java.lang.String pathid)
          Method getNHLFEEntry Retrieve the NHLFE using Path ID
 NHLFE getNHLFEForwardingInformation(int ingresslsrid, int locallspid)
          Method getNHLFEForwardingInformation Retrieves the NHFE in the forwarding information that has the Ingress LSR ID and Local LSP ID
 java.util.Vector getNHLFEList(ForwardingInformation finfo)
          Method getNHLFEList Retrive the NHLFEs from the given forwarding Information(FTN, ILM or Tunnel)
 void init()
          Initializes the table.
 boolean isForwardingInformation(java.lang.String pathid)
          Method isForwardingInformation Check this Path ID has the NHLFE entry in Tables
 java.util.Vector queryNHLFEList(int DiffServFlowID)
          Method queryNHLFEList Retrieves the NHLFEs using DiffServ Flow ID
 java.util.Vector queryNHLFEList(int inInterfaceID, int inlabelvalue)
          Method queryNHLFEList Retrieves the NHLFEs using ILM information
 java.util.Vector queryNHLFEList(int addrType, int srcAddr, int destAddr, int srcPort, int destPort, int tos, int protocolNum)
          Method queryNHLFEList Get the NHLFEs using the FEC information
 boolean removeLSP(int locallspid, int ingresslsrid)
          Method removeLSP Remove the LSP that has the Local LSP ID and Ingress LSR ID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mplsmgmt

public MPLSMgmt mplsmgmt
Field mplsmgmt - MPLS Management Object


interfacemgmt

public MPLSInterfaceMgmt interfacemgmt
Field interfacemgmt - MPLS Interface Management Object


ILMIndexCount

public int ILMIndexCount
Field ILMIndexCount - Total ILM index count


ILMTable

public java.util.Vector ILMTable
Field ILMTable - ILM Table


FTNIndexCount

public int FTNIndexCount
Field FTNIndexCount - FTN Index count


FTNTable

public java.util.Vector FTNTable
Field FTNTable - FTN Table


TunnelCount

public int TunnelCount
Field TunnelCount - Tunnel Count


TunnelInterfaceCount

public int TunnelInterfaceCount
Field TunnelInterfaceCount - Tunnel Interface count


TunnelTable

public java.util.Vector TunnelTable
Field TunnelTable - Tunnel Table

Constructor Detail

MPLSForwardingTable

public MPLSForwardingTable(MPLSMgmt info)
Constructs a mpls forwarding table.

Parameters:
info - the mpls management module.
Method Detail

init

public void init()
Initializes the table.


addTunnel

public MPLSInterfaceInfo addTunnel(java.lang.String srclsrid,
                                   int srcintfid,
                                   java.lang.String destlsrid,
                                   int destintfid,
                                   java.util.Vector destiplist,
                                   double totalbandwidth,
                                   int hopcount,
                                   double delay,
                                   NHLFE nhlfe,
                                   java.util.Vector tunnelpath)
Method addTunnel Create the tunnel information and add it to the tunnel table
 ========== : tunnel

   +-------+        +-------+       +-------+        +-------+        +-------+
   | Node1(0)------(0)Node2(1)=====(0)Node2(1)======(0)Node2(1)------(0)Node2 |
   +-------+        +--|----|       +-------+        |----|--+        +-------+
                    +--+    |                        |    +---+
                    |       |                        |        |
               srclsrid  srcintfid              destintfid  destlsrid
 

Parameters:
srclsrid - Source LSR ID
srcintfid - Source Interface ID
destlsrid - Destination LSR ID
destintfid - Destination Interface ID
destiplist - Destination LSR IP List
totalbandwidth - Bandwid of the tunnel (CDR).
hopcount - Total hop count of the tunnel.
delay - Total propagation delay of the tunnel
nhlfe - TunnelLSP information.
tunnelpath - Path information of the tunnel.
Returns:
MPLSInterfaceInfo - Created Interface Information

addILM

public ILMEntry addILM(int interfaceID,
                       int labelvalue,
                       NHLFE nhlfe)
Method addILM Add ILM entry to the table

Parameters:
interfaceID - - Interface ID
labelvalue - - Label value
nhlfe - - NHLFE
Returns:
ILMEntry

getILM

public ILMEntry getILM(int interfaceID,
                       int inlabelvalue)
Method getILM Retrieve the ILM that belongs to the specific LSP

Parameters:
interfaceID - - Inteface ID
inlabelvalue - - In Label value
Returns:
ILMEntry

addFEC

public int addFEC(int diffservflowid,
                  int addrType,
                  int SrcAddrMin,
                  int SrcAddrMax,
                  int DestAddrMin,
                  int DestAddrMax,
                  int SrcPortMin,
                  int SrcPortMax,
                  int DestPortMin,
                  int DestPortMax,
                  int tos,
                  int PrtNum,
                  NHLFE nhlfe)
Method addFEC Create the FEC information and add it to the table

Parameters:
diffservflowid - - Differentiated Service Flow ID
addrType - - Address Type
SrcAddrMin - - Source Address Minimum
SrcAddrMax - - Source Address Maximum
DestAddrMin - - Destination Address Minimum
DestAddrMax - - Destination Address Maximum
SrcPortMin - - Source Port Minimum
SrcPortMax - - Source Port Maximum
DestPortMin - - Destination Port Minimum
DestPortMax - - Destination Port Maximum
tos - - Type of Service
PrtNum - - Port Number
nhlfe - - NHLFE entry
Returns:
int - FTN index

getFEC

public FTN getFEC(int fecindex)
Method getFEC Retrieve FTN informaton using FECIndex

Parameters:
fecindex -
Returns:
FTN

getDiffServFEC

public FTN getDiffServFEC(int diffservindex)
Method getDiffServFEC get FTN information using DeiffServIndex

Parameters:
diffservindex -
Returns:
FTN

getFEC

public FTN getFEC(int addrType,
                  int srcAddr,
                  int destAddr,
                  int srcPort,
                  int destPort,
                  int tos,
                  int protocolNum)
Method getFEC Get FTN informaton using FEC information

Parameters:
addrType - - Address Type
srcAddr - - Source Address
destAddr - - Destination Address
srcPort - - Source Port
destPort - - Destination Port
tos - - Type of Service
protocolNum - - Protocol Number
Returns:
FTN - FTN entry

getNHLFEList

public java.util.Vector getNHLFEList(ForwardingInformation finfo)
Method getNHLFEList Retrive the NHLFEs from the given forwarding Information(FTN, ILM or Tunnel)

Parameters:
finfo - - Forwarding information object
Returns:
Vector - NHLFEs

queryNHLFEList

public java.util.Vector queryNHLFEList(int addrType,
                                       int srcAddr,
                                       int destAddr,
                                       int srcPort,
                                       int destPort,
                                       int tos,
                                       int protocolNum)
Method queryNHLFEList Get the NHLFEs using the FEC information

Parameters:
addrType - - Address Type
srcAddr - - Source Address
destAddr - - Destination Address
srcPort - - Source Port
destPort - - Destination Port
tos - - Type of Service
protocolNum - - Protocol Number
Returns:
Vector - NHLFEs

queryNHLFEList

public java.util.Vector queryNHLFEList(int DiffServFlowID)
Method queryNHLFEList Retrieves the NHLFEs using DiffServ Flow ID

Parameters:
DiffServFlowID - - DiffServ flow ID
Returns:
Vector - NHLFEs

queryNHLFEList

public java.util.Vector queryNHLFEList(int inInterfaceID,
                                       int inlabelvalue)
Method queryNHLFEList Retrieves the NHLFEs using ILM information

Parameters:
inInterfaceID - - Incoming interface ID
inlabelvalue - - In label value
Returns:
Vector - NHLFEs

getNHLFEEntry

public NHLFE getNHLFEEntry(java.lang.String pathid)
Method getNHLFEEntry Retrieve the NHLFE using Path ID

Parameters:
pathid - - Path ID
Returns:
NHLFE - NHLFE entry

getForwardingInformation

public ForwardingInformation getForwardingInformation(java.lang.String pathid)
Method getForwardingInformation Retrieve the Forwarding Information(FEC, Tunnel, or ILM)

Parameters:
pathid - - Path ID
Returns:
ForwardingInformation

getNHLFEEntry

public NHLFE getNHLFEEntry(int ingresslsrid,
                           int locallspid)
Method getNHLFEEntry Retrieves the NHFE entry using the Ingress LSR ID and Local LSP ID

Parameters:
ingresslsrid -
locallspid -
Returns:
NHLFE

getForwardingInformation

public ForwardingInformation getForwardingInformation(int ingresslsrid,
                                                      int locallspid)
Method getForwardingInformation Retrieves the Forwarding Information using Ingress LSR ID and Local LSP ID

Parameters:
ingresslsrid -
locallspid -
Returns:
ForwardingInformation

getNHLFEForwardingInformation

public NHLFE getNHLFEForwardingInformation(int ingresslsrid,
                                           int locallspid)
Method getNHLFEForwardingInformation Retrieves the NHFE in the forwarding information that has the Ingress LSR ID and Local LSP ID

Parameters:
ingresslsrid -
locallspid -
Returns:
NHLFE

isForwardingInformation

public boolean isForwardingInformation(java.lang.String pathid)
Method isForwardingInformation Check this Path ID has the NHLFE entry in Tables

Parameters:
pathid -
Returns:
boolean - True if this Path has the NHLFE entry in tables

removeLSP

public boolean removeLSP(int locallspid,
                         int ingresslsrid)
Method removeLSP Remove the LSP that has the Local LSP ID and Ingress LSR ID

Parameters:
locallspid -
ingresslsrid -
Returns:
boolean - True if success

getFECInformation

public java.lang.String getFECInformation(int index)
Method getFECInformation Get FEC information using FEC index

Parameters:
index -
Returns:
String - FEC Information string