From owner-freebsd-stable Sat Jan 4 8:25:32 2003 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A76B37B405 for ; Sat, 4 Jan 2003 08:25:29 -0800 (PST) Received: from bessel.tekniikka.turkuamk.fi (bessel.tekniikka.turkuamk.fi [193.166.133.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 326F543F08 for ; Sat, 4 Jan 2003 08:25:27 -0800 (PST) (envelope-from eyurtese@bessel.tekniikka.turkuamk.fi) Received: from localhost (eyurtese@localhost) by bessel.tekniikka.turkuamk.fi (8.9.2/8.9.2) with ESMTP id SAA50290; Sat, 4 Jan 2003 18:25:09 +0200 Date: Sat, 4 Jan 2003 18:25:09 +0200 (WET) From: Evren Yurtesen To: David Magda Cc: Sten Daniel S?rsdal , "Wright, Michaelx L" , fkittred@gwi.net, Michael Sierchio , freebsd-stable@FreeBSD.ORG, wpaul@ctr.columbia.edu Subject: Re: wi0 and mtu setting [bad idea] In-Reply-To: <20030104154328.GA266@number6.magda.ca> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I want to change MTU because I will use PPPoE on wireless interfaces So I need to set the MTU to 1508 so that 1500 byte ethernet frames can be encapsulated in the access point and sent to the client. 1500byte ethernet plus 8byte pppoe overhead makes a total of 1508 bytes MTU which I need. You showed what is the ifmtu default, but how does ifconfig decide what is the maximum MTU for this interface that a user can set? or it doesnt care about the interface and maximum that you can set is 1500? Evren On Sat, 4 Jan 2003, David Magda wrote: > On Sat, Jan 04, 2003 at 02:41:38PM +0200, Evren Yurtesen wrote: > > I just dont understand why FreeBSD people have to make this wi driver so > > tight in standarts even though there are wireless cards which support > > non-standard(and sometimes nice) things which can be useful. I definetely > > disagree that something should be in standard so you will allow setting of > > it! > > The wi(4) driver is treated as an Ethernet device, so it inherits many > of the characteristics of such devices. From /sys/dev/wi/if_wi.c: > > [...] > ifp->if_softc = sc; > ifp->if_unit = sc->wi_unit; > ifp->if_name = "wi"; > ifp->if_mtu = ETHERMTU; > ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; > ifp->if_ioctl = wi_ioctl; > ifp->if_output = ether_output; > ifp->if_start = wi_start; > ifp->if_watchdog = wi_watchdog; > ifp->if_init = wi_init; > ifp->if_baudrate = 10000000; > ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; > [...] > > And if you look at /usr/include/net/ethernet.h: > [...] > #define ETHERMTU (ETHER_MAX_LEN-ETHER_HDR_LEN-ETHER_CRC_LEN) > #define ETHERMIN (ETHER_MIN_LEN-ETHER_HDR_LEN-ETHER_CRC_LEN) > [...] > > If you want to change this you'll have to hack code. Since this is the > first I've heard about it, I don't think many people share your concern > regarding the issue. Is there any reason why you need this > functionality? > > > For example in /etc/defaults/rc.conf it says > > ----------------------------------------------- > > tcp_drop_synfin="NO" # Set to YES to drop TCP packets with SYN+FIN > > # NOTE: this violates the TCP specification > > ----------------------------------------------- > > So why do you let this to violate TCP specifications but you cant let user > > to violate ethernet specifications? > > Perhaps because this does not necessarily break inter-operability > between different hosts, but changing the MTU could. > > There are also issues with compatibility when talking about Ethernet > (though someone mentioned that "WiFi" isn't truly Ethernet). If the > number is less then 1536 most Ethernet drivers assume one type of > encapsulation is used (RFC 894, for "Ethernet" networks), while if it's > greater then 1536 another type is (RFC 1042, for "IEEE 802.3" networks). > > Messing around with the MTU is fine if you can control all the hosts on > the network, but things can get real messy real quickly if any mistakes > are made. > > -- > David Magda > Because the innovator has for enemies all those who have done well under > the old conditions, and lukewarm defenders in those who may do well > under the new. -- Niccolo Machiavelli, _The Prince_, Chapter VI > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message