From: Vasu Dasari <vdasari@gmail.com>
[mpls-ldp-portable.git] / README.quagga-mpls
blob9b05ada4c829a369312c58f0670f64bc43ed5b4a
1 What is this?
2 -------------
3 quagga-mpls.diff is a quagga<->ldp-portable porting layer.
5 What is "quagga"?
6 ----------------
7 Quagga is a set of open source routing daemons which implement the
8 common routing protocols (RIP, OSPF, BGP).  Each protocol runs as a seperate
9 dameon, and they are all syncronized via a managment daemon (zebra).  If you
10 have never used quagga, go to http://quagga.net/ download the source for
11 0.99.6, compile it and learn how to setup up a small OSPF network using
12 quagga.  Once you have that running then you are ready try and use this patch.
14 What does this patch include?
15 -----------------------------
16 It handles MPLS labels as part of the quagga nexthop and correct
17 handling of MPLS labels as part of a recursive nexthop.
19 It implements a CLI for creating static LSPs (in the zebra daemon).
21 It implements a porting layer for the ldp-portable library so that LDP
22 interact seemlessly with the rest of the quagga routing software (in the ldpd
23 daemon).
25 How do I use this patch?
26 -----------------------
27 Apply quagga-mpls.diff to the quagga source distribution. (0.99.6)
28 Go into the quagga/ldpd directory and modify 'create-links' to point to
29 your ldp-portable source distribution.  Then execute 'create-links' .
30 Go back to the top of the quagga source tree and configure and compile
31 quagga according to it's directions.  If you are not running on a mpls-linux
32 enabled kernel, modify quagga/zebra/Makefile.am and change mpls-linux.o to
33 mpls_null.o.  If you have issues compiling and you are running a
34 mpls-linux-1.1x kernel most likely it can't find your
35 linux/include/linux/mpls.h file.   Go read the file 'README.1st.really'
36 in the mpls-linux-1.1 distrubution.
38 After you have finished compling, you will have a ldpd binary that has
39 the same command line syntax as the rest of the quagga binaries.
41 'ldpd' supports LDP, zebra supports staic LSPs.
43 (if you are not familiar with quagga hit the '?' key and it will provide
44 you context sensitive help.  Also look at 'mpls' at the interface level.
45 There are also 'show' commands availble from the operations more.  Look at
46 'show ldp ?' and 'show mpls ?' for a list of commands.)
48 The environment I use is:
50 zebra -d -A 127.0.0.1 -f /etc/quagga/zebra.conf
51 ospfd -d -A 127.0.0.1 -f /etc/quagga/ospfd.conf
52 ldpd -d -A 127.0.0.1 -f /etc/quagga/ldpd.conf
54 Look at quagga/ldpd/ldpd.conf.sample or the sample configs I have included
55 below, for a basic configuration example.
57 I have done most of my testing with unsolicited mode, liberal retention, label
58 merging, ordered control.  If you have success or failures with other modes
59 let me know.
61 Please post questions to the mpls-linux mailing list:
63 http://sourceforge.net/mail/?group_id=15443
66 LDP example config files
67 ------------------------
68 NOTE:  The usage of the dummy interface with a /32 address is important!
70 --------------------------- zebra config ------------------------------
71 hostname uml-2
72 password root
73 enable password root
74 service advanced-vty
76 mpls static 0
77  label-map gen 16 pop
78  label-map gen 17 swap gen 18 nexthop eth2 11.0.2.3
80 interface lo
81  description Loopback 
83 interface dummy0
84  ip address 192.168.0.2/32
86 interface eth0
88 interface eth1
89  mpls labelspace 0
90  ip address 11.0.1.2/24
92 interface eth2
93  mpls labelspace 0
94  ip address 11.0.2.2/24
96 interface eth3
97  mpls labelspace 0
98  ip address 11.0.3.2/24
100 interface teql0
102 ip route 10.0.0.0/8 gen 19 nexthop eth2 11.0.2.3
104 line vty
105  exec-timeout 0 0
107 --------------------------- ospfd config ------------------------------
109 hostname uml-2-ospf
110 password root
111 enable password root
115 interface lo
117 interface teql0
119 interface eth0
121 interface eth1
123 interface eth2
125 interface eth3
127 interface dummy0
129 router ospf
130  passive-interface dummy0
131  network 11.0.0.0/8 area 0
132  network 192.168.0.2/32 area 0
134 line vty
135  exec-timeout 0 0
137 --------------------------- ldpd config ------------------------------
139 hostname uml-2-mpls
140 password root
141 enable password root
143 mpls ldp
145 interface lo
147 interface eth0
149 interface eth1
150  mpls ip
152 interface eth2
153  mpls ip
155 interface eth3
156  mpls ip
158 interface dummy0
160 line vty
161  exec-timeout 0 0
163 -----------------------------------------------------------------------------
165 Static MPLS example
166 -------------------
168 Here is a simple example of how to use these new commands to configure a
169 static LSP and bind a route to it:
171     Ingress LER
172     ----------- 
173     iler# conf t
174     iler(config)# ip route 10.0.0.0/24 gen 16 nexthop eth1 192.168.2.1
175     iler(config)# end
176     iler# show mpls forwarding
177     Insegments:
179     Total 0
181     Outsegments:
182       Interface          Label Next Hop        Owner
183       eth1                  16 192.168.2.1     STATIC
184     Total 1
186     Cross Connects:
188     Total 0
190     iler# show ip route 10.0.0.0/24
191     Routing entry for 10.0.0.0/24
192       Known via "static", distance 1, metric 0, best
193       * 192.168.2.1, via eth1 (label 16)
195     iler#
197     LSR
198     ---
199     lsr# conf t
200     lsr(config)# mpls static 0
201     lsr(config-ls)# label-map gen 16 swap gen 17 nexthop eth1 192.168.3.1
202     lsr(config-ls)# exit
203     lsr(config)# int eth0
204     lsr(config-if)# mpls labelspace 0
205     lsr(config-if)# end
206     lsr# show mpls forwarding
207     Insegments:
208       Lbl Spc  Label Owner
209         0         16 STATIC
210     Total 1
212     Outsegments:
213       Interface          Label Next Hop        Owner
214       eth1                  17 192.168.3.1     STATIC
215     Total 1
217     Cross Connects:
218       Lbl Spc  In Label Out Label Interface        Next Hop        Owner
219         0            16        17 eth1             192.168.3.1     STATIC
220     Total 1
222     lsr# show interface eth0
223     Interface eth0 is up, line protocol detection is disabled
224       index 8 metric 1 mtu 1500 <UP,BROADCAST,RUNNING,MULTICAST>
225       HWaddr: 00:05:5d:a6:e4:33
226       MPLS labelspace 0
227       inet 192.168.2.1/24 broadcast 192.168.2.255
228       inet6 fe80::205:5dff:fea6:e433/64
229         input packets 2737, bytes 1650440, dropped 0, multicast packets 0
230         input errors 0, length 0, overrun 0, CRC 0, frame 0, fifo 0, missed 0
231         output packets 2862, bytes 452923, dropped 0
232         output errors 0, aborted 0, carrier 0, fifo 0, heartbeat 0, window 0
233         collisions 0
234     lsr#
236     Egress LER
237     ----------
239     eler# conf t
240     eler(config)# int eth0
241     eler(config-if)# mpls labelspace 0
242     eler(config-if)# exit
243     eler(config)# mpls static 0
244     eler(config-ls)# label-map gen 17 pop
245     eler(config-ls)# end
246     eler# show mpls forwarding
247     Insegments:
248       Lbl Spc  Label Owner
249         0         17 STATIC
250     Total 1
252     Outsegments:
254     Total 0
256     Cross Connects:
258     Total 0
260     eler# show int eth0
261     Interface eth0 is up, line protocol detection is disabled
262       index 8 metric 1 mtu 1500 <UP,BROADCAST,MULTICAST>
263       HWaddr: 00:05:5d:a6:e4:33
264       MPLS labelspace 0
265       inet 192.168.3.1/24 broadcast 192.168.3.255
266       inet6 fe80::205:5dff:fea6:e433/64
267         input packets 2759, bytes 1657918, dropped 0, multicast packets 0
268         input errors 0, length 0, overrun 0, CRC 0, frame 0, fifo 0, missed 0
269         output packets 2881, bytes 454579, dropped 0
270         output errors 0, aborted 0, carrier 0, fifo 0, heartbeat 0, window 0
271         collisions 0
272     eler#
274 ------------------------------------------------------------------------------
276 Copyright by James R. Leu <jleu@mindspring.com> 1999-2008