Linux Slackware 上的 86Box,如何启用 pcap 联网?

Linux Slackware 上的 86Box,如何启用 pcap 联网?

我已在 Slackware 15.0 主机上成功运行旧的 UNIX SVR4 来宾。

这是unix“vm”的配置

    [General]
vid_renderer = qt_opengl3
confirm_save = 0
confirm_reset = 0
language = en-US
confirm_exit = 0
vid_resize = 1

[Machine]
machine = p5sp4
cpu_family = pentium_p5
cpu_speed = 66666666
cpu_multi = 1
cpu_use_dynarec = 1
time_sync = local
fpu_type = internal
mem_size = 16384

[Video]
gfxcard = vga

[Input devices]
mouse_type = ltserial

[Sound]
fm_driver = nuked
midi_device = system_midi
midi_in_device = midi_in

[Network]
net_01_link = 0
net_02_link = 0
net_03_link = 0
net_04_link = 0
net_01_net_type = pcap
net_01_host_device = br0
net_01_card = wd8003e

[Storage controllers]
hdc = internal
cassette_mode = load

[Ports (COM & LPT)]
lpt1_device = text_prt

[Hard disks]
hdd_01_parameters = 63, 16, 1013, 0, ide
hdd_01_fn = unix.img
hdd_01_speed = ramdisk
hdd_01_ide_channel = 0:0

[Floppy and CD-ROM drives]
fdd_01_type = 525_2hd
cdrom_01_parameters = 1, atapi
cdrom_01_ide_channel = 0:1

[Western Digital WD8003E #1]
mac = **:**:**
base = 0300
irq = 2
ram_addr = D8000

机器启动并识别旧的 WD 卡,我可以从内部 ping 到内部(原文如此!),但不能从主机到来宾,反之亦然。

这是网络情况,没有界面出现

sudo brctl show
bridge name bridge id       STP enabled interfaces
br0     ****************    yes     eth0

sudo ip link show

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP mode DEFAULT group default qlen 1000
    link/ether ************ brd ff:ff:ff:ff:ff:ff
3: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether **:**:**:**:**:** brd ff:ff:ff:ff:ff:ff

我尝试过绑定..

br0 (which is a bridge with eth0..) FAIL
eth0 FAIL
virbr0 (an adapter created by libvirt) FAIL

答案1

实际上,pcap 在 Linux 主机上似乎是一场灾难,稳定版本不起作用,git 版本首先从客户机 ping 会崩溃

86Box[23929]: segfault at 3c8 ip 0000000000655468 sp 00007f18317fd940 error 4 in 86Box[426000+40e000]

Slirp 网络似乎有效。因此,我认为 ATM 的 pcap 网络在 Linux 主机上存在漏洞。

ps=老的SVr4系统被qemu完美模拟

qemu-system-i386 -m 16 -hda unix.img -fda boot.img

但qemu不支持wd8003 isa卡。

编辑:找到了解决方法/解决方案。使用 vde 代替 pcap 或 slirp。

我们需要一个点击界面,我个人使用这个脚本

#!/bin/sh

# Exit at first error
set -e

# Run this as root
if [ $UID != "0" ]
then
echo "Run this script as root"
exit 1
fi

# Increment tap device number
TAP=`ip link show type tun|grep tap|awk '{print $2}'|cut -d : -f 1|cut -c 4|tail -1`
let "TAP=TAP+1"
TAPDEV=tap${TAP}

# Other vars
USER=yourname
BRIDGE=br0

# Create tap for user
ip tuntap add dev $TAPDEV mode tap user $USER
ip link set $TAPDEV up promisc on
ip link set $TAPDEV master $BRIDGE
echo "I have created $TAPDEV for user $USER, using bridge $BRIDGE"
echo "To remove it use command ip link delete $TAPDEV as root"

然后创建交换机作为ROOT(普通用户可以创建交换机..但是当您启动86box机器时它不会连接到交换机!)

sudo vde_switch --mode 666 --numports 8 --tap tap1 --mgmt /tmp/vde.manag --mgmtmode 666 -s /tmp/vde.switch --daemon

然后我们启动86Box

控制vde交换机后,必须报告两个端口(tap1和86box程序)

vdeterm  /tmp/vde.manag 
VDE switch V.2.3.2
(C) Virtual Square Team (coord. R. Davoli) 2005,2006,2007 - GPLv2

vde[/tmp/vde.manag]: port/allprint 

Port 0001 untagged_vlan=0000 ACTIVE - Unnamed Allocatable
 Current User: NONE Access Control: (User: NONE - Group: NONE)
  -- endpoint ID 0007 module tuntap      : tap1
Port 0002 untagged_vlan=0000 ACTIVE - Unnamed Allocatable
 Current User: myname Access Control: (User: NONE - Group: NONE)
  -- endpoint ID 0008 module unix prog   : 86Box virtual card user=yourname PID=2886
Success

Tap1 必须配置网桥的 ip 类别,例如,如果 br0 具有 192.168.0.1/24 ip tap1 必须具有 192.168.0.*/24,对于虚拟机也是如此(例如:

br0 192.168.0.1
tap1 192.168.0.2
vm 192.168.0.3

终于出结果了!

Unix svr4 VM 的快速 ping

ping 192.168.0.91
PING 192.168.0.91 (192.168.0.91) 56(84) bytes of data.
64 bytes from 192.168.0.91: icmp_seq=1 ttl=255 time=6.23 ms
64 bytes from 192.168.0.91: icmp_seq=2 ttl=255 time=4.86 ms
64 bytes from 192.168.0.91: icmp_seq=3 ttl=255 time=3.44 ms

我第一次在我的电脑上看到旧的 svr4 Unix 上的 telnet,而不使用 slirp 和其他缓慢的解决方案!

telnet 192.168.0.91
Trying 192.168.0.91...
Connected to 192.168.0.91.
Escape character is '^]'.
[SSL not available]


UNIX(r) System V Release 4.0 (unix01)

login: 

ftp、rlogin 等都可以使用!

VDE 网络仅在 4.0 86Box 或更高版本上可用。

这是旧 Unix svr4 的 cfg

[General]
vid_renderer = qt_opengl3
confirm_save = 0
confirm_reset = 0
language = it-IT
confirm_exit = 0
vid_resize = 1

[Machine]
machine = cubx
cpu_family = c3_samuel
cpu_speed = 733333333
cpu_multi = 5,5
cpu_use_dynarec = 1
time_sync = local
fpu_type = internal
fpu_softfloat = 0
mem_size = 16384

[Video]
gfxcard = cl_gd5430_pci

[Input devices]
mouse_type = ltserial

[Sound]
fm_driver = nuked
midi_device = system_midi
midi_in_device = midi_in

[Storage controllers]
hdc = internal
cassette_mode = load

[Ports (COM & LPT)]
lpt1_device = text_prt

[Hard disks]
hdd_01_parameters = 63, 16, 1013, 0, ide
hdd_01_fn = unix.img
hdd_01_speed = ramdisk
hdd_01_ide_channel = 0:0

[Floppy and CD-ROM drives]
fdd_01_type = 525_2hd
cdrom_01_parameters = 1, atapi
cdrom_01_ide_channel = 0:1
fdd_01_image_history_01 = /home/user/sistemi operativi/storici/unix/AT&T Intel Unix/Disk 58 - Hardware Set - qt pc586 wd8003 pc1 - Disk 1 of 1.img
cdrom_01_type = 86BOX_CD-ROM_1.00

[Western Digital WD8013EBT #1]
base = 0280
irq = 9
ram_addr = D8000
ram_size = 16384
mac = ******

[Network]
net_01_card = wd8013ebt
net_01_link = 1
net_01_host_device = /tmp/vde.switch
net_01_net_type = vde

[Western Digital WD8013EBT]
base = 0280
irq = 9
ram_addr = D8000
ram_size = 16384
mac = 1f:6e:52

[Cirrus Logic GD5430 (PCI)]
memory = 2

相关内容