Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Jul 2006 12:09:31 -0400
From:      David Gilbert <dgilbert@dclg.ca>
To:        freebsd-hackers@freebsd.org
Subject:   more if_tun frustration.
Message-ID:  <17598.22843.432022.14966@canoe.dclg.ca>

next in thread | raw e-mail | index | archive | help
To recap, I have

tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
        inet6 fe80::214:22ff:fede:f175%tun0 prefixlen 64 scopeid 0x5 
        inet 192.168.12.2 --> 192.168.22.1 netmask 0xffffffff 
        Opened by PID 15236

And I see:

[4:18:318]root@canoe:/usr/home/dgilbert> netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            xx.yy.zz.33        UGS         1  3393155   bge0
xx.yy.zz.32/27     link#1             UC          0        0   bge0
xx.yy.zz.33        00:80:c8:c9:22:31  UHLW        2      115   bge0   1178
127.0.0.1          127.0.0.1          UH          0  6251818    lo0
192.168.22.1       192.168.12.2       UH          0        0   tun0

frstratingly, when I ask:

[4:21:321]root@canoe:/usr/home/dgilbert> route get 192.168.22.1
   route to: 192.168.22.1
destination: default
       mask: default
    gateway: strike1
  interface: bge0
      flags: <UP,GATEWAY,DONE,STATIC>

And even more frustratingly, when I do:

[4:16:316]root@canoe:/usr/home/dgilbert> route add 192.168.24.1 192.168.12.2
add host 192.168.24.1: gateway 192.168.12.2

I then see:

[4:18:318]root@canoe:/usr/home/dgilbert> netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            66.96.20.33        UGS         1  3393155   bge0
66.96.20.32/27     link#1             UC          0        0   bge0
66.96.20.33        00:80:c8:c9:22:31  UHLW        2      115   bge0   1178
127.0.0.1          127.0.0.1          UH          0  6251818    lo0
192.168.22.1       192.168.12.2       UH          0        0   tun0
192.168.24.1       192.168.12.2       UGHS        0        0   bge0

!?!

Clearly, both 24.1 and 22.1 should route via tun0.  Even though 22.1
says tun0 here, it in fact routes via bge0.

Any clues offered as to what I'm doing wrong?

Dave.

-- 
============================================================================
|David Gilbert, Independent Contractor.       | Two things can be          |
|Mail:       dave@daveg.ca                    |  equal if and only if they |
|http://daveg.ca                              |   are precisely opposite.  |
=========================================================GLO================



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