DragonOS/tools/configure_network.sh
LoGin e80796eb82
feat: la64 boot (#1132)
* la64能够进入到kernel_main
* ci: 添加为ubuntu编译qemu-loongarch64的脚本
* feat: la64能输出hello world
* la64 安装gcc && 配置github ci
* chore: 更新CI工作流和构建脚本中的Docker镜像版本至v1.10

Signed-off-by: longjin <longjin@DragonOS.org>
2025-04-20 18:51:45 +08:00

27 lines
767 B
Bash
Executable File

# Replace with your wired Ethernet interface name
ETH=eno1
sudo modprobe bridge
sudo modprobe br_netfilter
sudo sysctl -w net.bridge.bridge-nf-call-arptables=0
sudo sysctl -w net.bridge.bridge-nf-call-ip6tables=0
sudo sysctl -w net.bridge.bridge-nf-call-iptables=0
sudo ip tuntap add name tap0 mode tap user $USER
sudo brctl addbr br0
sudo brctl addif br0 tap0
sudo brctl addif br0 $ETH
sudo ip link set tap0 up
sudo ip link set $ETH up
sudo ip link set br0 up
# This connects your host system to the internet, so you can use it
# at the same time you run the examples.
sudo dhcpcd br0
sudo mkdir -p /usr/local/etc/qemu
sudo mkdir -p /etc/qemu
sudo sh -c 'echo "allow br0" > /usr/local/etc/qemu/bridge.conf'
sudo sh -c 'echo "allow br0" > /etc/qemu/bridge.conf'