LSP Hierarchy can be acrhived via three mechanism: -MPLS tunnel interface -Multiple pushes -forwarding MPLS tunnel interface --------------------- see README.tunnel Multiple pushes --------------- Conside the simple MPLS network: A------B--------C------D where A,D are LERs and B,C are LSRs. B,C have a LSP setup between them. A,D would like to setup an LSP between them, but THOUGH the existing LSP. This is called hierachtical LSPs. The desired label stacking is: 101 200 201 202 A------B--------C------D (We receive on eth1 and send on eth0) First setup the LSP between B and C: On B: mplsadm -A -I gen:101:eth0:ipv4:C On C: mplsadm -L eth1:0 mplsadm -A -I gen:101:0 Now setup the LSP between A,B: On A: mplsadm -A -O gen:200:eth0:ipv4:B On B: mplsadm -L eth1:0 mplsadm -A -I gen:200:0 Now setup the LSP between C,D: On C: mplsadm -A -O gen:202:eth0:ipv4:B On D: mplsadm -L eth1:0 mplsadm -A -I gen:202:0 Now setup another LSP between B,C inside of the first: On B: mpls -A -O gen:201:eth0:ipv4:C mpls -O gen:201:eth0 -o push:gen:201:push:gen:101:set *Note: that the set will use the data from the out going label structure with the key (gen,201,eth0) which isn't eactly ideal, but will have to do for now. (maybe a fwd would work better?) On C: mpls -I gen:101:0 -i pop:peek mpls -A -I gen:201:0 *Note: here we see when a peek is for. If a packet arrives with 101 on top of the stack, 101 if popped, and if more labels exist, they are looked up, and there instructions are run, if not labels exist a 'dlv' is executed. If we had use a 'dlv' as oppsed to a peek then all packets with a 101 on top would be send to a layer 3 protocol even if more labels existed. Now tie the three LSPs togther (A,B),(B,C),(C,D): On B: mplsadm -I gen:200:0 -O gen:201:eth0 -B On C: mplsadm -I gen:201:0 -O gen:202:eth0 -B Forwarding ---------- Considering the same example above: The desired label stacking is: 101 200 201 202 A------B--------C------D (We receive on eth1 and send on eth0) First setup the LSP between B and C: On B: mplsadm -A -I gen:101:eth0:ipv4:C On C: mplsadm -L eth1:0 mplsadm -A -I gen:101:0 Now setup the LSP between A,B: On A: mplsadm -A -O gen:200:eth0:ipv4:B On B: mplsadm -L eth1:0 mplsadm -A -I gen:200:0 Now setup the LSP between C,D: On C: mplsadm -A -O gen:202:eth0:ipv4:D On D: mplsadm -L eth1:0 mplsadm -A -I gen:202:0 Now setup another LSP between B,C: On B: mplsadm -A -O gen:201:eth0:ipv4:C On C: mplsadm -A -I gen:201:0 Forward traffic for the 201 LSP to ride on the 101 LSP: On B: mplsadm -O gen:201:eth0 -o push:gen:201:fwd:gen:101:eth0 On C: mplsadm -I gen:101:0 -i pop:peek Tie the LSPs together: On B: mplsadm -B -I gen:200:0 -O gen:201:eth0 On C: mplsadm -B -I gen:201:0 -O gen:202:eth0