LoginSignup
6
5

More than 5 years have passed since last update.

Mac同士をLAN接続して通信する

Posted at

2台を直結させるので、設営の現場なんかでルーターを減らせるというメリットありますね。

手順

  1. LANケーブルで2台を接続(最近のはストレートでも大丈夫
  2. それぞれ固定IPにする

システム設定>ネットワーク を開く
インターフェイスを選んで、ネットワーク上で一意なIPに手動で設定する。

1台目の設定

ip1.png

2台目の設定

ip2.png

疎通を確認する

arp コマンドとか、ping を通してみる

$ arp -a
? (10.0.0.1) at **:**:**:**:**:** on en5 ifscope [ethernet]
? (10.0.255.255) at ff:ff:ff:ff:ff:ff on en5 ifscope [ethernet]

UDPもとばしてみる

受信

nc -lu 8000

送信

date | nc -u 10.0.0.1 8000
6
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
5