#Configure Device3.
Device3#configure terminal
Device3(config)#router ospf 100
Device3(config-ospf)#network 2.0.0.0 0.0.0.255 area 0
Device3(config-ospf)#exit
|
#Query the route table of Device3.
Device3#show ip route
Codes: C - connected, S - static, R - RIP, O - OSPF, OE-OSPF External, M - Management
D - Redirect, E - IRMP, EX - IRMP external, o - SNSP, B - BGP, i-ISIS
Gateway of last resort is not set
O 1.0.0.0/24 [110/65536] via 2.0.0.1, 00:18:40, vlan2
C 2.0.0.0/24 is directly connected, 00:22:27, vlan2
-
The querying methods of Device1 and Device2 are the same as that of Device3, so the querying process is omitted.
Step 3: Configure the IPv6 over IPv4 manual tunnel.
#On Device1, configure IPv6 over IPv4 manual tunnel tunnel1, the source address is 1.0.0.1, the destination address is 2.0.0.2, and the IPv6 address is 10::1.
Device1(config)#interface tunnel 1
Device1(config-if-tunnel1)#tunnel mode ipv6ip
Device1(config-if-tunnel1)#tunnel source 1.0.0.1
Device1(config-if-tunnel1)#tunnel destination 2.0.0.2
Device1(config-if-tunnel1)#ipv6 address 10::1/64
Device1(config-if-tunnel1)#exit
|
#On Device3, configure IPv6 over IPv4 manual tunnel tunnel1, the source address is 2.0.0.2, the destination address is 1.0.0.1, and the IPv6 address is 10::2.
Device3(config)#interface tunnel 1
Device3(config-if-tunnel1)#tunnel mode ipv6ip
Device3(config-if-tunnel1)#tunnel source 2.0.0.2
Device3(config-if-tunnel1)#tunnel destination 1.0.0.1
Device3(config-if-tunnel1)#ipv6 address 10::2/64
Device3(config-if-tunnel1)#exit
|
#Query the IPv6 over IPv4 manual tunnel information of Device3.
Device3#show tunnel 1
Tunnel 1:
Tunnel mode is ipv6ip
Source ipv4 address is 2.0.0.2 (Source ipv4 address is up on source interface vlan2)
Destination ipv4 address is 1.0.0.1
Tunnel state is up
Encapsulation vrf is global(0x0)
TTL(time-to-live) is 255
TOS(type of service) is not set total(1)
-
The querying method of Device1is the same as that of Device3, so the querying process is omitted.
- When the tunnel is not in the same network segment, it is necessary to configure the static route to the peer tunnel on the devices at both ends of the tunnel, and the output interface is the tunnel interface.
Step 4: Configure the static route.
#On Device1, configure the static route to IPv6 Network2 with the egress interface tunnel1.
Device1(config)#ipv6 route 3002::/64 tunnel1
|
#On Device3, configure the static route to IPv6 Network1 with the egress interface tunnel1.
Device3(config)#ipv6 route 3001::/64 tunnel1
|
#Query the IPv6 route table of Device3.
Device3#show ipv6 route
Codes: C - Connected, L - Local, S - static, R - RIP, B - BGP, i-ISIS
U - Per-user Static route
O - OSPF, OE-OSPF External, M - Management
L ::1/128 [0/0]
via ::, 1w6d:20:35:50, lo0
C 10::/64 [0/0]
via ::, 00:03:31, tunnel1
L 10::2/128 [0/0]
via ::, 00:03:29, lo0
S 3001::/64 [1/100000]
via ::, 00:00:01, tunnel1
C 3002::/64 [0/0]
via ::, 00:00:06, vlan3
L 3002::1/128 [0/0]
via ::, 00:00:04, lo0