From owner-freebsd-bugs@FreeBSD.ORG Sat Oct 28 16:10:20 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 82BAE16A47E for ; Sat, 28 Oct 2006 16:10:20 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 22A3C43D6B for ; Sat, 28 Oct 2006 16:10:19 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k9SGAInw051099 for ; Sat, 28 Oct 2006 16:10:18 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k9SGAI4X051096; Sat, 28 Oct 2006 16:10:18 GMT (envelope-from gnats) Resent-Date: Sat, 28 Oct 2006 16:10:18 GMT Resent-Message-Id: <200610281610.k9SGAI4X051096@freefall.freebsd.org> Message-Id: <200610281610.k9SGAI4X051096@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Norikatsu Shigemura Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E124716A415 for ; Sat, 28 Oct 2006 16:09:37 +0000 (UTC) (envelope-from nork@FreeBSD.org) Received: from sakura.ninth-nine.com (sakura.ninth-nine.com [219.127.74.120]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F40743D69 for ; Sat, 28 Oct 2006 16:09:37 +0000 (GMT) (envelope-from nork@FreeBSD.org) Received: from nadesico.ninth-nine.com (nadesico.ninth-nine.com [219.127.74.122]) by sakura.ninth-nine.com (8.13.8/8.13.8/NinthNine) with SMTP id k9SG9ZbV073169 for ; Sun, 29 Oct 2006 01:09:35 +0900 (JST) (envelope-from Message-Id: <20061029010934.5afef73e.nork@FreeBSD.org> Date: Sun, 29 Oct 2006 01:09:34 +0900 From: Norikatsu Shigemura To: FreeBSD-gnats-submit@FreeBSD.org Cc: Subject: conf/104884: Add support EtherChannel configuration to rc.conf X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Oct 2006 16:10:20 -0000 >Number: 104884 >Category: conf >Synopsis: Add support EtherChannel configuration to rc.conf >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Oct 28 16:10:18 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Norikatsu Shigemura >Release: FreeBSD 6.2-PRERELEASE i386 >Organization: Ensure Technology LTD. >Environment: System: FreeBSD melfina.ninth-nine.com 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #32: Sun Oct 22 05:57:55 JST 2006 nork@melfina.ninth-nine.com:/usr/obj/usr/src/sys/MELFINA i386 >Description: Add support EtherChannel configuration to rc startup script. How to use it: /etc/rc.conf - - - - - - - - - - - - - - - - - - - - - - - - - - - fec_interfaces="fec0" fecconfig_fec0="fxp0 fxp1" ifconfig_fec0="DHCP" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - And reboot the machine. >How-To-Repeat: None. >Fix: Obtained from: net/dtcpclient Thanks: ume I tested with Cisco Catalyst 2940 and FreeBSD 6.2-PRERELEASE. --- fecconfig.diff begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # DIFF.etc-defaults-rc.conf # DIFF.etc-network.subr # DIFF.etc-rc.d-netif # echo x - DIFF.etc-defaults-rc.conf sed 's/^X//' >DIFF.etc-defaults-rc.conf << 'END-of-DIFF.etc-defaults-rc.conf' X--- etc/defaults/rc.conf.orig Mon Oct 16 13:32:35 2006 X+++ etc/defaults/rc.conf Tue Oct 24 22:52:02 2006 X@@ -178,6 +178,10 @@ X # Choose correct tunnel addrs. X #gifconfig_gif0="10.1.1.1 10.1.2.1" # Examples typically for a router. X #gifconfig_gif1="10.1.1.2 10.1.2.2" # Examples typically for a router. X+fec_interfaces="NO" # List of Fast EtherChannels (or "NO") X+#fec_interfaces="fec0 fec1" X+#fecconfig_fec0="fxp0 dc0" # Examples typically for two NICs X+#fecconfig_fec1="em0 em1 bge0 bge1" # Examples typically for four NICs X X # User ppp configuration. X ppp_enable="NO" # Start user-ppp (or NO). END-of-DIFF.etc-defaults-rc.conf echo x - DIFF.etc-network.subr sed 's/^X//' >DIFF.etc-network.subr << 'END-of-DIFF.etc-network.subr' X--- etc/network.subr.orig Thu Oct 12 01:16:37 2006 X+++ etc/network.subr Tue Oct 24 22:50:41 2006 X@@ -907,3 +907,78 @@ X esac X done X } X+ X+ng_mkpeer() { X+ ngctl -f - 2> /dev/null < /dev/null 2>&1 X+ X+ bogus="" X+ while true; do X+ iface=`ng_create_one fec dummy fec` X+ if [ -z "${iface}" ]; then X+ exit 2 X+ fi X+ if [ "${iface}" = "${req_iface}" ]; then X+ echo ${iface} X+ break X+ fi X+ bogus="${bogus} ${iface}" X+ done X+ X+ for iface in ${bogus}; do X+ ngctl shutdown ${iface}: X+ done X+} X+ X+# fec_up ifn X+# Configure Fast EtherChannel for interface $ifn. Returns 0 if FEC X+# arguments were found and configured; returns 1 otherwise. X+fec_up() { X+ case ${fec_interfaces} in X+ [Nn][Oo] | '') X+ ;; X+ *) X+ for i in ${fec_interfaces}; do X+ ng_fec_create $i X+ for j in `get_if_var $i fecconfig_IF`; do X+ case ${j} in X+ '') X+ continue X+ ;; X+ *) X+ ngctl msg ${i}: add_iface "\"${j}\"" X+ ;; X+ esac X+ done X+ done X+ ;; X+ esac X+} END-of-DIFF.etc-network.subr echo x - DIFF.etc-rc.d-netif sed 's/^X//' >DIFF.etc-rc.d-netif << 'END-of-DIFF.etc-rc.d-netif' X--- etc/rc.d/netif.orig Tue Jul 25 05:46:14 2006 X+++ etc/rc.d/netif Tue Oct 24 22:53:00 2006 X@@ -57,6 +57,9 @@ X # Create cloned interfaces X clone_up X X+ # Create Fast EtherChannel interfaces X+ fec_up X+ X # Create IPv6<-->IPv4 tunnels X gif_up X END-of-DIFF.etc-rc.d-netif exit --- fecconfig.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: