Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Download PNETLab Platform

PNETLAB Store
PNETLab.com

INTER-AS OPTION B
Lab Topology:
Please use the following topology to complete this lab exercise:

Lab Objective:
The objective of this lab exercise is for you to learn and understand how can you configure L3VPN from
local site to remote site, between different AS with Option B.

Task Lists
Task 1: Configure the Hostname and IP address for the interfaces for Routers as Topo.
Task 2: Config OSPF Routing and enable MPLS at AS65301, AS65302.
Task 3: Config iBGP VPNv4 inside AS65301 and AS65302.
Task 4: Config VRF at PE router (R3-PE1, R7-PE2).
Task 5: Config eBGP VPNv4 between 2 ASBR Router (R4-ASBR1 & R6-ASBR2).
Task 6: Config Static Route for CE Routers (R1,R2,R9,R10) and check the connection between
CE Routers.

SOLUTION
Task 1
On R1

1
Download PNETLab Platform
PNETLAB Store
PNETLab.com

set interfaces ge-0/0/0 unit 0 family inet address 172.16.1.1/30

On R2
set interfaces ge-0/0/0 unit 0 family inet address 172.16.2.1/30
On R3
set interfaces ge-0/0/0 description TO-VPN11
set interfaces ge-0/0/0 unit 0 family inet address 172.16.1.2/30
set interfaces ge-0/0/1 description TO-LAN21
set interfaces ge-0/0/1 unit 0 family inet address 172.16.2.2/30
set interfaces ge-0/0/2 description TO-R4
set interfaces ge-0/0/2 unit 0 family inet address 192.168.1.5/30
set interfaces ge-0/0/2 unit 0 family mpls
set interfaces ge-0/0/3 description TO-RR
set interfaces ge-0/0/3 unit 0 family inet address 192.168.1.1/30
set interfaces ge-0/0/3 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 3.3.3.3/32
On R4
set interfaces ge-0/0/0 description TO-R3
set interfaces ge-0/0/0 unit 0 family inet address 192.168.1.6/30
set interfaces ge-0/0/0 unit 0 family mpls
set interfaces ge-0/0/1 description TO-R6
set interfaces ge-0/0/1 unit 0 family inet address 172.16.3.1/30
set interfaces ge-0/0/1 unit 0 family mpls // We need enable mpls at ge-0/0/0 TO-R4 for inet-
vpn family
set interfaces ge-0/0/2 description TO-RR1
set interfaces ge-0/0/2 unit 0 family inet address 192.168.1.9/30
set interfaces ge-0/0/2 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 4.4.4.4/32
On RR1
set interfaces ge-0/0/0 description TO-R3
set interfaces ge-0/0/0 unit 0 family inet address 192.168.1.2/30
set interfaces ge-0/0/0 unit 0 family mpls
set interfaces ge-0/0/1 description TO-R4
set interfaces ge-0/0/1 unit 0 family inet address 192.168.1.10/30
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.10.10.10/32
On R6
set interfaces ge-0/0/0 description TO-R4
set interfaces ge-0/0/0 unit 0 family inet address 172.16.3.2/30
set interfaces ge-0/0/0 unit 0 family mpls // We need enable mpls at ge-0/0/0 TO-R4 for inet-
vpn family
set interfaces ge-0/0/1 description TO-R7
2
Download PNETLab Platform
PNETLAB Store
PNETLab.com

set interfaces ge-0/0/1 unit 0 family inet address 192.168.2.5/30


set interfaces ge-0/0/1 unit 0 family mpls
set interfaces ge-0/0/2 description TO-RR2
set interfaces ge-0/0/2 unit 0 family inet address 192.168.2.9/30
set interfaces ge-0/0/2 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 6.6.6.6/32
On R7
set interfaces ge-0/0/0 description TO-R6
set interfaces ge-0/0/0 unit 0 family inet address 192.168.2.6/30
set interfaces ge-0/0/0 unit 0 family mpls
set interfaces ge-0/0/1 description TO-VPN11
set interfaces ge-0/0/1 unit 0 family inet address 172.16.1.5/30
set interfaces ge-0/0/2 description TO-VPN22
set interfaces ge-0/0/2 unit 0 family inet address 172.16.2.5/30
set interfaces ge-0/0/3 description TO-RR2
set interfaces ge-0/0/3 unit 0 family inet address 192.168.2.1/30
set interfaces ge-0/0/3 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 7.7.7.7/32
On RR2
set interfaces ge-0/0/0 description TO-R6
set interfaces ge-0/0/0 unit 0 family inet address 192.168.2.10/30
set interfaces ge-0/0/0 unit 0 family mpls
set interfaces ge-0/0/1 description TO-R7
set interfaces ge-0/0/1 unit 0 family inet address 192.168.2.2/30
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 20.20.20.20/32
On R9
set interfaces ge-0/0/0 description TO-VPN11
set interfaces ge-0/0/0 unit 0 family inet address 172.16.1.6/30
On R10
set interfaces ge-0/0/0 description TO-VPN22
set interfaces ge-0/0/0 unit 0 family inet address 172.16.2.6/30

Task 2
On R3
set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ldp interface ge-0/0/2.0
set protocols ldp interface ge-0/0/3.0
set protocols ldp interface lo0.0

3
Download PNETLab Platform
PNETLAB Store
PNETLab.com

On R4
set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ldp interface ge-0/0/0.0
set protocols ldp interface ge-0/0/2.0
set protocols ldp interface lo0.0
On RR1
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ldp interface ge-0/0/0.0
set protocols ldp interface ge-0/0/1.0
set protocols ldp interface lo0.0
On R6
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ldp interface ge-0/0/1.0
set protocols ldp interface ge-0/0/2.0
set protocols ldp interface lo0.0
On R7
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ldp interface ge-0/0/0.0
set protocols ldp interface ge-0/0/3.0
set protocols ldp interface lo0.0
On RR2
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ldp interface ge-0/0/0.0
set protocols ldp interface ge-0/0/1.0
set protocols ldp interface lo0.0

Task 3
On R3
set routing-options autonomous-system 65301

4
Download PNETLab Platform
PNETLAB Store
PNETLab.com

set protocols bgp group TO-RR type internal


set protocols bgp group TO-RR local-address 3.3.3.3
set protocols bgp group TO-RR family inet-vpn unicast
set protocols bgp group TO-RR peer-as 65301
set protocols bgp group TO-RR neighbor 10.10.10.10
On R4
set routing-options autonomous-system 65301

set protocols bgp group TO-RR type internal


set protocols bgp group TO-RR local-address 4.4.4.4
set protocols bgp group TO-RR family inet labeled-unicast
set protocols bgp group TO-RR family inet-vpn unicast
set protocols bgp group TO-RR export RR-EXPORT
set protocols bgp group TO-RR peer-as 65301
set protocols bgp group TO-RR neighbor 10.10.10.10

set policy-options policy-statement RR-EXPORT from protocol bgp


set policy-options policy-statement RR-EXPORT then next-hop self
set policy-options policy-statement RR-EXPORT then accept
On RR1
set routing-options autonomous-system 65301

set protocols bgp group TO-PE type internal


set protocols bgp group TO-PE local-address 10.10.10.10
set protocols bgp group TO-PE family inet-vpn unicast
set protocols bgp group TO-PE cluster 10.10.10.10
set protocols bgp group TO-PE peer-as 65301
set protocols bgp group TO-PE neighbor 3.3.3.3
set protocols bgp group TO-PE neighbor 4.4.4.4
On R6
set protocols bgp group TO-RR type internal
set protocols bgp group TO-RR local-address 6.6.6.6
set protocols bgp group TO-RR family inet labeled-unicast
set protocols bgp group TO-RR family inet-vpn unicast
set protocols bgp group TO-RR export RR-EXPORT
set protocols bgp group TO-RR peer-as 65302
set protocols bgp group TO-RR neighbor 20.20.20.20

set policy-options policy-statement RR-EXPORT from protocol bgp


set policy-options policy-statement RR-EXPORT then next-hop self
set policy-options policy-statement RR-EXPORT then accept
On R7
set routing-options autonomous-system 65302

5
Download PNETLab Platform
PNETLAB Store
PNETLab.com

set protocols bgp group TO-RR type internal


set protocols bgp group TO-RR local-address 7.7.7.7
set protocols bgp group TO-RR family inet-vpn unicast
set protocols bgp group TO-RR peer-as 65302
set protocols bgp group TO-RR neighbor 20.20.20.20
On RR2
set routing-options autonomous-system 65302

set protocols bgp group TO-PE type internal


set protocols bgp group TO-PE local-address 20.20.20.20
set protocols bgp group TO-PE family inet-vpn unicast
set protocols bgp group TO-PE cluster 20.20.20.20
set protocols bgp group TO-PE peer-as 65302
set protocols bgp group TO-PE neighbor 6.6.6.6
set protocols bgp group TO-PE neighbor 7.7.7.7

Task 4
On R3
set routing-instances VPN11 instance-type vrf
set routing-instances VPN11 interface ge-0/0/0.0
set routing-instances VPN11 route-distinguisher 65301:11
set routing-instances VPN11 vrf-import VPN11-IMPORT
set routing-instances VPN11 vrf-export VPN11-EXPORT
set routing-instances VPN11 vrf-target import target:65301:11
set routing-instances VPN11 vrf-target export target:65301:11
set routing-instances VPN11 vrf-table-label

set routing-instances VPN22 instance-type vrf


set routing-instances VPN22 interface ge-0/0/1.0
set routing-instances VPN22 route-distinguisher 65301:22
set routing-instances VPN22 vrf-import VPN22-IMPORT
set routing-instances VPN22 vrf-export VPN22-EXPORT
set routing-instances VPN22 vrf-target import target:65301:22
set routing-instances VPN22 vrf-target export target:65301:22
set routing-instances VPN22 vrf-table-label

set policy-options policy-statement VPN11-EXPORT from protocol direct


set policy-options policy-statement VPN11-EXPORT then community add target:65301:11
set policy-options policy-statement VPN11-EXPORT then accept
set policy-options policy-statement VPN11-IMPORT from protocol bgp
set policy-options policy-statement VPN11-IMPORT from community target:65301:11
set policy-options policy-statement VPN11-IMPORT then accept

6
Download PNETLab Platform
PNETLAB Store
PNETLab.com

set policy-options policy-statement VPN22-EXPORT from protocol direct


set policy-options policy-statement VPN22-EXPORT then community add target:65301:22
set policy-options policy-statement VPN22-EXPORT then accept
set policy-options policy-statement VPN22-IMPORT from protocol bgp
set policy-options policy-statement VPN22-IMPORT from community target:65301:22
set policy-options policy-statement VPN22-IMPORT then accept
set policy-options community target:65301:11 members target:65301:11
set policy-options community target:65301:22 members target:65301:22
On R7
set routing-instances VPN11 instance-type vrf
set routing-instances VPN11 interface ge-0/0/1.0
set routing-instances VPN11 route-distinguisher 65302:11
set routing-instances VPN11 vrf-import VPN11-IMPORT
set routing-instances VPN11 vrf-export VPN11-EXPORT
set routing-instances VPN11 vrf-target import target:65302:11
set routing-instances VPN11 vrf-target export target:65302:11
set routing-instances VPN11 vrf-table-label

set routing-instances VPN22 instance-type vrf


set routing-instances VPN22 interface ge-0/0/2.0
set routing-instances VPN22 route-distinguisher 65302:22
set routing-instances VPN22 vrf-import VPN22-IMPORT
set routing-instances VPN22 vrf-export VPN22-EXPORT
set routing-instances VPN22 vrf-target import target:65302:22
set routing-instances VPN22 vrf-target export target:65302:22
set routing-instances VPN22 vrf-table-label

set policy-options policy-statement VPN11-EXPORT from protocol direct


set policy-options policy-statement VPN11-EXPORT then community add target:65302:11
set policy-options policy-statement VPN11-EXPORT then accept
set policy-options policy-statement VPN11-IMPORT from protocol bgp
set policy-options policy-statement VPN11-IMPORT from community target:65302:11
set policy-options policy-statement VPN11-IMPORT then accept
set policy-options policy-statement VPN22-EXPORT from protocol direct
set policy-options policy-statement VPN22-EXPORT then community add target:65302:22
set policy-options policy-statement VPN22-EXPORT then accept
set policy-options policy-statement VPN22-IMPORT from protocol bgp
set policy-options policy-statement VPN22-IMPORT from community target:65302:22
set policy-options policy-statement VPN22-IMPORT then accept
set policy-options community target:65302:11 members target:65302:11
set policy-options community target:65302:22 members target:65302:22
Task 5
On R4
set protocols bgp group TO-AS65302 type external
7
Download PNETLab Platform
PNETLAB Store
PNETLab.com

set protocols bgp group TO-AS65302 import AS65302_COM_REWRITE // This import


policy for rewrite community value, this action will replace community which same with
community value inside AS
set protocols bgp group TO-AS65302 family inet-vpn unicast //Enable inet-vpn family
set protocols bgp group TO-AS65302 peer-as 65302
set protocols bgp group TO-AS65302 neighbor 172.16.3.2 //Enable eBGP session between
R4-R6

set policy-options policy-statement AS65302_COM_REWRITE term 1 from community


target:65302:11
set policy-options policy-statement AS65302_COM_REWRITE term 1 then community delete
target:65302:11
set policy-options policy-statement AS65302_COM_REWRITE term 1 then community add
target:65301:11
set policy-options policy-statement AS65302_COM_REWRITE term 1 then accept
set policy-options policy-statement AS65302_COM_REWRITE term 2 from community
target:65302:22
set policy-options policy-statement AS65302_COM_REWRITE term 2 then community delete
target:65302:22
set policy-options policy-statement AS65302_COM_REWRITE term 2 then community add
target:65301:22
set policy-options policy-statement AS65302_COM_REWRITE term 2 then accept

On R6
set protocols bgp group TO-AS65301 type external
set protocols bgp group TO-AS65301 import AS65301_COM_REWRITE // This import
policy for rewrite community value, this action will replace community which same with
community value inside AS.
set protocols bgp group TO-AS65301 family inet-vpn unicast //Enable inet-vpn family
set protocols bgp group TO-AS65301 peer-as 65301
set protocols bgp group TO-AS65301 neighbor 172.16.3.1 //Enable eBGP session between
R4-R6

set policy-options policy-statement AS65301_COM_REWRITE term 1 from community


target:65301:11
set policy-options policy-statement AS65301_COM_REWRITE term 1 then community delete
target:65301:11
set policy-options policy-statement AS65301_COM_REWRITE term 1 then community add
target:65302:11
set policy-options policy-statement AS65301_COM_REWRITE term 1 then accept
set policy-options policy-statement AS65301_COM_REWRITE term 2 from community
target:65301:22
set policy-options policy-statement AS65301_COM_REWRITE term 2 then community delete
target:65301:22
set policy-options policy-statement AS65301_COM_REWRITE term 2 then community add
target:65302:22
8
Download PNETLab Platform
PNETLAB Store
PNETLab.com

set policy-options policy-statement AS65301_COM_REWRITE term 2 then accept

Task 6
On R1
set routing-options static route 172.16.1.4/30 next-hop 172.16.1.2
On R2
set routing-options static route 172.16.2.4/30 next-hop 172.16.2.2
On R9
set routing-options static route 172.16.1.0/30 next-hop 172.16.1.5
On R10
set routing-options static route 172.16.2.0/30 next-hop 172.16.2.5

Check connection
On R1
root@R1> ping 172.16.1.6
PING 172.16.1.6 (172.16.1.6): 56 data bytes
64 bytes from 172.16.1.6: icmp_seq=0 ttl=60 time=8.903 ms
64 bytes from 172.16.1.6: icmp_seq=1 ttl=60 time=5.105 ms
64 bytes from 172.16.1.6: icmp_seq=2 ttl=60 time=4.167 ms
64 bytes from 172.16.1.6: icmp_seq=3 ttl=60 time=4.611 ms
64 bytes from 172.16.1.6: icmp_seq=4 ttl=60 time=4.491 ms

--- 172.16.1.6 ping statistics ---


5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 4.167/5.455/8.903/1.750 ms

root@R1>
On R2
root@R2> ping 172.16.2.6
PING 172.16.2.6 (172.16.2.6): 56 data bytes
64 bytes from 172.16.2.6: icmp_seq=0 ttl=60 time=4.472 ms
64 bytes from 172.16.2.6: icmp_seq=1 ttl=60 time=4.829 ms
64 bytes from 172.16.2.6: icmp_seq=2 ttl=60 time=4.801 ms

--- 172.16.2.6 ping statistics ---


3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 4.472/4.701/4.829/0.162 ms

root@R2>

9
Download PNETLab Platform
PNETLAB Store
PNETLab.com

On R9
root@R9> ping 172.16.1.1
PING 172.16.1.1 (172.16.1.1): 56 data bytes
64 bytes from 172.16.1.1: icmp_seq=0 ttl=60 time=5.000 ms
64 bytes from 172.16.1.1: icmp_seq=1 ttl=60 time=80.490 ms
64 bytes from 172.16.1.1: icmp_seq=2 ttl=60 time=5.132 ms

--- 172.16.1.1 ping statistics ---


3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 5.000/30.207/80.490/35.555 ms

root@R9>
On R10
root@R10> ping 172.16.2.1
PING 172.16.2.1 (172.16.2.1): 56 data bytes
64 bytes from 172.16.2.1: icmp_seq=0 ttl=60 time=4.473 ms
64 bytes from 172.16.2.1: icmp_seq=1 ttl=60 time=4.553 ms
64 bytes from 172.16.2.1: icmp_seq=2 ttl=60 time=6.938 ms

--- 172.16.2.1 ping statistics ---


3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 4.473/5.321/6.938/1.144 ms

root@R10>

10

You might also like