domenica 6 dicembre 2009

Howto: using simple MPLS traffic engineering capabilities with GNS3 and Dynamips

This article covers the main steps to create an MPLS frame mode network and to configure traffic-engineering MPLS features to select specific paths over the network with dedicated bandwidth.

Many elements here are taken from ibarrere's blog on networking-forum.com


In brief, the network will run standard OSPF routing while path selection and bandwidth is delegated to MPLS and RSVP protocols.






Please note that this article does not cover MPLS-VPN capabilities, maybe in a few day I'll take the time to write it down too.






1) Create a new project with GNS3 and place routers and connections as from the topology image, then assign IP addresses to ethernet and loopback interfaces





2) Enable OSPF on each router that connects to the "backbone" (R0, R1, R2, R3) and verify that adjacencies are being established correctly


(config)#router ospf 1
(config-router)#network 172.16.0.0 0.0.255.255 area 0

 


3) Enable MPLS and MPLS traffic-engineering on each router that connects to the backbone (R0, R1, R2, R3)


(config)#mpls ip
(config)#mpls traffic-eng tunnels




4) Configure OSPF to transport MPLS information


(config-router)#mpls ldp autoconfig area 0
(config-router)#mpls traffic-eng router-id Loopback0
(config-router)#mpls traffic-eng area 0


 5) On R0 create a tunnel interface that will connect to R3


(config)#interface Tunnel2

(config-if)#ip unnumbered Loopback0

(config-if)#tunnel destination 172.16.255.13

(config-if)#tunnel mode mpls traffic-eng

(config-if)#tunnel mpls traffic-eng autoroute announce

(config-if)#tunnel mpls traffic-eng priority 2 2

(config-if)#tunnel mpls traffic-eng bandwidth 158

(config-if)#tunnel mpls traffic-eng path-option 1 explicit name BOTTOM

(config-if)#no routing dynamic

 


6) Create on R0 a path that will specify step-by-step every router that will be traversed by the tunnel.


In this example we will suppose that we want to use MPLS traffic-engineering to force all traffic


between R4 and R5 to be forwarded through R2 path only. We well call this path BOTTOM:


(config)#ip explicit-path name BOTTOM enable

(cfg-ip-expl-path)#next-address 172.16.1.2

(cfg-ip-expl-path)#next-address 172.16.3.2





7) Now since MPLS traffic engineering tunnels are UNIdirectional, we will need to configure R3 with a mirrored R0 configuration, first of all we create a tunnel interface changing the destination IP:


(config)#interface Tunnel2

(config-if)#ip unnumbered Loopback0

(config-if)#tunnel destination 172.16.255.10

(config-if)#tunnel mode mpls traffic-eng

(config-if)#tunnel mpls traffic-eng autoroute announce

(config-if)#tunnel mpls traffic-eng priority 2 2

(config-if)#tunnel mpls traffic-eng bandwidth 158

(config-if)#tunnel mpls traffic-eng path-option 1 explicit name BOTTOM

(config-if)#no routing dynamic

 


8) Then we create on R3 a mirrored explicit-path too:


(config)#ip explicit-path name BOTTOM enable

(cfg-ip-expl-path)#next-address 172.16.3.1

(cfg-ip-expl-path)#next-address 172.16.1.1


Please note that this is the simplest configuration choice, but any other path to R0 would be

suitable as well

 


9) Now we need to enable MPLS traffic-enginering tunnels on all the interfaces except for those on subnets 10.x.x.x, that is: R0 (f0/0 and f0/1), R2 (all), R1 (all), R3 (f0/0 and f0/1)


(config-if)#mpls ip

(config-if)#mpls traffic-eng tunnels

(config-if)#ip rsvp bandwidth


10) We need to add the CE facing interfacing of R4 and R5 to OSPF to be ridistributed with IGP, on R0 fa1/0 and R3 fa1/0 interfaces we add:


(config-if)#ip ospf 1 area 0




11) The last thing to do is to add a static route to R4 and R5 to make all traffic toward 10.x.x.x will be redirected to R0 and R3:


on R4

(config)#ip route 10.10.1.0 0.0.0.255 10.10.0.1



and on R5

(config)#ip route 10.10.0.0 0.0.0.255 10.10.1.1


 To test the functionality, just shutdown f.e. interface Tunnel 2 on R0 and trace the route from R4 to 10.10.1.2, you will see that the path will be R0-R1-R3-R5.
If you allow the Tunnel 2 interface on R0 if you issue the command again you will see that the chosen path will be R0-R2-R3-R5

1 commento: