Configuring switch B for manual 6in4 tunneling

Procedure
  1. Configure the Tunnel endpoint for Switch B

    The tunnel endpoint for Switch B is configured with:

    1. Mode-6in4
    2. Source-encapsulation information for the IPv4 header indicating the source IPv4 address
    3. Destination-encapsulation information for the IPv4 header indicating the destination IPv4 address
    4. IPv6 Address-IPv6 network assigned to the interface (much like VLAN assignments). Enables IPv6 on the interface. It is required in order to route over the interface. To configure a tunnel endpoint:
      Switch(config)# interface tunnel 1
      Switch(tunnel-1)# tunnel mode 6in4
      Switch(tunnel-1)# tunnel source 20.0.0.1
      Switch(tunnel-1)# tunnel destination 30.0.0.1
      Switch(tunnel-1)# ipv6 address 5000::1/64
      5000::1/64 is the IPv6 network assigned to the interface. Enables IPv6 on the interface.
  2. Configure VLAN 2 for the IPv6 Hosts on the 3000::/64 Network

    This step configures IPv6 address 3000::1/64 on VLAN 2. When IPv6 traffic from IPv6 host 3000::2/64 that is destined for the IPv6 4000::/64 network is transported over VLAN 2, it will be routed into the tunnel.

    The command is executed in VLAN context.

    Switch(config)# vlan 2
    Switch(vlan-2)# ipv6 address 3000::1/64
  3. Configure IPv6 Routing to Route into the Tunnel

    IPv6 unicast routing is enabled. The static route is configured to route packets destined for the 4000::/64 network into the tunnel.

    Switch(config)# ipv6 unicast routing
    Switch(config)# ipv6 route 4000::/64 1 5000::2 2

    1 Configures static route for destinations in the 4000::/64 network

    2 IPv6 address of tunnel endpoint

  4. Configure the VLAN Used to Reach the First Hop Router in the IPv4 Network

    This step configures the tunnel endpoint IPv4 address 20.0.0.1/24 (VLAN 1) in VLAN 2 context so that traffic from VLAN 2 can reach the first hop router in the IPv4 network through the tunnel.

    The command is performed in VLAN context.

    Switch(vlan-2)# ip address 20.0.0.1/24
  5. Configure the IPv4 Default Gateway

    The IPv4 default gateway 20.0.0.2 is configured.

    Switch(config)# ip default-gateway 20.0.0.2