This example shows how to configure a generic routingencapsulation (GRE) tunnel interface between PE routers to provideVPN connectivity. You can use this configuration to tunnel VPN trafficacross a non-MPLS core network. The network topology used in thisexample is shown in Figure 3. The P routersshown in this illustration do not run MPLS.
Figure 3: PE Routers A and D Connected by aGRE Tunnel Interface
For configuration information, see the following sections:
- Configuring the Routing Instance on Router A
- Configuring the Routing Instance on Router D
- Configuring MPLS, BGP, and OSPF on Router A
- Configuring MPLS, BGP, and OSPF on Router D
- Configuring the Tunnel Interface on Router A
- Configuring the Tunnel Interface on Router D
- Configuring the Routing Options on Router A
- Configuring the Routing Options on Router D
- Configuration Summary for Router A
- Configuration Summary for Router D
Configuring the Routing Instance on Router A
Configure a routing instance on Router A:
[edit routing-instances]gre-config { instance-type vrf; interface fe-1/0/0.0; route-distinguisher 10.255.14.176:69; vrf-import import-config; vrf-export export-config; protocols { ospf { export import-config; area 0.0.0.0 { interface all; } } }}
Configuring the Routing Instance on Router D
Configure a routing instance on Router D:
[edit routing-instances]gre-config { instance-type vrf; interface fe-1/0/1.0; route-distinguisher 10.255.14.178:69; vrf-import import-config; vrf-export export-config; protocols { ospf { export import-config; area 0.0.0.0 { interface all; } } }}
Configuring MPLS, BGP, and OSPF on Router A
Although you do not need to configure MPLS on the P routersin this example, it is needed on the PE routers for the interfacebetween the PE and CE routers and on the GRE interface (gr-1/1/0.0
) linking the PE routers (Router A and Router D). Configure MPLS,BGP, and OSPF on Router A:
[edit protocols]mpls { interface all;}bgp { group pe-to-pe { type internal; neighbor 10.255.14.178 { family inet-vpn { unicast; } } }}ospf { area 0.0.0.0 { interface all; interface gr-1/1/0.0 { disable; } }}
Configuring MPLS, BGP, and OSPF on Router D
Although you do not need to configure MPLS on the P routersin this example, it is needed on the PE routers for the interfacebetween the PE and CE routers and on the GRE interface (gr-1/1/0.0
) linking the PE routers (Router D and Router A). Configure MPLS,BGP, and OSPF on Router D:
[edit protocols]mpls { interface all;}bgp { group pe-to-pe { type internal; neighbor 10.255.14.176 { family inet-vpn { unicast; } } }}ospf { traffic-engineering; area 0.0.0.0 { interface all; interface fxp0.0 { disable; } interface gr-1/1/0.0 { disable; } }}
Configuring the Tunnel Interface on Router A
Configure the tunnel interface on Router A (the tunnel is unnumbered):
[edit interfaces interface-name]unit 0 { tunnel { source 10.255.14.176; destination 10.255.14.178; } family inet; family mpls;}
Configuring the Tunnel Interface on Router D
Configure the tunnel interface on Router D (the tunnel is unnumbered):
[edit interfaces interface-name]unit 0 { tunnel { source 10.255.14.178; destination 10.255.14.176; } family inet; family mpls;}
Configuring the Routing Options on Router A
As part of the routing options configuration for Router A, youneed to configure routing table groups to enable VPN route resolutionin the inet.3 routing table.
Configure the routing options on Router A:
[edit routing-options]interface-routes { rib-group inet if-rib;}rib inet.3 { static { route 10.255.14.178/32 next-hop gr-1/1/0.0; }}rib-groups { if-rib { import-rib [ inet.0 inet.3 ]; }}
Configuring the Routing Options on Router D
As part of the routing options configuration for Router D, youneed to configure routing table groups to enable VPN route resolutionin the inet.3 routing table.
Configure the routing options on Router D:
[edit routing-options]interface-routes { rib-group inet if-rib;}rib inet.3 { static { route 10.255.14.176/32 next-hop gr-1/1/0.0; }}rib-groups { if-rib { import-rib [ inet.0 inet.3 ]; }}
Configuration Summary for Router A
Configure the Routing Instance
gre-config { instance-type vrf; interface fe-1/0/0.0; route-distinguisher 10.255.14.176:69; vrf-import import-config; vrf-export export-config; protocols { ospf { export import-config; area 0.0.0.0 { interface all; } } }}
Configure MPLS
mpls { interface all;}
Configure BGP
bgp { traceoptions { file bgp.trace world-readable; flag update detail; } group pe-to-pe { type internal; neighbor 10.255.14.178 { family inet-vpn { unicast; } } }}
Configure OSPF
ospf { area 0.0.0.0 { interface all; interface gr-1/1/0.0 { disable; } }}
Configure the Tunnel Interface
interface-name { unit 0 { tunnel { source 10.255.14.176; destination 10.255.14.178; } family inet; family mpls; }}
Configure Routing Options
interface-routes { rib-group inet if-rib;}rib inet.3 { static { route 10.255.14.178/32 next-hop gr-1/1/0.0; }}rib-groups { if-rib { import-rib [ inet.0 inet.3 ]; }}
Configuration Summary for Router D
Configure the Routing Instance
gre-config { instance-type vrf; interface fe-1/0/1.0; route-distinguisher 10.255.14.178:69; vrf-import import-config; vrf-export export-config; protocols { ospf { export import-config; area 0.0.0.0 { interface all; } } }}
Configure MPLS
mpls { interface all;}
Configure BGP
bgp { group pe-to-pe { type internal; neighbor 10.255.14.176 { family inet-vpn { unicast; } } }}
Configure OSPF
ospf { traffic-engineering; area 0.0.0.0 { interface all; interface fxp0.0 { disable; } interface gr-1/1/0.0 { disable; } }}
Configure the Tunnel Interface
interface-name { unit 0 { tunnel { source 10.255.14.178; destination 10.255.14.176; } family inet; family mpls; }}
Configure the Routing Options
interface-routes { rib-group inet if-rib;}rib inet.3 { static { route 10.255.14.176/32 next-hop gr-1/1/0.0; }}rib-groups { if-rib { import-rib [ inet.0 inet.3 ]; }}