arp -aはKali Linuxから1つのデバイスしか返しませんか?

arp -aはKali Linuxから1つのデバイスしか返しませんか?

Kali Linux Live USBを実行しています。私は最近Wi-Fiネットワークに接続できませんでしたが、ネットワークに接続して問題なくインターネットを利用できるようにするWi-Fiアダプタを見つけました。ただし、端末を開いて実行すると、arp -aIPアドレスを持つデバイスが1つだけ表示されます192.168.86.1。これがUSBの「IPアドレス」なのか、アダプターやルーターに属しているのかはわかりませんが、ネットワークに接続されている他のデバイスがあることを知っているにもかかわらず見ることはできません。

ベストアンサー1

これキャッシュが新鮮ですあなたのデバイスから。

説明する


ライブブートイメージは非永続的にキャッシュされます(キャッシュされていないスリングキャッシュ)。後でこの問題を回避するには、ファイル永続性を備えたUSBイメージを設定します。

あなたの修正これは毎回実行する必要があります。または起動時にネットワーク検索プロトコルの種類を実行してアドレスを取得する必要があります。

つまり、ルーターとモデムとのみ通信します。アップデートが必要です。 ARPはキャッシュから読み取られます。


全長DR

IP プロトコルのキャッシュをリセットするには、次のコマンドを実行します。


    ip link set arp off dev eth0 ; ip link set arp on dev eth0

完了したら、このcopypastaを実行してインターフェースを解決してください。


    interfaces=$(
      arp -n | awk '
        NR == 1 {next}
        {interfaces[$5]+=1}
        END {for (interface in interfaces){print(interface)}}
      '
    );
    for interface in $interfaces; do
      echo "Clearing ARP cache for $interface";
      sudo ip link set arp off dev $interface;
      sudo ip link set arp on  dev $interface;
    done

TLDR #2

永続性を許可しないと、USBで書き込みキャッシュ(私が知っている矛盾語)が無効になる可能性があります。

Linuxでキャッシュを書き込む

Ctrl+Alt+T を押して端末を起動します。


    Run sudo gedit /etc/hdparm.conf

write_cacheを見つけて、前の#を削除してください。コンピュータを保存して再起動します。


次のステップは

***切迫した人にのみ***


FROM ARP MAN PAGE



-D, --use-device
              Instead of a hw_addr, the given argument is the name of an
              interface.  arp will use the MAC address of that interface
              for the table entry. This is usually the best option to
              set up a proxy ARP entry to yourself.

      -i If, --device If
              Select an interface. When dumping the ARP cache only
              entries matching the specified interface will be printed.
              When setting a permanent or temp ARP entry this interface
              will be associated with the entry; if this option is not
              used, the kernel will guess based on the routing table.
              For pub entries the specified interface is the interface
              on which ARP requests will be answered.
              NOTE: This has to be different from the interface to which
              the IP datagrams will be routed.  NOTE: As of kernel 2.2.0
              it is no longer possible to set an ARP entry for an entire
              subnet. Linux instead does automagic proxy arp when a
              route exists and it is forwarding. See arp(7) for details.
              Also the dontpub option which is available for delete and
              set operations cannot be used with 2.4 and newer kernels. 

ARP はキャッシュからエントリを読み込みます。キャッシュを更新するか、別のキャッシュを指すライブイメージを作成してみてください(上記を参照)。

おすすめ記事