Connect PC1 (Adaptor 1) to PC2 (Adaptor 2) with ethernet crossover cable
(PC2's Adaptor 1 will not be used yet)
Log in as root.
You must now set up your IPv4 configuration. This can be performed easily
with linuxconf. For the fields that contain hostnames and globally-scoped
addresses, please enter your own information:
PC 1: Config->Networking->Client tasks->Basic Host Information:
Enabled: on
Config mode: manual
Primary name + domain: pc2.markosoft.net
Aliases: pc2
IP Address: 192.168.1.2
Netmask: 255.255.255.0
Net device: eth1
Kernel module: tulip
Config->Networking->Client tasks->Name server specification:
DNS Usage: off
(All other fields): blank
Config->Networking->Client tasks->Routing and gateways->Set Defaults:
Default gateway: blank
Enable routing: off
Activate the changes and quit linuxconf
Load the IPv6 module and make sure that it loaded:
# modprobe ipv6
# lsmod
On both PCs, determine IPv6 configuration:
# ifconfig
You are looking for the lines that say "inet6 addr". For eth0/eth1, these
are your automatically assigned link-local addresses. For the next step,
you will only be using the address from eth0 on PC 1 and eth1 on PC 2.
You must now set up symbolic names for your interfaces/hosts in order for
the IPv6 stack to work and to simplify commands. On both PCs, add the following
lines to /etc/hosts, replacing the text in brackets with the appropriate
addresses:
192.168.1.1 pc1.markosoft.net pc1
192.168.1.2 pc2.markosoft.net pc2
::1
ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
<PC 1 eth0 link-local> pc1-linklocal
<PC 2 eth1 link-local> pc2-linklocal
NOTE: linuxconf will erase any ipv6 addresses in this file, so
be sure to add these lines again if you run it.
In order for PC 2 to know which interface is connected to PC 1, you must
set up a route on PC 2. Run the following command on PC 2 ONLY:
# route -A inet6 add <PC 1 eth0 link-local>/128 gw <PC
1 eth0 link-local> dev eth1
Execute the following command on PC 2:
# route -A inet6
Verify that the routing table resembles the following (the line in bold
is the critical one):
Kernel IPv6 routing table
Destination
Next Hop
Flags Metric Ref Use Iface ::1/128
::
U 0 10
0 lo fe80::2a0:ccff:fe34:4be1/128 fe80::2a0:ccff:fe34:4be1
UGH 1 1
0 eth1 fe80::2a0:ccff:fe56:1fde/128 ::
U 0 112
0 lo fe80::2a0:ccff:fe5d:23c4/128 ::
U 0 3
0 lo fe80::/10
::
UA 256 0
0 eth0 fe80::/10
::
UA 256 0
0 eth1 ff00::/8
::
UA 256 0
0 eth0 ff00::/8
::
UA 256 0
0 eth1 ::/0
::
UDA 256 0
0 eth0 ::/0
::
UDA 256 0
0 eth1
If you made an error in your routing configuration, you must remove the
incorrect route(s) before you try again. Deleting routes using the route
command often doesn't work, so you might have to reset the interface that
is associated with the incorrect route:
# ifconfig <interface> down
# ifconfig <interface> up
Make sure that your servers are running. On BOTH PCs:
# killall inetd
# killall xinetd
# xinetd
# /etc/rc.d/init.d/httpd restart
If httpd tries to start and fails, make sure that httpd.conf has
no errors (look at /var/log/messages and /var/log/httpd/error_log
for errors)
If httpd hangs while starting, make sure that you have no nameserver
configured and that "DNS usage" is turned off in linuxconf (remember,
you must check your /etc/hosts and routing table after activating
changes with linuxconf.
Testing procedures:
NOTE: If you want, you can execute the following command in a separate
window to view TCP traffic on a particular interface:
# tcpdump -i <interface>
We will first ensure that the PCs are connected and configured properly.
On BOTH PCs:
# ping localhost
# ping pc1
# ping pc2
# ping6 ip6-localhost
# ping6 pc1-linklocal
# ping6 pc2-linklocal
If you cannot ping6 pc1-linklocal from PC 2, make sure the route
you set up is correct.
If none of the ping/ping6 commands work, make sure that
your /etc/hosts file is correct.
Now try the finger command. On BOTH PCs:
# finger @pc1
# finger @pc2
# finger @pc1-linklocal
# finger @pc2-linklocal
If finger doesn't work, make sure that xinetd is running,
that /etc/xinetd.conf has an entry for the finger server, and
that the Netkit package is installed correctly. Look in /var/log/messages
for xinetd errors.
Now try the telnet command. To exit a telnet session
hit <Ctrl>-] and then type "quit". On BOTH PCs:
# telnet pc1
# telnet pc2
# telnet pc1-linklocal
# telnet pc2-linklocal
If you get a "connection refused", kill and restart xinetd on
the host you are trying to telnet to. If it still doesn't work, check your
xinetd.conf.
Look in /var/log/messages for xinetd errors.
Finally, we will test the networking performance. On PC 2, create a dummy
10 MB file in the HTTP server's document root directory (usually /home/httpd/html/):
# cd <document root>
# dd if=/dev/zero of=bigfile.aaa count=20000
# chmod 777 bigfile.aaa
Now connect to the HTTP server on PC 2 from PC 1. First, try it with pc2
as the address and then with pc2-linklocal:
# telnet <addr> 80
GET /bigfile.aaa HTTP/1.0<CR><CR>
The amount of time between pressing the second <CR>
and when the server closes the connection is the transfer time. The times
here were 4 seconds using IPv4 (pc2) and 5 seconds using IPv6 (pc2-linklocal).