Date: Mon, 16 Dec 2002 16:45:31 +0200 From: Ruslan Ermilov <ru@FreeBSD.ORG> To: Svetoslav Agafonkin <agius2@yahoo.com> Cc: freebsd-net@FreeBSD.ORG Subject: Re: RTF_CLONING and RTF_WASCLONED flags - cloning mechanisum question Message-ID: <20021216144531.GB13297@sunbay.com> In-Reply-To: <20021216113948.382.qmail@web21205.mail.yahoo.com> References: <20021216113948.382.qmail@web21205.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--aM3YZ0Iwxop3KEKx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable It's done in the arp_rtrequest() function and is controlled by the net.link.ether.inet.useloopback sysctl. On Mon, Dec 16, 2002 at 03:39:48AM -0800, Svetoslav Agafonkin wrote: >=20 > flober# uname -a > FreeBSD flober 4.7-RELEASE FreeBSD 4.7-RELEASE #5: > Thu Dec 5 22:01:28 EET 2002 > root@flober:/usr/obj/usr/src/sys/AKERNEL i386 >=20 > I've got this question about flags C (RTF_CLONING) > and W (RTF_WASCLONED)(struct rtentry): >=20 > Let there are two active interfaces - fxp0 > (ethernet) i lo0 (loopback): >=20 > flober# ifconfig >=20 > fxp0: > flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu > 1500 > inet 192.168.1.1 netmask 0xffffff00 broadcast > 192.168.1.255 > ether 00:06:29:b0:df:65 > media: Ethernet autoselect (none) > status: no carrier > lp0: flags=3D8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu > 1500 > ppp0: flags=3D8010<POINTOPOINT,MULTICAST> mtu 1500 > sl0: flags=3Dc010<POINTOPOINT,LINK2,MULTICAST> mtu > 552 > faith0: flags=3D8002<BROADCAST,MULTICAST> mtu 1500 > lo0: flags=3D8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu > 16384 > inet 127.0.0.1 netmask 0xff000000 >=20 >=20 > initial routing table : >=20 > flober# netstat -rn > Routing tables >=20 > Internet: > Destination Gateway Flags Refs > Use Netif Expire > 127.0.0.1 127.0.0.1 UH 0 > 0 lo0 > 192.168.1 link#1 UC 0 > 0 fxp0 >=20 > the flag C in the entry route to 192.168.1.0/24 means > that every time we use that entry (via > rtalloc/rtrequest/rtrequest_ign(/sys/net/route.c)) it > will be cloned (i.e. a new entry will be created > using the old a a template).Let's see: >=20 > for example: >=20 > flober# ping 192.168.1.1 >=20 > ... >=20 > flober# netstat -rn > Routing tables >=20 > Internet: > Destination Gateway Flags Refs =20 > Use Netif Expire > 127.0.0.1 127.0.0.1 UH 0=20 > 0 lo0 > 192.168.1 link#1 UC 1=20 > 0 fxp0 > 192.168.1.1 00:06:29:b0:df:65 UHLW 0=20 > 4 lo0 >=20 > How fxp0 interface is changed to lo0? Where exactly in > the source (rtrequest)this is done? >=20 >=20 > Svetoslav Agafonkin >=20 >=20 >=20 >=20 > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. > http://mailplus.yahoo.com >=20 > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message --=20 Ruslan Ermilov Sysadmin and DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age --aM3YZ0Iwxop3KEKx Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE9/ecKUkv4P6juNwoRAshoAJ9VFmLUcGvzU9YvZqd5ATgM9LgtDgCfR9VB oQscOL2d559WRZUoJjTNqVo= =2WbC -----END PGP SIGNATURE----- --aM3YZ0Iwxop3KEKx-- 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?20021216144531.GB13297>