Vyatta Network OS Documentation

Learn how to install, configure and operate the Vyatta NOS, which helps drive our virtual networking & physical platforms portfolio.

Configure WEST

The GRE tunnel in the sample configuration extends from WEST through the wide-area network to EAST. In this example, you create the tunnel interface and the tunnel endpoint on WEST.

  • The tun0 tunnel interface on WEST is assigned the 10.20.20.1 IP address on 10.20.20.0/24 network.
  • The source IP address of the tunnel endpoint (local-ip) is the same as the address associated with the loopback interface (lo) in this example.
  • The IP address of the other end of the tunnel (remote-ip) is the address of the loopback interface on EAST.
  • A static route is created to specify how to get to the remote LAN through the tunnel.

Creating a basic GRE tunnel endpoint on WEST shows how to create the tunnel interface and the tunnel endpoint on WEST. To do this, perform the following steps on WEST in configuration mode.

Table 1. Creating a basic GRE tunnel endpoint on WEST

Step

Command

Create the tunnel interface, and specify the IP address to be associated with it.


vyatta@WEST# set interfaces tunnel tun0 address 10.20.20.1/24

Specify the source IP address for the tunnel.


vyatta@WEST# set interfaces tunnel tun0 local-ip 10.10.1.1

Specify the IP address of the other end of the tunnel.


vyatta@WEST# set interfaces tunnel tun0 remote-ip 10.10.1.2

Specify the encapsulation mode for the tunnel.


vyatta@WEST# set interfaces tunnel tun0 encapsulation gre

Assign a brief description to the tunnel interface.


vyatta@WEST# set interfaces tunnel tun0 description “GRE tunnel to EAST”

Commit the configuration.


vyatta@WEST# commit

View the configuration.


vyatta@WEST# show interfaces tunnel tun0
	address 10.20.20.1/24
	description “Tunnel to EAST”
	encapsulation gre
	local-ip 10.10.1.1
	remote-ip 10.10.1.2

Create a static route to access the remote subnet through the tunnel.


vyatta@WEST# set protocols static route 192.168.60.0/24 next-hop 10.20.20.2

Commit the configuration.


vyatta@WEST# commit

View the configuration.


vyatta@WEST# show protocols
	static {
		route 192.168.60.0/24 {
			next-hop 10.20.20.2 {
			}
		}
	}