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カードを認識し、内部から内部へ(sic!)pingを送信できますが、ホストからゲストへ、またはその逆には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ホストでは災害のようです。安定したバージョンは動作せず、最初にクライアントでpingを実行するとgitバージョンがクラッシュします。

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カードをサポートしていません。

編集:回避策/解決策が見つかりました。 pcapやslirpの代わりにvdeを使用してください。

クリックインターフェイスが必要です。私は個人的にこのスクリプトを使用します。

#!/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スイッチを制御した後、2つのポートを報告する必要があります(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 の IP が 192.168.0.1/24 の場合、tap1 の IP は 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

slirpや他の遅いソリューションを使用せずに、私のコンピュータの古いsvr4 Unixで初めてTelnetを見ました!

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

おすすめ記事