arp快取重新整理問題

2021-10-12 10:12:33 字數 2653 閱讀 4912

修改單個引數(直接 sysctl -w 修改即可)(永久生效

[root@ufo130 eth0]

# sysctl -w net.ipv4.neigh.eth0.base_reachable_time=5

net.ipv4.neigh.eth0.base_reachable_time = 5

[root@ufo130 eth0]

# [root@ufo130 eth0]

# cat base_reachable_time

5[root@ufo130 eth0]

# cat base_reachable_time_ms

5000

批量修改引數(修改/etc/sysctl.conf,載入即可)(永久生效

[root@ufo130 eth0]

# cat /etc/sysctl.conf | grep net.ipv4.neigh.eth0.base_reachable_time

net.ipv4.neigh.eth0.base_reachable_time = 10

[root@ufo130 eth0]

# /sbin/sysctl -p /etc/sysctl.conf

[root@ufo130 eth0]

# cat base_reachable_time

10[root@ufo130 eth0]

# cat base_reachable_time_ms

10000

arping 區域網重新整理(浮動ip飄到本網段的其他節點ip上)

# 新增浮動ip

[root@ufo130 eth0]

# ip a add 192.168.71.160/24 dev eth0

# 刪除浮動ip

[root@ufo130 eth0]

# ip a del 192.168.71.160/24 dev eth0

# ip a 檢視

# arping -i 網絡卡位址 -c 3 -s vip位址 閘道器位址

[root@ufo130 eth0]

# arping -i eth0 -c 3 -s 192.168.71.160 192.168.71.2

arping 192.168.71.2 from 192.168.71.160 eth0

unicast reply from 192.168.71.2 [00:50:56:ea:bd:c4] 3.136ms

unicast reply from 192.168.71.2 [00:50:56:ea:bd:c4] 0.879ms

unicast reply from 192.168.71.2 [00:50:56:ea:bd:c4] 0.994ms

sent 3 probes (1 broadcast(s)

)received 3 response(s)

檢視linux arp快取老化時間

cat

/proc/sys/net/ipv4/neigh/eth0/base_reachable_time

檢視linux arp快取狀態

[root@ufo130 eth0]

# ip neigh

192.168.71.1 dev eth0 lladdr 00:50:56:c0:00:08 reachable

192.168.71.2 dev eth0 lladdr 00:50:56:ea:bd:c4 stale

[root@ufo130 eth0]

# ip neigh

192.168.71.1 dev eth0 lladdr 00:50:56:c0:00:08 reachable

192.168.71.2 dev eth0 lladdr 00:50:56:ea:bd:c4 stale

[root@ufo130 eth0]

# arping -i eth0 -c 3 -s 192.168.71.130 192.168.71.2

arping 192.168.71.2 from 192.168.71.130 eth0

unicast reply from 192.168.71.2 [00:50:56:ea:bd:c4] 1.592ms

unicast reply from 192.168.71.2 [00:50:56:ea:bd:c4] 0.973ms

unicast reply from 192.168.71.2 [00:50:56:ea:bd:c4] 0.865ms

sent 3 probes (1 broadcast(s)

)received 3 response(s)

[root@ufo130 eth0]

# ip neigh

192.168.71.1 dev eth0 lladdr 00:50:56:c0:00:08 reachable

192.168.71.2 dev eth0 lladdr 00:50:56:ea:bd:c4 reachable

相關參考資料:

【linux實現的arp快取老化時間原理解析】

【虛擬ip理解】

angular 重新整理問題

從列表頁進入詳情頁,需要傳遞引數,列表頁使用 state.go inbox 詳情頁使用 stateparams.id獲取引數 1.第一種使用寫法 stateprovider state inbox controller urlcontroller template 對你有乙個問題是,到詳情頁後,如果...

arcEngine部分重新整理問題

esri.arcgis.carto.ilayer layer axmapcontrol1.get layer 0 esri.arcgis.carto.ifeatureselection selection layer as esri.arcgis.carto.ifeatureselection es...

QT介面重新整理問題

由於介面使用qstackedwidget來加入另外乙個widget,而此widget含有很多的專案,所以直接顯示則整個介面中其它含有子widget的qstackedwidget重新整理非常緩慢。這裡使用了乙個拙劣的方式。如下 this showminimized 整個介面最小化 qtimer sin...