Dobry den,
moja sietova situacia vyzera cca takto:
--[ipv4net][router]----[ipv4net][pc1[ipv4net[virtual_pc]]]
ide o to, ze mam pc, v nom bezi cez xen virtualna masina a chcem, aby tato cela siet bola na ipv6.
spravil som na pc1 toto:
ip tunnel add tun6to4 mode sit remote 10.0.80.2 local 10.0.80.1 dev vif2.0
ip -6 addr add dev tun6to4 fec0:0:0:8::1/64
ifconfig tun6to4 up
takze spravil som tunel s jednym koncom na virtualnom rozhrani pre pc2 a nastavil som tomu ipv6 adresu.
pre uplnost, cely ifconfig pre pc1 vyzera takto:
pc1:/etc/rc2.d# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0c:6e:f4:f9:49
inet addr:10.0.0.80 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fec0::20c:6eff:fef4:f949/64 Scope:Site
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:489210 errors:0 dropped:4 overruns:0 frame:0
TX packets:363915 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:232222350 (221.4 MiB) TX bytes:45073790 (42.9 MiB)
Interrupt:23 Base address:0xa400
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:40298 errors:0 dropped:0 overruns:0 frame:0
TX packets:40298 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7385791 (7.0 MiB) TX bytes:7385791 (7.0 MiB)
tun6to4 Link encap:IPv6-in-IPv4
inet6 addr: fec0:0:0:8::1/64 Scope:Site
UP POINTOPOINT RUNNING NOARP MTU:1480 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:104 (104.0 B) TX bytes:124 (124.0 B)
vif2.0 Link encap:Ethernet HWaddr fe:ff:ff:ff:ff:ff
inet addr:10.0.80.1 Bcast:10.0.80.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:162410 errors:0 dropped:0 overruns:0 frame:0
TX packets:198517 errors:0 dropped:11 overruns:0 carrier:0
collisions:0 txqueuelen:32
RX bytes:23131498 (22.0 MiB) TX bytes:51781311 (49.3 MiB)
to iste som spravil vlastne aj na pc2, len s tym, ze koniec tunela bol v eth0. ifconfig vyzera nasledovne
pc2:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:3e:a3:ee:a8
inet addr:10.0.80.2 Bcast:10.0.80.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:205230 errors:0 dropped:0 overruns:0 frame:0
TX packets:166555 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:52385982 (49.9 MiB) TX bytes:26034871 (24.8 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:5415 errors:0 dropped:0 overruns:0 frame:0
TX packets:5415 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:760811 (742.9 KiB) TX bytes:760811 (742.9 KiB)
tun6to4 Link encap:IPv6-in-IPv4
inet6 addr: fec0:0:0:8::2/64 Scope:Site
UP POINTOPOINT RUNNING NOARP MTU:1480 Metric:1
RX packets:190 errors:0 dropped:0 overruns:0 frame:0
TX packets:306 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:19760 (19.2 KiB) TX bytes:37944 (37.0 KiB)
a teraz,
z pc2 mi ide ping6 na fec0:0:0:8::1 aj na fec0:0:0:8::2 ale nejde ping na fec0::1 co je adresa routera a taktiez nejde na fec0::20c:6eff:fef4:f949/64 co je fyzicke rozhranie pc1.
z pc1 mi ide ping na fec0::1 aj na fec0:0:0:8::1 a fec0:0:0:8::2 (aj na fec0::20c:6eff:fef4:f949).
routovacia tabulka na pc2 je
proto08-beta:~# route -A inet6
Kernel IPv6 routing table
Destination Next Hop Flag Met Ref Use If
fec0:0:0:8::/64 :: Un 256 0 197 tun6to4
::/0 :: !n -1 1 524 lo
::1/128 :: Un 0 1 364 lo
fec0:0:0:8::/128 :: Un 0 1 0 lo
fec0:0:0:8::2/128 :: Un 0 1 216 lo
ff00::/8 :: U 256 0 0 tun6to4
::/0 :: !n -1 1 524 lo
dakujem za radu