Date: Fri, 1 Jun 2001 21:54:49 +0200 From: Andre Albsmeier <andre.albsmeier@mchp.siemens.de> To: freebsd-net@FreeBSD.ORG Cc: Andre.Albsmeier@mchp.siemens.de Subject: Routing problem: Is the bug in my brain or in FreeBSD? Message-ID: <20010601215449.A3609@curry.mchp.siemens.de>
next in thread | raw e-mail | index | archive | help
I don't know where the bug is...
Simple network:
- two routers (1 and 2)
- host C with IP 192.168.1.3
- host S with IP 192.168.2.1
All machines are FreeBSD 4.3-STABLE.
Router 1 routes pkts between the Internet and 192.168.1.0
Router 2 routes pkts between 192.168.1.0 and 192.168.2.0
+-----+ +-----+
default | | 192.168.1.0 | | 192.168.2.0
-----------| 1 |--------+--------| 2 |--------+-------- more hosts
| | | | | |
+-----+ | +-----+ |
| |
+-----+ +-----+
| | | |
192.168.1.3 | C | | S | 192.168.2.1
| | | |
+-----+ +-----+
Relevant parts of netstat -rn on C during normal operation:
-------------------------------------------------------------
Destination Gateway Flags Netif Expire
default 192.168.1.1 UGSc fxp0
127.0.0.1 127.0.0.1 UH lo0
192.168.1 link#1 UC fxp0 =>
192.168.1.1 0:e0:18:90:91:bb UHLW fxp0 1182
192.168.1.2 0:e0:18:90:94:c8 UHLW fxp0 1058
192.168.1.3 0:e0:18:90:45:dc UHLW lo0
192.168.1.255 ff:ff:ff:ff:ff:ff UHLWb fxp0
192.168.2 192.168.1.2 UGc fxp0
The syslogd on host C is configured to log messages
to syslogd running on host S. This works perfectly,
all messages appear on host S.
Now we delete the route to net 192.168.2.0 on host C.
When syslogd wants to send another message to S, the
kernel uses the default route which is obvious because
the route to net 192.168.2.0 is gone. We can see the
packets going into router 1. This is OK as well.
Now we bring back the route to net 192.168.2.0 again
on host C exactly as it was before. We can verify
this with netstat -rn on C. We can also ping host S
or telnet to it or do other stuff which all work
perfectly.
The problem is that each time when syslogd on C wants
to send a packet to S, the kernel still uses 1 as router
even though it should send them through 2. After HUPing
or restarting syslogd on C (which means that the UDP socket
is closed and opened again) things are back to normal.
Is this a know "feature"? It seems that as long as the
socket can send the packets somewhere it doesn't bother
if there is a better route to the destination until it
is closed and opened again.
Any hints?
-Andre
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?20010601215449.A3609>
