Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Dec 2008 21:33:03 +0200
From:      "Vladislav V. Prodan" <universite@ukr.net>
To:        freebsd-current@freebsd.org, freebsd-net@freebsd.org
Cc:        freebsd-hackers@freebsd.org
Subject:   Odd behavior routed
Message-ID:  <49528E6F.30600@ukr.net>

next in thread | raw e-mail | index | archive | help
# uname -a
FreeBSD mary-teresa.XXXXX 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Wed Dec 24 
05:06:55 EET 2008 
vlad11@mary-teresa.XXXXX:/usr/obj/usr/src/sys/mary-teresa.10  amd64

We have two providers on tun1 and tun2.

 >>/etc/rc.conf:
...
gateway_enable="YES"
router="/sbin/routed"
router_enable="YES"
router_flags="-s -T /var/log/routed.log -P no_rip"
...

# netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            89.209.95.254      UGS         0   653418   tun1
10.0.0.0/24        link#1             U           0    85595    re0
85.238.109.61      127.0.0.1          UH          0        0    lo0
89.209.XX.YY       127.0.0.1          UH          0      483    lo0
89.209.95.254      89.209.XX.YY       UH          0        0   tun1
127.0.0.1          link#6             UH          0    19781    lo0
192.168.152.0/24   10.0.0.20          UGS         0        0    re0
195.138.80.168     link#8             UH          0        5   tun2

Internet6:
Destination                       Gateway                       Flags 
  Netif Expire
::1                               link#6                        UH     lo0
fe80::%lo0/64                     link#6                        U     lo0
ff01:6::/32                       fe80::1%lo0                   U     lo0
ff01:7::/32                       fe80::2e0:4dff:fe7b:690c%tun1 UG    tun1
ff01:8::/32                       fe80::2e0:4dff:fe7b:690c%tun2 UG    tun2
ff02::%lo0/32                     fe80::1%lo0                   U     lo0
ff02::%tun1/32                    fe80::2e0:4dff:fe7b:690c%tun1 UG    tun1
ff02::%tun2/32                    fe80::2e0:4dff:fe7b:690c%tun2 UG    tun2


I would like to put some networks via a second ISP:
# /sbin/route add -net 79.140.0.0/20 -iface tun2
add net 79.140.0.0: gateway tun2
# /sbin/route add -net 85.238.96.0/19 -iface tun2
add net 85.238.96.0: gateway tun2
# /sbin/route add -net 195.138.64.0/19 -iface tun2
add net 195.138.64.0: gateway tun2

But routes do not appear, the table remains unchanged.
In the logs routed:

RTM_ADD from pid 7234: 79.140.0.0 (mask 0xfffff000) --> 85.238.109.61
static route 79.140.0.0 (mask 0xfffff000) --> 85.238.109.61 impossibly 
lacks ifp
-- 11:35:16 --
RTM_ADD from pid 7250: 85.238.96.0 (mask 0xffffe000) --> 85.238.109.61
static route 85.238.96.0 (mask 0xffffe000) --> 85.238.109.61 impossibly 
lacks ifp
-- 11:35:28 --
RTM_ADD from pid 7262: 195.138.64.0 (mask 0xffffe000) --> 85.238.109.61
static route 195.138.64.0 (mask 0xffffe000) --> 85.238.109.61 impossibly 
lacks ifp


Before rebuild kernel, it appeared, and now there is no.
It is now adding routes?

Using gated|quagga|zebra does not offer.





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