[小技巧] exsi change network & allow direct access
date
Jan 30, 2023
slug
tip-exsi-lede-ubuntu-windows
status
Published
summary
小技巧
tags
tip
type
Post
URL
Problem & Summary
- after booted, type F2, change network configuration to 10.13.72.5/24 with gateway=10.13.72.1, which is the ip of lede, one of the vm that’s going to be created
- lede frequently crashed its network, need to set up a cron job to check and re-up network every 2 mins


#!/bin/sh
# filename: /root/network-watch-dog.sh
# 4=network error/refused/timeout/dns err/
# need "opkg install wget ca-bundle"
count=0
URLs='http://baidu.com http://163.com http://www.qq.com'
for host in $URLs ; do
#echo $host
# wget -t2 这个参数要>=2, 防止第一次访问dns解析超时,而导致失败
wget -q -T2 -t2 --method=HEAD --max-redirect=0 "$host"
if [ 4 -eq $? ]; then
echo $(date +%F_%T%z) $host 'error.' >> /root/log.redail
count=$((count+1))
else
break
fi
done
URL_cnt=$(echo $URLs|wc -w)
if [ $count -ge $URL_cnt ]; then
echo $(date +%F_%T%z) redail >> /root/log.redail
ifdown WAN;sleep 1;ifup WAN
fi
echo $(date +%F_%T%z) 'finished run' >> /root/log.redail
Lede openwrt setting
- lede (WAN - static, get 10.13.0.72; LAN - static, 10.13.72.1/24)

WAN




LAN







Solution
Screenshots
- making sure the one with X, the management port, is the port that you will connect directly with computer for root access
- with direct wired connection to the right management port (check back of machine for info), need to set computer with static ip, that is 10.13.72.x/24
