Openwrt 설치
모듈설치
opkg update
opkg install kmod-bonding luci-proto-bonding
수정
vi /etc/config/network
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix '값'
config device
option name 'br-lan'
option type 'bridge'
list ports 'bond-bond1'
list ports 'lan4'
config interface 'bond1'
option proto 'bonding'
option ipaddr '값'
option netmask '255.255.255.0'
option mode '802.3ad'
option lacp_rate 'fast'
option xmit_hash_policy 'layer2+3'
list slaves 'lan2'
list slaves 'lan3'
option miimon '100'
option bonding_policy '802.3ad'
option min_links '0'
option ad_actor_sys_prio '65535'
option ad_select 'stable'
option all_slaves_active '0'
option link_monitoring 'mii'
option downdelay '200'
option updelay '200'
option use_carrier '1'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option delegate '0'
config device
option name 'wan'
option macaddr '값'
config interface 'wan'
option device 'wan'
option proto 'dhcp'
option delegate '0'
config interface 'wan6'
option device 'wan'
option proto 'dhcpv6'
option auto '0'
option reqaddress 'try'
option reqprefix 'auto'
재시작
/etc/init.d/network restart
작동확인
cat /proc/net/bonding/bond-bond1
왜인지 이름이 본드본드1임ㅋㅋㅋㅋ 그리고 설정도 뭔가 저장이 제대로 안됨
-> 그러므로 openwrt 인터페이스로 들어가서 설정 확인하고 디바이스 br-lan 으로 들어가서 본드 이름 일치시키기
참고로 난 저렇게 설치해도 라운드 로빈이였음 본드 이름도 일치 안해서ㅋㅋ
MTU 일관성 유지: ifconfig 에서도 보임
본딩된 포트(lan2, lan3)와 브리지(br-lan)의 MTU 값이 일치해야함
MTU 값을 확인하고 필요하면 수정
데비안 설정
모듈의 설치
sudo apt install ethtool ifenslave
network interfaces 확인
ip address show
설정 편집
sudo nano /etc/network/interfaces
[참고]
https://wiki.debian.org/Bonding
https://www.kernel.org/doc/Documentation/networking/bonding.txt
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/\*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto enp3s0
iface enp3s0 inet manual
bond-master bond1
auto enp4s0
iface enp4s0 inet manual
bond-master bond1
#bond
auto bond1
iface bond1 inet static
bond-slaves enp3s0 enp4s0
bond-mode 802.3ad
bond-xmit-hash-policy layer2+3
bond-lacp_rate fast
bond-miimon 100
bond-downdelay 200
bond-updelay 200
#mtu 1500
address 192.168.1.3
netmask 255.255.255.0
gateway 192.168.1.1
재시작
sudo systemctl restart networking
네트워크 확인
cat /proc/net/bonding/bond1
lsmod | grep bond
sudo ethtool bond1
여담
설정을 검색하며 ai 사용했는데
n100정도의 파워에서는 대충 10 프로의 cpu가 쓰일거라고 했고 공유기는 1520프로 정도 쓰일거라고 했는데5프로 더 사용하는 느낌이고 공유기는 2~5프로 정도 더 쓰는 느낌임...
n100 에서는 대충 3
ai 보면 좀 못미더움ㅋㅋ
728x90
'서버 > Openwrt' 카테고리의 다른 글
openwrt dns 차단 (0) | 2025.01.29 |
---|---|
openwrt 사용량 측정 by vnstat (0) | 2025.01.10 |
openwrt ax6000 NETDEV WATCHDOG: eth0 (mtk_soc_eth): transmit queue 7 timed out 에러 (0) | 2024.12.12 |
openwrt 에서 wifi 프린터가 접속이 안될때 (0) | 2024.11.27 |
grafana 로 데이터 보내기 (0) | 2024.10.27 |