Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Jun 2002 10:13:17 -0700 (PDT)
From:      Archie Cobbs <archie@dellroad.org>
To:        Lars Eggert <larse@ISI.EDU>
Cc:        Archie Cobbs <archie@dellroad.org>, net@FreeBSD.ORG
Subject:   Re: netgraph documentation?
Message-ID:  <200206041713.g54HDHf51449@arch20m.dellroad.org>
In-Reply-To: <3CFB88C6.4070407@isi.edu> "from Lars Eggert at Jun 3, 2002 08:18:30 am"

next in thread | previous in thread | raw e-mail | index | archive | help
Lars Eggert writes:
> So I ignore the error for now, and make the TCP tunnel as follows:
> 
> Server:
> 	/usr/sbin/ngctl mkpeer iface dummy inet
> 	/sbin/ifconfig ng0 10.10.10.1 10.10.10.2
> 	/usr/sbin/ngctl mkpeer ng0: ksocket inet inet/stream/tcp
> 	/usr/sbin/ngctl msg ng0:inet bind inet/127.0.0.1:50505
> 	/usr/sbin/ngctl msg ng0:inet listen 1
> 	ngctl: send msg: Operation not supported by device
> 
> Client:
> 	/usr/sbin/ngctl mkpeer iface dummy inet
> 	/sbin/ifconfig ng1 10.10.10.2 10.10.10.1
> 	/usr/sbin/ngctl mkpeer ng1: ksocket inet inet/stream/tcp
> 	/usr/sbin/ngctl msg ng1:inet bind inet/127.0.0.1:50506
> 	/usr/sbin/ngctl msg ng1:inet connect inet/127.0.0.1:50505
> 	ngctl: send msg: Operation now in progress
> 
> A tcpdump on lo0 shows the 3-way handshake suceeding:
> 
> [root@hbo: ~larse] tcpdump -i lo0 port 50505
> tcpdump: listening on lo0
> 08:11:29.013658 loopback.50506 > loopback.50505: S 
> 2787661608:2787661608(0) win 65535 <mss 16344,nop,wscale 
> 1,nop,nop,timestamp 14010458 0,nop,nop,cc 383> (DF)
> 08:11:29.013710 loopback.50505 > loopback.50506: S 
> 1751674938:1751674938(0) ack 2787661609 win 65535 <mss 16344,nop,wscale 
> 1,nop,nop,timestamp 14010458 14010458,nop,nop,cc 384,nop,nop,ccecho 383>
> 08:11:29.013754 loopback.50506 > loopback.50505: . ack 1 win 32767 
> <nop,nop,timestamp 14010458 14010458,nop,nop,cc 383> (DF)
> 
> Pinging 10.10.10.2 results in:
> 
> [root@hbo: ~larse] ping 10.10.10.2 
>          PING 10.10.10.2 (10.10.10.2): 56 data bytes
> ping: sendto: Socket is not connected
> ping: sendto: Socket is not connected
> ping: sendto: Socket is not connected
> ^C
> --- 10.10.10.2 ping statistics ---
> 3 packets transmitted, 0 packets received, 100% packet loss

I don't think you can have a point-to-point interface who's
remote IP address is also local to your box. In other words,
this may not work on the same machine but it might work if
you use two different machines... can you try that?

-Archie

__________________________________________________________________________
Archie Cobbs     *     Packet Design     *     http://www.packetdesign.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206041713.g54HDHf51449>