ApexRon
Very Senior Member
You can if one only responds to a specific port and intercepts packetCan't have two devices with the same IP on the same network.
You can if one only responds to a specific port and intercepts packetCan't have two devices with the same IP on the same network.
Not doing that, other things can "break", rather than this its better to solve the underlying issue that would make a reboot necessary in my opinion...Routers run better if you reboot them everyday. You can setup your router to reboot everyday at 4am in the ASUS UI.
I have gone as far as purchased a Meross Smart Plugs that turns my routers off at 4:00am and back on at 4:01am.
I also purchased a notebook fan for my routers that reduce the router temperature by 15c hence my network runs super smooth everyday.
I may have investigated the same problem, but my devices are different. I have an EdgeRouter Pro router and a Technicolor CGA4236TCH1 cable modem. Cable modems sold by ISPs receive firmware updates. The interval can be 10 or 14 days. In bridged mode, the cable modem's internet traffic can stop when the ISP tries to update the firmware. A network analyzer shows an ARP query. The router asks for the ISP's gateway MAC address every second. The router never gets a response to the query. Because of this, the internet does not work, but the LEDs still blink.Losing internet every 10 days or so with Telus ISP and RT-AX86U (Merlin 3004.388.8_4)
Don't think it has anything to do with my ISP (Telus Fibre) with Network Access Hub - Arcadyan NH20A in Bridge mode.
I simply can't reach any websites anymore, no errors on router LOG, all devices still connected to the router and I can access the router interface via LAN...
I think it is the modem (in bridge mode) changing the IP address and the router staying on the previous public WAN IP.... so I am wondering what
changes I would need to do on the router, maybe setting up from scratch?
After a router reboot everything works again...
# /config/scripts/arpcheck-eth0.sh script version v0.4
#
# The ISP cable modem's automatic firmware update attempts are
# once or twice a week and the ARP traffic always gets stuck.
# The EdgeRouter's ARP traffic no longer receives responses
# from the ISP when the ARP traffic stops working on a bridged
# connection. This script will fix the connection problem
# automatically. DHCP release and renew fix the ARP problem.
#
# Add system PATH explicitly for cron
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Network interface to check
ETH="eth0"
# Failover 1 interface to check
F1_ETH="eth1"
# Syslog tag for all logger messages
SYSLOG_TAG="arpcheck"
# External IP to test Internet connectivity (Google DNS)
TARGET="8.8.8.8"
TARGET2="1.1.1.1"
# Start value for MAC, GETEWAY & IPADDR
MAC=""
GATEWAY=""
IPADDR=""
# First failover 1 connectivity test via $F1_ETH
if ping -c 1 -I $F1_ETH $TARGET2 > /dev/null 2>&1; then
logger -p user.debug -t $SYSLOG_TAG "$F1_ETH port: First failover connection test OK (Ping to $TARGET2 successful)." # Debug line
else
logger -p user.warning -t $SYSLOG_TAG "$F1_ETH port: First failover connection test FAIL (Ping to $TARGET2 failed)."
fi
# Get current current IP from $ETH port
IPADDR=$(ip -4 addr show dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
logger -p user.debug -t $SYSLOG_TAG "$ETH port IP: $IPADDR" # Debug line
# Get current gateway IP for the interface
GATEWAY=$(/sbin/ip route | awk "/via/ && /$ETH/ {print \$3; exit}")
if [ -z "$GATEWAY" ]; then
logger -p user.warning -t $SYSLOG_TAG "$ETH port GATEWAY IP: NO_GATEWAY"
else
logger -p user.debug -t $SYSLOG_TAG "$ETH port GATEWAY IP: $GATEWAY" # Debug line
fi
# Get ARP entry for the gateway IP
if [ -n "$GATEWAY" ]; then
MAC=$(/usr/sbin/arp -an | awk -v gw="$GATEWAY" '$2 ~ gw {print $4; exit}')
else
MAC=""
fi
logger -p user.debug -t $SYSLOG_TAG "$ETH port GATEWAY MAC: $MAC" # Debug line
# Check for missing or incomplete ARP
if [ -z "$MAC" ] || [ "$MAC" == "<incomplete>" ]; then
logger -p user.warning -t $SYSLOG_TAG "$ETH port: ARP table check FAILED!"
# Uncomment the lines below to re-request DHCP IP when needed
/usr/bin/logger -p user.warning -t $SYSLOG_TAG "$ETH port: DHCP release..."
/usr/bin/sudo /sbin/dhclient -r $ETH
sleep 2
/usr/bin/logger -p user.warning -t $SYSLOG_TAG "$ETH port: DHCP renew..."
/usr/bin/sudo /sbin/dhclient $ETH
else
logger -p user.debug -t $SYSLOG_TAG "$ETH port: ARP table check OK!" # Debug line
fi
# Test Internet connectivity via $ETH
if /bin/ping -c 2 -I $ETH $TARGET > /dev/null 2>&1; then
logger -p user.debug -t $SYSLOG_TAG "$ETH port: Internet connection test OK (Ping to $TARGET successful)." # Debug line
else
logger -p user.warning -t $SYSLOG_TAG "$ETH port: Internet connection test FAIL (Ping to $TARGET failed)."
fi
# Last failover 1 connectivity test via $F1_ETH
if ping -c 1 -I $F1_ETH $TARGET2 > /dev/null 2>&1; then
logger -p user.debug -t $SYSLOG_TAG "$F1_ETH port: Last failover connection test OK: (Ping to $TARGET2 successful)." # Debug line
else
logger -p user.warning -t $SYSLOG_TAG "$F1_ETH port: Last failover connection test FAIL: (Ping to $TARGET2 failed)."
fi
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
*/5 * * * * /config/scripts/arpcheck-eth0.sh
system {
syslog {
host 192.168.50.2 {
facility all {
level err
}
facility user {
level debug
}
}
}
}
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!