issues setting up bridge mode

About Qemu-system-ppc, a PPC Mac emulator for Windows, macOS and Linux that can run Mac OS 9.0 up to Mac OS X 10.5

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
logan71f100
Space Cadet
Posts: 9
Joined: Fri Sep 03, 2021 1:35 am

issues setting up bridge mode

Post by logan71f100 »

I'm using ubuntu 20.04 and I tried setting up bridge network like described for your mac guides and just cant get it to quack right

this is what I have after running my tap up script

Code: Select all

user@mac-emulation:~/Documents/Test PPC/tap-scripts$ sudo ./tap-up.txt tap1
user@mac-emulation:~/Documents/Test PPC/tap-scripts$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br0 state UP group default qlen 1000
    link/ether 00:50:56:b0:a8:8c brd ff:ff:ff:ff:ff:ff
3: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:50:56:b0:a8:8c brd ff:ff:ff:ff:ff:ff
    inet 10.5.1.118/20 brd 10.5.15.255 scope global br0
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:feb0:a88c/64 scope link
       valid_lft forever preferred_lft forever
4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 52:54:00:fa:2f:5c brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
5: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel master virbr0 state DOWN group default qlen 1000
    link/ether 52:54:00:fa:2f:5c brd ff:ff:ff:ff:ff:ff
16: tap1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel master br0 state DOWN group default qlen 1000
    link/ether 26:21:90:a1:ed:fd brd ff:ff:ff:ff:ff:ff
my start script:

Code: Select all

#!/bin/sh
#
TAPDEV="$1"
BRIDGEDEV="br0"
#
ip tuntap add $TAPDEV mode tap
ip link set dev $TAPDEV up
ip link set $TAPDEV master br0
my stop script:

Code: Select all

#!/bin/sh
#
TAPDEV="$1"
BRIDGEDEV="br0"
#
sudo ip link delete $TAPDEV
this is my launch arguments:

Code: Select all

#!/bin/bash
./qemu-system-ppc -L pc-bios -boot c -cpu "g4" -M mac99,accel=tcg -m 256 -prom-env "auto-boot?=true" -prom-env "boot-args=-v" -prom-env "vga-ndrv?=true" -drive file=MacOS9.2.img,format=raw,media=disk -device sungem,netdev=network01,mac=52:54:00:12:34:56 -netdev tap,id=network01,script=./tap-scripts/tap-up.txt,downscript=./tap-scripts/tap-down.txt -device VGA,edid=on -g 1024x768x32 -device usb-tablet -rtc base=localtime -vnc :1
If anyone can see any error in my setup please let me know. I'm out of my comfort zone here with bridges in ubuntu, Iv only made bridges in windows. I believe I made the bridge correctly, this is what that looks like:

Code: Select all

# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto br0
iface br0 inet static
        address 10.5.1.118
        netmask 255.255.240.0
        network 10.5.0.0
        broadcast 10.5.15.255
        gateway 10.5.1.1
        bridge_ports ens160
        bridge_stp off
        bridge_maxwait 5
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 10.5.1.1
        dns-search xxxxxxxxxxxx
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: issues setting up bridge mode

Post by Cat_7 »

Hi,

I have limited knowledge of bridging in Linux, but at least the ifup.txt script seem to work in Fedora 34 in combination with this command line and running the Qemu startup script as root.
The host network connection is interrupted when running this, so there is an issue with the up script.
The down script does not reset my eno1 connection, so some work needs to be done there too.

-netdev tap,id=network01,ifname=tap0,script=./scripts/ifup.txt,downscript=./scripts/ifdown.txt \
-device sungem,netdev=network01,mac=52:54:00:12:34:66 \

ifup.txt:

#!/bin/sh
echo "Executing qemu-ifup"
brctl addbr br0
brctl addif br0 eno1
brctl addif br0 tap0
ifconfig eno1 up
ifconfig tap0 up
ifconfig br0 up
brctl show

ifdown.txt:

#!/bin/sh
echo "Executing ifdown.txt"
ifconfig br0 down
brctl delif br0 eno1
brctl delbr br0
brctl show
ifconfig eno1 up
logan71f100
Space Cadet
Posts: 9
Joined: Fri Sep 03, 2021 1:35 am

Re: issues setting up bridge mode

Post by logan71f100 »

I tried your scripts and still haves same result, must be something with ubuntu. i updated kernel to latest version just in case but that's still not working.

Code: Select all

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br0 state UP group default qlen 1000
    link/ether 00:50:56:b0:a8:8c brd ff:ff:ff:ff:ff:ff
    altname enp3s0
3: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:50:56:b0:a8:8c brd ff:ff:ff:ff:ff:ff
    inet 10.5.1.136/20 brd 10.5.15.255 scope global dynamic br0
       valid_lft 431350sec preferred_lft 431350sec
    inet6 fe80::58e0:93ff:fe9e:2467/64 scope link
       valid_lft forever preferred_lft forever
8: tap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br0 state UNKNOWN group default qlen 1000
    link/ether 32:db:23:56:f6:a2 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::30db:23ff:fe56:f6a2/64 scope link
       valid_lft forever preferred_lft forever
It all looks good, this is something a bit past my comfort zone I guess, cant really make heads or tales of it, but it works correctly on windows so I guess I'm going to pursue that and also make a post in the levelonetechs forum being that this is more network thing
logan71f100
Space Cadet
Posts: 9
Joined: Fri Sep 03, 2021 1:35 am

Re: issues setting up bridge mode

Post by logan71f100 »

https://forum.level1techs.com/t/tap-net ... u/176319/5

I'm continuing this over here and i'm certain this is a linux networking issue
Post Reply