more if_tun frustration.

David Gilbert dgilbert at dclg.ca
Wed Jul 19 16:09:30 UTC 2006


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 at 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 at 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 at 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 at 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 at daveg.ca                    |  equal if and only if they |
|http://daveg.ca                              |   are precisely opposite.  |
=========================================================GLO================


More information about the freebsd-hackers mailing list