Друзья, возникла у меня тут одна проблемка с которой я бьюсь битый час и не понимаю в чем проблема.
При попытке поднять qemu на tun интерфейсе, получаю следующую ошибку:
# qemu-system-sparc -bios /opt/ss20_v2.25_rom -M SS-20 -nographic -boot c -hda /opt/disk.img -m 512 telnet:0.0.0.0:3000,server -net nic,vlan=0,model=lance -net tap,vlan=0,ifname=tap0,script=0 -runas root
0: could not launch network script
qemu-system-sparc: -net tap,vlan=0,ifname=tap0,script=0: Device 'tap' could not be initialized
В чем может быть проблема?
Ниже простыня.
# uname -a
Linux blackbird 3.0.6-gentoo #4 SMP Mon Apr 30 11:45:39 CEST 2012 i686 AMD E-350 Processor AuthenticAMD GNU/Linux
# ls -la /dev/net/tun
crw-rw-rw- 1 root root 10, 200 Apr 30 22:47 /dev/net/tun
# dmesg | grep tun
[ 1.181755] tun: Universal TUN/TAP device driver, 1.6
[ 1.181837] tun: (C) 1999-2004 Max Krasnyansky
[ 1.454617] IPv6 over IPv4 tunneling driver
Далее, конфиг /etc/conf.d/net
bridge_br0="eth0 tap0"
brctl_br0="setfd 0 sthello 0 stp off"
rc_net_br0_need="net.tap0"
config_br0="172.30.XX.X netmask 255.255.255.0 brd 172.30.XX.255"
routes_br0="default via 172.30.XX.X"
config_tap0="null"
tuntap_tap0="tap"
#mac_tap0="00:00:00:00:00:00"
config_eth0="null"
Вывод ifconfig -a
# ifconfig -a
br0 Link encap:Ethernet HWaddr 96:26:8e:3c:25:77
inet addr:172.30.XX.X Bcast:172.30.XX.255 Mask:255.255.255.0
inet6 addr: fe80::9426:8eff:fe3c:2577/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13394 errors:0 dropped:0 overruns:0 frame:0
TX packets:11749 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1707424 (1.6 MiB) TX bytes:1852578 (1.7 MiB)
eth0 Link encap:Ethernet HWaddr d0:27:88:6c:3a:a6
inet6 addr: fe80::d227:88ff:fe6c:3aa6/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:13394 errors:0 dropped:0 overruns:0 frame:0
TX packets:11809 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1894940 (1.8 MiB) TX bytes:1855570 (1.7 MiB)
Interrupt:40 Base address:0xe000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:21388 errors:0 dropped:0 overruns:0 frame:0
TX packets:21388 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5684799 (5.4 MiB) TX bytes:5684799 (5.4 MiB)
sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
tap0 Link encap:Ethernet HWaddr 96:26:8e:3c:25:77
inet6 addr: fe80::9426:8eff:fe3c:2577/64 Scope:Link
UP BROADCAST PROMISC MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:6 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Далее rc-update для default
# rc-update show default
apache2 | default
bridge_forward | default
dhcpd | default
local | default
mysql | default
named | default
net.br0 | default
net.tap0 | default
netmount | default
nginx | default
radiusd | default
sshd | default
syslog-ng | default
udev-postmount | default
vixie-cron | default
Текст скрипта bridge_forward
# more /etc/init.d/bridge_forward
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
depend() {
need net.br0
}
start() {
ebegin "Turning on forwarding for bridge interface"
/sbin/sysctl net.ipv4.conf.br0.forwarding=1 >/dev/null 2>&1
eend $?
}
stop() {
ebegin "Turning off forwarding for bridge interface"
/sbin/sysctl net.ipv4.conf.br0.forwarding=0 >/dev/null 2>&1
eend $?
}
restart() {
}
Далее /etc/init.d
# pwd
/etc/init.d
# ls -la net.*
lrwxrwxrwx 1 root root 6 Apr 30 22:15 net.br0 -> net.lo
lrwxrwxrwx 1 root root 6 Nov 13 16:26 net.eth0 -> net.lo
-rwxr-xr-x 1 root root 15459 Nov 9 00:45 net.lo
lrwxrwxrwx 1 root root 6 Apr 30 22:16 net.tap0 -> net.lo
Далее sysctl
# sysctl -a | grep net.*.tap0
error: "Invalid argument" reading key "fs.binfmt_misc.register"
error: permission denied on key 'net.ipv4.route.flush'
net.ipv4.neigh.tap0.mcast_solicit = 3
net.ipv4.neigh.tap0.ucast_solicit = 3
net.ipv4.neigh.tap0.app_solicit = 0
net.ipv4.neigh.tap0.retrans_time = 99
net.ipv4.neigh.tap0.base_reachable_time = 30
net.ipv4.neigh.tap0.delay_first_probe_time = 5
net.ipv4.neigh.tap0.gc_stale_time = 60
net.ipv4.neigh.tap0.unres_qlen = 3
net.ipv4.neigh.tap0.proxy_qlen = 64
net.ipv4.neigh.tap0.anycast_delay = 99
net.ipv4.neigh.tap0.proxy_delay = 79
net.ipv4.neigh.tap0.locktime = 99
net.ipv4.neigh.tap0.retrans_time_ms = 1000
net.ipv4.neigh.tap0.base_reachable_time_ms = 30000
net.ipv4.conf.tap0.forwarding = 1
net.ipv4.conf.tap0.mc_forwarding = 0
net.ipv4.conf.tap0.accept_redirects = 1
net.ipv4.conf.tap0.secure_redirects = 1
net.ipv4.conf.tap0.shared_media = 1
net.ipv4.conf.tap0.rp_filter = 1
net.ipv4.conf.tap0.send_redirects = 1
net.ipv4.conf.tap0.accept_source_route = 1
net.ipv4.conf.tap0.accept_local = 0
net.ipv4.conf.tap0.src_valid_mark = 0
net.ipv4.conf.tap0.proxy_arp = 0
net.ipv4.conf.tap0.medium_id = 0
net.ipv4.conf.tap0.bootp_relay = 0
net.ipv4.conf.tap0.log_martians = 0
net.ipv4.conf.tap0.tag = 0
net.ipv4.conf.tap0.arp_filter = 0
net.ipv4.conf.tap0.arp_announce = 0
net.ipv4.conf.tap0.arp_ignore = 0
net.ipv4.conf.tap0.arp_accept = 0
net.ipv4.conf.tap0.arp_notify = 0
net.ipv4.conf.tap0.proxy_arp_pvlan = 0
net.ipv4.conf.tap0.disable_xfrm = 0
net.ipv4.conf.tap0.disable_policy = 0
net.ipv4.conf.tap0.force_igmp_version = 0
net.ipv4.conf.tap0.promote_secondaries = 0
net.ipv6.neigh.tap0.mcast_solicit = 3
net.ipv6.neigh.tap0.ucast_solicit = 3
net.ipv6.neigh.tap0.app_solicit = 0
net.ipv6.neigh.tap0.retrans_time = 1000
net.ipv6.neigh.tap0.base_reachable_time = 30
net.ipv6.neigh.tap0.delay_first_probe_time = 5
net.ipv6.neigh.tap0.gc_stale_time = 60
net.ipv6.neigh.tap0.unres_qlen = 3
net.ipv6.neigh.tap0.proxy_qlen = 64
net.ipv6.neigh.tap0.anycast_delay = 99
net.ipv6.neigh.tap0.proxy_delay = 79
net.ipv6.neigh.tap0.locktime = 0
net.ipv6.neigh.tap0.retrans_time_ms = 1000
net.ipv6.neigh.tap0.base_reachable_time_ms = 30000
error: permission denied on key 'net.ipv6.route.flush'
net.ipv6.conf.tap0.forwarding = 0
net.ipv6.conf.tap0.hop_limit = 64
net.ipv6.conf.tap0.mtu = 1500
net.ipv6.conf.tap0.accept_ra = 1
net.ipv6.conf.tap0.accept_redirects = 1
net.ipv6.conf.tap0.autoconf = 1
net.ipv6.conf.tap0.dad_transmits = 1
net.ipv6.conf.tap0.router_solicitations = 3
net.ipv6.conf.tap0.router_solicitation_interval = 4
net.ipv6.conf.tap0.router_solicitation_delay = 1
net.ipv6.conf.tap0.force_mld_version = 0
net.ipv6.conf.tap0.max_addresses = 16
net.ipv6.conf.tap0.accept_ra_defrtr = 1
net.ipv6.conf.tap0.accept_ra_pinfo = 1
net.ipv6.conf.tap0.proxy_ndp = 0
net.ipv6.conf.tap0.accept_source_route = 0
net.ipv6.conf.tap0.disable_ipv6 = 0
net.ipv6.conf.tap0.accept_dad = 1
net.ipv6.conf.tap0.force_tllao = 0
Ну и наконец brctl
# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.96268e3c2577 no eth0
tap0
Где косяк? В чем проблема? Куда копать?