From owner-freebsd-questions@FreeBSD.ORG Mon Dec 15 22:38:45 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 505BF16A4CE for ; Mon, 15 Dec 2003 22:38:45 -0800 (PST) Received: from rdsnet.ro (smtp.rdsnet.ro [62.231.74.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1592143D32 for ; Mon, 15 Dec 2003 22:38:43 -0800 (PST) (envelope-from itetcu@apropo.ro) Received: (qmail 21658 invoked from network); 16 Dec 2003 06:38:41 -0000 Received: from unknown (HELO it.buh.cameradicommercio.ro) (81.196.25.19) by mail.rdsnet.ro with SMTP; 16 Dec 2003 06:38:41 -0000 Date: Tue, 16 Dec 2003 08:39:27 +0200 From: Ion-Mihai Tetcu To: Valerian Galeru Message-Id: <20031216083927.5436950c.itetcu@apropo.ro> In-Reply-To: <20031216003320.71432.qmail@web12505.mail.yahoo.com> References: <20031216003320.71432.qmail@web12505.mail.yahoo.com> X-Mailer: Sylpheed version 0.9.6claws (GTK+ 1.2.10; i386-portbld-freebsd5.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: routed X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Dec 2003 06:38:45 -0000 On Mon, 15 Dec 2003 16:33:20 -0800 (PST) Valerian Galeru wrote: > I want to understand about these routing tables.... I > run route flush (to remove all routes, gateways...). > Yes, all the routes are deleted(i try a web browser > and i get an error), but when i run netstat -r, i > dont see that. When i want to get again the routing > table, i run routed (probably this is what i need for > regetting the routing table) and when i try a web page > on the web browser, it shows me the same eror as in > the case of the deleted routing table. Probably i did > something wrong... Dou you have a default geteway in your rc.conf ? > Thank you very much or support Contrar to popular belive routed(8) is not necesary when running a standalone computer or event a simple gateway. I've spent half a day arging with a fren on that, just to dicover to our both amusament the cables where plugged each in the other nic ;) Try disable the routed_enable line in /etc/rc.conf or change it to "NO", reboot and you should have netwotk connnection, provided that you have a defaultrouter="xxx.xxx.xxx.xxx" in the above file. Routed(8) use RIP - Route Information Protocol, an interior gateway protocol, which is suitable to use on small networks, which it uses to get routing table from neghbour routers in order to build up a routing table. When you flush the routes you delete the defaul route seted in rc.conf so your system does not know where to send packets for network other that those directly connected. Example: Normal operation, without routed (I don't paste ipv6): it>/home/itetcu# netstat -rn Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.0.1 UGSc 5 0 rl0 127.0.0.1 127.0.0.1 UH 0 4 lo0 192.168.0 link#1 UC 1 0 rl0 192.168.0.1 00:e0:4c:55:c3:13 UHLW 6 56 rl0 it>/home/itetcu# route flush it>/home/itetcu# netstat -rn Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire 127.0.0.1 127.0.0.1 UH 0 4 lo0 192.168.0 link#1 UC 1 0 rl0 192.168.0.1 00:e0:4c:55:c3:13 UHLW 0 190 rl0 1030 The deaflault route has gonw away, the directly connected networks are still present. it>/home/itetcu# ping www.freebsd.org PING www.freebsd.org (216.136.204.117): 56 data bytes ping: sendto: No route to host ping: sendto: No route to host ^C Note that www.freebsd.org resolves on 216.136.204.177 becouse I have a name server on 192.168.0.1 which is on a directly connected network: it>/home/itetcu# route get 192.168.0.1 route to: 192.168.0.1 destination: 192.168.0.1 interface: rl0 flags: recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire 0 0 0 0 0 0 1500 820 Now if I add back the default route with: it>/home/itetcu# route add default 192.168.0.1 0.0.0.0 add net default: gateway 192.168.0.1 it>/home/itetcu# netstat -rn Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.0.1 UGSc 0 0 rl0 127.0.0.1 127.0.0.1 UH 0 4 lo0 192.168.0 link#1 UC 1 0 rl0 192.168.0.1 00:e0:4c:55:c3:13 UHLW 1 222 rl0 935 I get my freebsd connection back: it>/home/itetcu# ping www.freebsd.org PING www.freebsd.org (216.136.204.117): 56 data bytes 64 bytes from 216.136.204.117: icmp_seq=0 ttl=50 time=242.811 ms ^C All this time: it>/home/itetcu# ps axw | grep routed returns nada. Reference, besides the man pages: http://www.onlamp.com/pub/a/bsd/2000/08/23/FreeBSD_Basics.html and the rest networking articles from there. -- IOnut Unregistered ;) FreeBSD user