TUN/TAP Dosemu

I’m trying to get the following script working. When I do an “ifup tap0”, it doesn’t do anything. Any help is greatly appreciated.

  • Begin /etc/sysconfig/network/scripts/ifup-tap0

#!/bin/bash

DEVICE=tap0
BOOTPROTO=static
IPADDR=192.168.1.26
NETMASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST=192.168.1.255
ONBOOT=yes
IPXNETNUM_802_2=00000003
IPXPRIMARY_802_2=“no”
IPXACTIVE_802_2=“yes”

  • End /etc/sysconfig/network/scripts/ifup-tap0

Hello.

Please, next time copy/paste your computer output between CODE tags. It is the # button in the tool bar of the poste editor. And please incluse the prompt and the command with that copy/paste sweep. Then you do not have to explain things like “Begin /etc/…” and “End /etc…”

That would have shown like:

ignatius999@system:~> cat /etc/sysconfig/network/scripts/ifup-tap0
#!/bin/bash
 
 DEVICE=tap0
 BOOTPROTO=static
 IPADDR=192.168.1.26
 NETMASK=255.255.255.0
 NETWORK=192.168.1.0
 BROADCAST=192.168.1.255
 ONBOOT=yes
 IPXNETNUM_802_2=00000003
 IPXPRIMARY_802_2="no"
 IPXACTIVE_802_2="yes"
ignatius999@system:~> 

Then back to your complaint that this script is not working. When this script is executed it does hardly do anything. It gives some varables a value and then it is finished.

Butt you do not execute it at all. You say you do

ifup tap0

Thus you start the tool ifup. Did ou check what the tool does with

man ifup

I have the strong idea that you are confusing the scripts in /etc/sysconfig/network/scripts wit the configuration files named in /etc/sysconfig/network/ifcfg-.
Look at an example script like /etc/sysconfig/network/scripts/ifup-skel and one of the ifcfg-
file in /etc/sysconfig/network. Your file looks very much like the latter one, But those are no scripts, but configuration files.

The most important thing is of course if a device like tap0 realy exists.

I appoligize, but in fact your question looks like me a classical case of: Desccribe the Goal, not the Step ( http://www.catb.org/~esr/faqs/smart-questions.html#goal ).
Please tell what you are tying to achieve. IMHO you are walking tthe wrong path to get to your goal. People here will try to help you to find a path to get where you want to, but they must know what your goal is.

Did you load the kernel driver?

modprobe tun