Configuring an LNS-to-LNS tunnel with BGP routes
This section shows the topology of a sample L2TPv3 LNS-to-LNS IPv4 tunnel with Border Gateway Protocol (BGP) configuration. To configure this sample LNS-to-LNS tunnel, perform the following steps in configuration mode.
- Configure the L2TPv3 tunnel settings and the LNS settings on the R1 router.
- Configure the L2TPv3 tunnel settings (Configuring the L2TPv3 tunnel interface settings on R1).
- Configure the BGP settings (Configuring the BGP settings of the LNS-to-LNS tunnel on R1).
- Configure the L2TPv3 tunnel settings and LNS settings on the R2 router.
- Configure the L2TPv3 tunnel settings (Configuring the L2TPv3 tunnel interface settings on R2).
- Configure the BGP settings (Configuring the BGP settings of the LNS-to-LNS tunnel on R2).
Configuring the L2TPv3 tunnel interface settings on R1 shows how to configure the L2TPv3 tunnel interface on R1.
Table 1. Configuring the L2TPv3 tunnel interface settings on R1 Step
Command
Specify IP as the encapsulation method to use for the lttp2222 L2TPv3 tunnel interface.
vyatta@vyatta# set interfaces l2tpeth lttp2222 l2tp-session encapsulation 'ip'
Specify the local IP address of the lttp2222 L2TPv3 tunnel interface.
vyatta@vyatta# set interfaces l2tpeth lttp2222 l2tp-session local-ip '100.3.1.1'
Specify the local session identifier of the lttp2222 L2TPv3 tunnel interface.
vyatta@vyatta# set interfaces l2tpeth lttp2222 l2tp-session local-session-id '1000000'
Specify the remote IP address of the lttp2222 L2TPv3 tunnel interface.
vyatta@vyatta# set interfaces l2tpeth lttp2222 l2tp-session remote-ip '200.3.1.1'
Specify the remote session identifier of the lttp2222 L2TPv3 tunnel interface.
vyatta@vyatta# set interfaces l2tpeth lttp2222 l2tp-session remote-session-id '1000000'
Specify the IP address of the tunnel interface to which the router is connected.
vyatta@vyatta# set interfaces l2tpeth lttp2222 address '2.2.2.1/29'
Commit the configuration.
vyatta@vyatta# commit
Save the configuration.
vyatta@vyatta# save
Configuring the BGP settings of the LNS-to-LNS tunnel on R1 shows how to configure the BGP settings for the tunnel on R1. For more information about configuring BGP settings, refer to BGP Reference Guide.
Table 2. Configuring the BGP settings of the LNS-to-LNS tunnel on R1 Step
Command
Specify the 44.44.44.0/24 network as the network to be advertised by the BGP routing process.
vyatta@vyatta# set protocols bgp 100 address-family ipv4-unicast network '44.44.44.0/24'
Direct the router to store received routing updates.
vyatta@vyatta# set protocols bgp 100 neighbor 2.2.2.2 address-family ipv4-unicast soft-reconfiguration 'inbound'
Specify 200 as the autonomous system (AS) number of the neighbor.
vyatta@vyatta# set protocols bgp 100 neighbor 2.2.2.2 remote-as '200'
Set the fixed BGP router ID for the router to 2.2.2.1. This setting overrides the automatic ID selection process.
vyatta@vyatta# set protocols bgp 100 parameters router-id '2.2.2.1'
Commit the configuration.
vyatta@vyatta# commit
Save the configuration.
vyatta@vyatta# save
Show the l2tpeth configuration.
vyatta@vyatta# run show l2tpeth L2tpeth interface: lttp2222 Port: 0, ifIndex: 19 Mac: 96:89:f9:e7:6e:d1 Addresses: inet 2.2.2.1/29, broadcast 2.2.2.7 inet6 fe80::9489:f9ff:fee7:6ed1/64, scope Link L2TPv3: Encap IP Local Address: 100.3.1.1 Peer Address: 200.3.1.1 Local Session: 2000000 Peer Session: 2000000 Local Cookie: 00 Peer Cookie: 00 Statistics: Input bytes : 191229 Output bytes : 144752 Input packets : 2314 Output packets : 1143 Input multicast : 107
Show the configuration information for lttp2222.
vyatta@vyatta# run show interfaces lttp2222 lttp2222: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1488 qdisc pfifo_fast state UNKNOWN group default qlen 1000 link/ether 96:89:f9:e7:6e:d1 brd ff:ff:ff:ff:ff:ff inet 2.2.2.1/29 brd 2.2.2.7 scope global lttp2222 valid_lft forever preferred_lft forever inet6 fe80::9489:f9ff:fee7:6ed1/64 scope link valid_lft forever preferred_lft forever RX: bytes packets errors dropped overrun mcast 86696 1082 0 0 0 0 TX: bytes packets errors dropped carrier collisions 85646 1118 0 0 0 0
Show a summary of the BGP settings.
vyatta@vyatta# run show ip bgp summary BGP router identifier 2.2.2.1, local AS number 100 BGP table version is 192 2 BGP AS-PATH entries 0 BGP community entries IPv4 Unicast address family: Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down Statd 2.2.2.2 4 200 383 383 192 0 0 03:10:16 1 Total number of neighbors 1
Show the BGP settings.
vyatta@vyatta# run show ip bgp BGP table version is 192, local router ID is 2.2.2.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, l - labeled S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 44.44.44.0/24 0.0.0.0 100 32768 i *> 55.55.55.0/24 2.2.2.2 0 0 200 i Total number of prefixes 2
Show the route information for the 55.55.55.2 system.
vyatta@vyatta# run show ip route 55.55.55.2 Routing entry for 55.55.55.0/24 Known via "bgp", distance 20, metric 0, best Last update 00:04:06 ago * 2.2.2.2, via lttp2222
Configuring the L2TPv3 tunnel interface settings on R2 shows how to configure the L2TPv3 tunnel interface on R2.
Table 3. Configuring the L2TPv3 tunnel interface settings on R2 Step Command Specify IP as the encapsulation method to use for the lttp2222 L2TPv3 tunnel interface.
vyatta@vyatta# set interfaces l2tpeth lttp2222 l2tp-session encapsulation 'ip'
Specify the local IP address of the lttp2222 L2TPv3 tunnel interface.
vyatta@vyatta# set interfaces l2tpeth lttp2222 l2tp-session local-ip '200.3.1.1'
Specify the local session identifier of the lttp2222 L2TPv3 tunnel interface.
vyatta@vyatta# set interfaces l2tpeth lttp2222 l2tp-session local-session-id '2000000'
Specify the remote IP address of the lttp2222 L2TPv3 tunnel interface.
vyatta@vyatta# set interfaces l2tpeth lttp2222 l2tp-session remote-ip '100.3.1.1'
Specify the remote session identifier of the lttp2222 L2TPv3 tunnel interface.
vyatta@vyatta# set interfaces l2tpeth lttp2222 l2tp-session remote-session-id '2000000'
Specify the IP address of the tunnel interface to which the router is connected.
vyatta@vyatta# set interfaces l2tpeth lttp2222 address '2.2.2.2/29'
Commit the configuration.
vyatta@vyatta# commit
Save the configuration.
vyatta@vyatta# save
Configuring the BGP settings of the LNS-to-LNS tunnel on R2 shows how to configure the BGP settings for the tunnel on R2. For more information about configuring BGP settings, refer to BGP Reference Guide.
Table 4. Configuring the BGP settings of the LNS-to-LNS tunnel on R2 Step Command Specify the 55.55.55.0/24 network as the network to be advertised by the BGP routing process.
vyatta@vyatta# set protocols bgp 100 address-family ipv4-unicast network '55.55.55.0/24'
Direct the router to store received routing updates.
vyatta@vyatta# set protocols bgp 100 neighbor 2.2.2.1 address-family ipv4-unicast soft-reconfiguration 'inbound'
Specify 100 as the AS number of the neighbor.
vyatta@vyatta# set protocols bgp 100 neighbor 2.2.2.1 remote-as '200'
Set the fixed BGP router ID for the router to 2.2.2.2. This setting overrides the automatic ID selection process.
vyatta@vyatta# set protocols bgp 100 parameters router-id '2.2.2.2'
Commit the configuration.
vyatta@vyatta# commit
Save the configuration.
vyatta@vyatta# save