OpenWRT 新增靜態ARP ARP繫結

2021-08-14 16:38:00 字數 837 閱讀 9176

在路由器上為我的主機新增一條靜態arp條目

arp

-s 192.168

.1.99 00:24

:1d:d4

:a1:e8

arp-i

br-lan

-s 192.168

.1.99 00:24

:1d:d4

:a1:e8

或者

ip

neigh

add 192.168

.1.99

lladdr 00:24

:1d:d4

:a1:e8

nudpermanent

devbr-lan

(nud permanent表明是永久性的,除非你手動刪除這個條目, 或者系統重啟)

用arp -s 命令設定過後, ip neigh show 就顯示 permanent 了

cat /proc/net/arp 顯示 flags 為 6

前提是 busybox必須包含了 arp 這兩個命令, 預設情況下arp命令只能檢視,不能修改arp表

編譯是, 在 base system –> busybox –> network utilities 下 選中arp

busybox中ip 命令不夠完整

必須安裝 iproute2 (就是 ip命令)

顯示arp條目的命令是

arp -a
或者

ip neigh show

完整的arp命令在 net-tools 中實現

openwrt之新增OpenWrt軟體包概述

新增軟體包 makefile引入檔案 openwrt 使用三個 makefile 的子檔案,分別為 include topdir rules.mk include include dir kernel.mk include include dir package.mk 由這些 makefile 子檔...

openwrt 新增web介面

要給自己的開發板新增上 web 介面,只需要在 openwrt原始碼中,將 luci 配置進去即可。首先進入 openwrt原始碼頂層目錄,然後執行 make menuconfig 命令。sz yy szyy pc home linux openwrt trunk make menuconfig 然...

OpenWRT新增 crontab開機預設執行

openwrt系統預設已經新增了crond,只是沒有配置預設配置引數,致使服務起不來。1.修改啟動指令碼 etc ini.d cron etc rc.d s50cron為 etc ini.d cron的鏈結 bin sh etc rc.common start 50 service use pid ...