Howto PC-to-PC direct connect with strait ether-cable.
片方でもNICがMDI-XをサポートしていればストレートEtherケーブルを繋いで通信可能。
+-----+ ether cable +--------+
| p70 |--------------| sh76en |
+-----+ +--------+
hostname | interface | ipaddr | MDI-X |
---|---|---|---|
p70 | enp0s31f6 | 10.2.64.1 | on (auto) |
sh76en | enp10s0 | 10.2.64.10 | N/A |
sh76en% ethtool enp10s0 | grep MDI-X
# No MDI-X capability
sh76en% sudo ifconfig enp10s0 10.2.64.10/8
sh76en% sudo route add -host 10.2.64.1 dev enp10s0
sh76en% route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.2.64.1 0.0.0.0 255.255.255.255 UH 0 0 0 enp10s0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 enp10s0
(snip)
p70% ethtool enp0s31f6 | grep MDI-X
MDI-X: on (auto)
p70% sudo ifconfig enp0s31f6 10.2.64.1/8
p70% sudo route add -host 10.2.64.10 dev enp0s31f6
p70% route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 enp0s31f6
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 enp0s31f6
OK