Creating two GRE tunnels to different destination addresses

This example creates two GRE tunnels to different destination addresses. Traffic from network 1 can reach either network 2 or network 3 using the appropriate tunnel.

Procedure
  1. On switch 1:
    1. Enable interface 1/1/1 and assign the IP address 10.1.1.1/24 to it.
      switch# config
      switch(config)# interface 1/1/1
      switch(config-if)# ip address 10.1.1.1/24
      switch(config-if)# no shutdown
    2. Enable interface 1/1/2 and assign the IP address 180.1.10.2/24 to it.
      switch# config
      switch(config)# interface 1/1/2
      switch(config-if)# ip address 180.1.10.2/24
      switch(config-if)# no shutdown
      switch(config-if)# exit
    3. Enable interface 1/1/3 and assign the IP address 30.1.1.1/24 to it.
      switch# config
      switch(config)# interface 1/1/3
      switch(config-if)# 30.1.1.1/24
      switch(config-if)# no shutdown
      switch(config-if)# exit
    4. Create GRE tunnel 10 and assign the IP address 192.168.10.1/24, source address 10.1.1.1, and destination address 20.1.1.1 to it.
      switch(config)# interface tunnel 10 mode gre ipv4
      switch(config-gre-if)# ip address 192.168.10.1/24
      switch(config-gre-if)# source ip 10.1.1.1
      switch(config-gre-if)# destination ip 20.1.1.1
      switch(config-gre-if)# no shutdown
      switch(config-gre-if)# exit
    5. Create GRE tunnel 20 and assign the IP address 192.168.20.1/24, source address 30.1.1.1, and destination address 40.1.1.1 to it.
      switch(config)# interface tunnel 20 mode gre ipv4
      switch(config-gre-if)# ip address 192.168.20.1/24
      switch(config-gre-if)# source ip 30.1.1.1
      switch(config-gre-if)# destination ip 40.1.1.1
      switch(config-gre-if)# no shutdown
      switch(config-gre-if)# exit
    6. Defines routes so that traffic from network 1 can reach network 2 through tunnel 10.
      switch(config)# ip route 20.1.1.0/24 10.1.1.2
      switch(config)# ip route 190.1.10.0/24 tunnel10
    7. Defines routes so that traffic from network 1 can reach network 3 through the tunnel 20.
      switch(config)# ip route 40.1.1.0/24 30.1.1.2
      switch(config)# ip route 200.1.10.0/24 tunnel20
  2. On switch 2:
    1. Enable interface 1/1/1 and assign the IP address 20.1.1.1/24 to it.
      switch# config
      switch(config)# interface 1/1/1
      switch(config-if)# ip address 20.1.1.1/24
      switch(config-if)# no shutdown
    2. Enable interface 1/1/2 and assign the IP address 190.1.10.2/24 to it.
      switch(config)# interface 1/1/2
      switch(config-if)# ip address 190.1.10.2/24
      switch(config-if)# no shutdown
      switch(config-if)# exit
    3. Create GRE tunnel 10 and assign the IP address 192.168.10.2/24, source address 20.1.1.1, and destination address 10.1.1.1 to it.
      switch(config)# interface tunnel 10 mode gre ipv4
      switch(config-gre-if)# ip address 192.168.10.2/24
      switch(config-gre-if)# source ip 20.1.1.1
      switch(config-gre-if)# destination ip 10.1.1.1
      switch(config-gre-if)# no shutdown
      switch(config-gre-if)# exit
    4. Defines routes so that traffic from network 2 can reach network 1 through tunnel 10.
      switch(config)# ip route 10.1.1.0/24 20.1.1.2
      switch(config)# ip route 180.1.10.0/24 tunnel10
  3. On switch 3:
    1. Enable interface 1/1/1 and assign the IP address 40.1.1.1/24 to it.
      switch# config
      switch(config)# interface 1/1/1
      switch(config-if)# ip address 40.1.1.1/24
      switch(config-if)# no shutdown
    2. Enable interface 1/1/2 and assign the IP address 200.1.10.2/24 to it.
      switch(config)# interface 1/1/2
      switch(config-if)# ip address 200.1.10.2/24
      switch(config-if)# no shutdown
      switch(config-if)# exit
    3. Create GRE tunnel 20 and assign the IP address 192.168.20.2/24, source address 40.1.1.1, and destination address 30.1.1.1 to it.
      switch(config)# interface tunnel 10 mode gre ipv4
      switch(config-gre-if)# ip address 192.168.20.2/24
      switch(config-gre-if)# source ip 40.1.1.1
      switch(config-gre-if)# destination ip 30.1.1.1
      switch(config-gre-if)# no shutdown
      switch(config-gre-if)# exit
    4. Defines routes so that traffic from network 3 can reach network 1 through tunnel 20.
      switch(config)# ip route 30.1.1.0/24 40.1.1.2
      switch(config)# ip route 180.1.10.0/24 tunnel20