[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

strange route add problem to tun0



Dear list,

While adding a route to a tun device I get errors,
but it works fine if I omit the last part of the ip:

# /sbin/route add -net 10.8.0.0 10.8.0.2 -netmask 255.255.255.0
route: 10.8.0.0: not a network
# /sbin/route add -net 10.8.0 10.8.0.2 -netmask 255.255.255.0
add net 10.8.0: gateway 10.8.0.2

The problem occurs in the startup of openvpn. The device 
is a soekris net4501. Below is a reproduction of the error.
Not to mention that it perfectly works on other machines.
Thanks in advance for help pointing me in the right direction.

Regards,
Marc

# /sbin/ifconfig tun0 destroy
# /sbin/ifconfig tun0 create
# /sbin/ifconfig tun0 10.8.0.1 10.8.0.2 mtu 1500 netmask 255.255.255.255
up
# /sbin/route add -net 10.8.0.0 10.8.0.2 -netmask 255.255.255.0
route: 10.8.0.0: not a network
# route -n show
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use    Mtu 
Interface
default            10.15.5.254        UGS         0   515523      -  
sis1
10.8.0.2           10.8.0.1           UH          0        0      -  
tun0
10.15.5.252/30     link#2             UC          0        0      -  
sis1
10.15.5.254        08:00:20:ab:09:4f  UHLc        0        0      -  
sis1
127.0.0.1          127.0.0.1          UH          0        0  33224  
lo0
192.168.1/24       link#1             UC          0        0      -  
sis0
192.168.1.1        00:04:76:10:31:c8  UHLc        0        5      -  
sis0
192.168.1.48       link#1             UHLc        0        9      -  
sis0
192.168.1.254      08:00:20:89:06:5a  UHLc        0      598      -  
sis0

# ifconfig -a
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33224
        inet 127.0.0.1 netmask 0xff000000
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6
sis0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        address: 00:00:24:c3:79:c8
        media: Ethernet autoselect (100baseTX)
        status: active
        inet 192.168.1.253 netmask 0xffffff00 broadcast 192.168.1.255
        inet6 fe80::200:24ff:fec3:79c8%sis0 prefixlen 64 scopeid 0x1
sis1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        address: 00:00:24:c3:79:c9
        media: Ethernet autoselect (100baseTX full-duplex)
        status: active
        inet 10.15.5.253 netmask 0xfffffffc broadcast 10.15.5.255
        inet6 fe80::200:24ff:fec3:79c9%sis1 prefixlen 64 scopeid 0x2
sis2: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        address: 00:00:24:c3:79:ca
        media: Ethernet autoselect (none)
        status: no carrier
pflog0: flags=41<UP,RUNNING> mtu 33224
pfsync0: flags=0<> mtu 2020
enc0: flags=0<> mtu 1536
tun0: flags=51<UP,POINTOPOINT,RUNNING> mtu 1500
        inet 10.8.0.1 --> 10.8.0.2 netmask 0xffffffff

# /sbin/route add -net 10.8.0 10.8.0.2 -netmask 255.255.255.0
add net 10.8.0: gateway 10.8.0.2
# route -n show
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use    Mtu 
Interface
default            10.15.5.254        UGS         0   515522      -  
sis1
10.8.0/24          10.8.0.2           UGS         0        0      -  
tun0
10.8.0.2           10.8.0.1           UH          0        0      -  
tun0
10.15.5.252/30     link#2             UC          0        0      -  
sis1
10.15.5.254        08:00:20:ab:09:4f  UHLc        0        0      -  
sis1
127.0.0.1          127.0.0.1          UH          0        0  33224  
lo0
192.168.1/24       link#1             UC          0        0      -  
sis0
192.168.1.1        00:04:76:10:31:c8  UHLc        0        5      -  
sis0
192.168.1.48       link#1             UHLc        0        9      -  
sis0
192.168.1.254      08:00:20:89:06:5a  UHLc        0      509      -  
sis0