Adding a GRE Tunnel
If the configuration files are available, GRE tunnels can be added to the configuration files by adding two tunnel interfaces and specifying the tunnel source and destination, and then importing the configuration files as described in Importing GRE Tunnel Information from Router Configuration Files.
However, if the configuration files are not available, a what-if study can still be performed by adding the GRE tunnel interfaces, tunnels, and corresponding GRE link through the Java interface as explained below.
Assigning IP addresses to nodes/Interfaces
Before starting, IP addresses should be assigned to the nodes/interfaces that will be used as the source and destination of the GRE tunnel.
Select the Modify button to enter Modify action mode.
To add an IP address for a node, select Modify > Elements > Nodes and double-click a node entry. In the Properties tab, fill in the IP address field and click OK.
To add an interface, select Modify > Elements > Interfaces and click the Add button. Enter in the interface name according to the convention of the hardware vendor of the router. Then enter the router it resides on and the interface IP address and click OK.
Adding a GRE Tunnel Interface
Select the Modify button to enter Modify action mode. Then select Modify > Elements > Interfaces...
Next, add two interfaces for the GRE tunnels, one at each end node of the tunnel. Note that vendor-specific naming conventions should be followed here, e.g., Tunnel1 for Cisco, or gr-1/0/2 for Juniper.
Adding a GRE Tunnel
Select Modify > Elements > Tunnels... and select Add > One Tunnel.
Use the same name for the Tunnel ID that was used for the GRE interface, and use the same case, as this field is case-sensitive. Then select the source and destination nodes of the tunnel.
Add, “GRE,SOURCE=<ip-address | interface_name>” to the comma-separated Type field, using the name or IP-address of the interface or the IP-address of the node that will be the GRE tunnel source, e.g. GRE,SOURCE=172.16.1.3 or GRE,SOURCE=FastEthernet1/1. This IP address or interface name should either be defined on the node or interface as explained in Assigning IP addresses to nodes/Interfaces on page 163.
Click the Location tab and enter in the IP address of the destination node.
The Bandwidth (BW) field can be set to 0.
Create another tunnel for the reverse direction.
Adding a GRE Link
Associated with the GRE tunnel pair should be a GRE link that can be advertised to the IGP to be used for routing. The following steps indicate how to add a GRE link through the Java interface.
Select Modify > Elements > Links... and click “Add...” in the resulting window to open the Add Link window.
Provide a name for the GRE link. For the Trunk field, select GRELINK.
Select the Location tab. Click the “...” button next to the Interface A field and select the GRE tunnel for the A->Z direction. Click the “...” button next to the Interface Z field and select the GRE tunnel for the A->Z direction. If the GRE tunnel does not appear in the list, make sure that the GRE tunnel interfaces are named according to the convention of the appropriate hardware vendor.
Select the Protocols tab to specify the IGP that this tunnel is advertised to. Set the desired IGP protocol to “Yes.” If no protocol is selected, then no demand will route over this link unless a static routing table is entered setting the next hop to the GRE tunnel.
Click the Design mode button to switch to Design mode.
Troubleshooting a GRE Link/Tunnel Definition
If the GRE tunnel and link are defined correctly, the GRELINK status should be “Planned.” If not, check the Console window for diagnostics messages. The two interfaces of the link need to be associated with GRE tunnels of the same name and those GRE tunnels should be routed. Check that the tunnel name has the same case as the interface (e.g., Tunnel1 notTUNNEL1).
If the GRE tunnel is not routed due to the fact of incomplete network information, i.e., missing configuration files, you can force the link to be treated as a normal link. First save the network using File>Save Network... and close the network. Then edit the dparam.<runcode> file from the File Manager, and set virtualgrelink=0. Then reopen the network and check that the statuses of links with trunktype GRELINK status are no longer “Deleted.”
Using Static Routes to Route over a GRE Tunnel
Select Modify > Protocols > Static Route Table.. and then click “Add.”
For the Node field, select the tunnel’s source node.
Select a destination node and admin weight.
For the Next Hop, select the radio button for Tunnel and then select the GRE tunnel at the node.
Note that for the static route to be used, the demands that will take the static route must include an IP address for the destination node in the Demand window’s Location tab.