From: Grigory Batalov <bga@altlinux.ru>
To: linux-msdos@vger.kernel.org
Subject: understanding TUN/TAP
Date: Wed, 14 Jan 2004 14:48:48 +0300 [thread overview]
Message-ID: <20040114144848.6d26f48d.bga@altlinux.ru> (raw)
Hi!
I try to check TUN/TAP packet driver functionality but some
aspects are unclear to me. First, I made persistent device
tap0 with tunctl from User Mode Linux. Then I created
script /etc/sysconfig/network-scripts/ifcfg-tap0:
DEVICE=tap0
BOOTPROTO=static
IPADDR=192.168.57.15
NETMASK=255.255.255.0
NETWORK=192.168.57.0
BROADCAST=192.168.57.255
ONBOOT=yes
IPXNETNUM_802_2=00000003
IPXPRIMARY_802_2="no"
IPXACTIVE_802_2="yes"
So after "ifup tap0" I have:
$ /sbin/ifconfig
...
tap0 Link encap:Ethernet HWaddr 00:FF:F7:35:8D:7D
inet addr:192.168.57.15 Bcast:192.168.57.255 Mask:255.255.255.0
IPX/Ethernet 802.2 addr:00000003:00FFF7358D7D
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:193 errors:0 dropped:0 overruns:0 frame:0
TX packets:1121 errors:0 dropped:4298 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:11580 (11.3 Kb) TX bytes:186105 (181.7 Kb)
$ /sbin/route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.57.0 0.0.0.0 255.255.255.0 U 0 0 0 tap0
172.16.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 172.16.0.100 0.0.0.0 UG 0 0 0 eth0
In ~/.dosemurc :
$_pktdriver = (on)
$_netdev = "tap0"
$_vnet = "tap"
Also I got Waterloo TCP/IP utils:
http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/net/wattcp/wat2001b.zip
and made config for them (~/dosemu/freedos/net/tcp.cfg):
my_ip=192.168.57.14
netmask=255.255.255.0
gateway=192.168.57.15
Then in dosemu I start tcpinfo:
C:\NET>tcpinfo
Reading Waterloo TCP configuration file.
Ethernet Address : 64:62:a6:90:78:78
IP Address : 192.168.57.14
Network Mask : 255.255.255.0
Gateways : GATEWAY'S IP SUBNET SUBNET MASK
: 192.168.57.15 DEFAULT
Cookieserver : NONE DEFINED
Nameserver : NONE DEFINED
Domain : "(null)"
Ping from dosemu to Linux host goes well:
C:\NET>ping 192.168.57.15 2
Pinging [192.168.57.15] 2 times once per_second
sent PING # 1 , PING receipt # 1 : response time 0.00 seconds
sent PING # 2 , PING receipt # 2 : response time 0.00 seconds
C:\NET>ping 172.16.0.57 2
Pinging [172.16.0.57] 2 times once per_second
sent PING # 1 , PING receipt # 1 : response time 0.00 seconds
sent PING # 2 , PING receipt # 2 : response time 0.00 seconds
But not from host to dosemu:
$ ping 192.168.57.14
PING 192.168.57.14 (192.168.57.14) 56(84) bytes of data.
From 192.168.57.15 icmp_seq=1 Destination Host Unreachable
From 192.168.57.15 icmp_seq=2 Destination Host Unreachable
From 192.168.57.15 icmp_seq=3 Destination Host Unreachable
If I start bridging between tap0 and eth0 then I even can't
ping host from dosemu:
$ sudo /sbin/brctl addbr br0
$ sudo /sbin/brctl addif br0 tap0
$ sudo /sbin/brctl addif br0 eth0
C:\NET>ping 192.168.57.15 2
Pinging [192.168.57.15] 2 times once per_second
PING: Cannot resolve host's hardware address
So my question is: where am I wrong and what also should
be tuned?
next reply other threads:[~2004-01-14 11:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-14 11:48 Grigory Batalov [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-01-14 17:18 understanding TUN/TAP Stas Sergeev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040114144848.6d26f48d.bga@altlinux.ru \
--to=bga@altlinux.ru \
--cc=linux-msdos@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.