* understanding TUN/TAP
@ 2004-01-14 11:48 Grigory Batalov
0 siblings, 0 replies; 2+ messages in thread
From: Grigory Batalov @ 2004-01-14 11:48 UTC (permalink / raw)
To: linux-msdos
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?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: understanding TUN/TAP
@ 2004-01-14 17:18 Stas Sergeev
0 siblings, 0 replies; 2+ messages in thread
From: Stas Sergeev @ 2004-01-14 17:18 UTC (permalink / raw)
To: linux-msdos
Hello.
Grigory Batalov wrote:
> So after "ifup tap0" I have:
Looks about all-right.
> But not from host to dosemu:
Most likely because the TCP/IP stack
on a dosemu side is not loaded by the
time you are pinging it. Try pinging
linux->dosemu at the same time you are
pinging dosemu->linux, because when
you are pinging dosemu->linux, the
TCP/IP is loaded, but then it gets
unloaded.
> If I start bridging between tap0 and eth0 then I even can't
> ping host from dosemu:
That's right. As soon as you start
bridging on some interface, this
interface became unavailable for TCP/IP.
Therefore it is suggested to not even
assign an IP address to the interface
that is used for the bridging.
Although it is possible to make the
linux box available for the same subnet
again after the bridging was started,
it is rather tricky and lets hope you
don't need that.
> So my question is: where am I wrong and what also should
> be tuned?
For the case of a bridging, after you
created br0 interface, you have to bring
it up with ifconfig to activate the
bridge (or create ifcfg-br0 config).
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-01-14 17:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-14 17:18 understanding TUN/TAP Stas Sergeev
-- strict thread matches above, loose matches on Subject: below --
2004-01-14 11:48 Grigory Batalov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox