Easy Configuration of MPLS in Cisco Router
Ten Step Basic configuration for MPLS
Current configuration:
!
version 12.2
!
hostname Pescara
!
ip cef
!
!--- Customer A commands.
ip vrf Customer_A
!--- Enables the VPN routing and forwarding (VRF) routing table. !--- This command can be used in global or !--- router configuration mode.
rd 100:110
!--- Route distinguisher creates routing and forwarding !--- tables for a VRF.
route-target export 100:1000
!--- Creates lists of import and export route-target extended !--- communities for the specified VRF.
route-target import 100:1000
!
!--- Customer B commands.
ip vrf Customer_B
rd 100:120
route-target export 100:2000
route-target import 100:2000
!
interface Loopback0
ip address 10.10.10.4 255.255.255.255
ip router isis
!--- Customer A commands.
interface Loopback101
ip vrf forwarding Customer_A
!--- Associates a VRF instance with an interface or subinterface.
ip address 200.0.4.1 255.255.255.0
!--- Loopback101 and 102 use the same IP address, 200.0.4.1. !--- This is allowed because they belong to two !--- different customers' VRFs.
no ip directed-broadcast
!
!--- Customer B commands.
interface Loopback102
ip vrf forwarding Customer_B
ip address 200.0.4.1 255.255.255.0
!--- Loopback101 and 102 use the same IP address, 200.0.4.1. !--- This is allowed because they belong to two !--- different customers' VRFs.
no ip directed-broadcast
!
interface Serial2/0
no ip address
no ip directed-broadcast
encapsulation frame-relay
no fair-queue
!
interface Serial2/0.1 point-to-point
description link to Pauillac
bandwidth 512
ip address 10.1.1.14 255.255.255.252
no ip directed-broadcast
ip router isis
tag-switching ip
frame-relay interface-dlci 401
!
router isis
net 49.0001.0000.0000.0004.00
is-type level-1
!
router bgp 100
bgp log-neighbor-changes
!--- Enables logging of BGP neighbor resets.
neighbor 10.10.10.6 remote-as 100
!--- Adds an entry to the BGP or multiprotocol BGP neighbor table.
neighbor 10.10.10.6 update-source Loopback0
!--- Enables BGP sessions to use a specific operational !--- interface for TCP connections.
!
!--- Customer A and B commands.
address-family vpnv4
!--- To enter address family configuration mode !--- for configuring routing sessions, such as BGP, !--- that use standard VPN version 4 address prefixes.
neighbor 10.10.10.6 activate
neighbor 10.10.10.6 send-community both
!--- Sends the community attribute to a BGP neighbor.
exit-address-family
!
!--- Customer B commands.
address-family ipv4 vrf Customer_B
!--- To enter address family configuration mode !--- for configuring routing sessions, such as BGP, !--- that use standard VPN version 4 address prefixes.
redistribute connected
no auto-summary
no synchronization
exit-address-family
!
!--- Customer A commands.
address-family ipv4 vrf Customer_A
redistribute connected
no auto-summary
no synchronization
exit-address-family
!
ip classless
!
end
Ten Step Basic configuration for MPLS
Current configuration:
!
version 12.2
!
hostname Pescara
!
ip cef
!
!--- Customer A commands.
ip vrf Customer_A
!--- Enables the VPN routing and forwarding (VRF) routing table. !--- This command can be used in global or !--- router configuration mode.
rd 100:110
!--- Route distinguisher creates routing and forwarding !--- tables for a VRF.
route-target export 100:1000
!--- Creates lists of import and export route-target extended !--- communities for the specified VRF.
route-target import 100:1000
!
!--- Customer B commands.
ip vrf Customer_B
rd 100:120
route-target export 100:2000
route-target import 100:2000
!
interface Loopback0
ip address 10.10.10.4 255.255.255.255
ip router isis
!--- Customer A commands.
interface Loopback101
ip vrf forwarding Customer_A
!--- Associates a VRF instance with an interface or subinterface.
ip address 200.0.4.1 255.255.255.0
!--- Loopback101 and 102 use the same IP address, 200.0.4.1. !--- This is allowed because they belong to two !--- different customers' VRFs.
no ip directed-broadcast
!
!--- Customer B commands.
interface Loopback102
ip vrf forwarding Customer_B
ip address 200.0.4.1 255.255.255.0
!--- Loopback101 and 102 use the same IP address, 200.0.4.1. !--- This is allowed because they belong to two !--- different customers' VRFs.
no ip directed-broadcast
!
interface Serial2/0
no ip address
no ip directed-broadcast
encapsulation frame-relay
no fair-queue
!
interface Serial2/0.1 point-to-point
description link to Pauillac
bandwidth 512
ip address 10.1.1.14 255.255.255.252
no ip directed-broadcast
ip router isis
tag-switching ip
frame-relay interface-dlci 401
!
router isis
net 49.0001.0000.0000.0004.00
is-type level-1
!
router bgp 100
bgp log-neighbor-changes
!--- Enables logging of BGP neighbor resets.
neighbor 10.10.10.6 remote-as 100
!--- Adds an entry to the BGP or multiprotocol BGP neighbor table.
neighbor 10.10.10.6 update-source Loopback0
!--- Enables BGP sessions to use a specific operational !--- interface for TCP connections.
!
!--- Customer A and B commands.
address-family vpnv4
!--- To enter address family configuration mode !--- for configuring routing sessions, such as BGP, !--- that use standard VPN version 4 address prefixes.
neighbor 10.10.10.6 activate
neighbor 10.10.10.6 send-community both
!--- Sends the community attribute to a BGP neighbor.
exit-address-family
!
!--- Customer B commands.
address-family ipv4 vrf Customer_B
!--- To enter address family configuration mode !--- for configuring routing sessions, such as BGP, !--- that use standard VPN version 4 address prefixes.
redistribute connected
no auto-summary
no synchronization
exit-address-family
!
!--- Customer A commands.
address-family ipv4 vrf Customer_A
redistribute connected
no auto-summary
no synchronization
exit-address-family
!
ip classless
!
end