From owner-freebsd-questions@freebsd.org Mon Jul 22 08:50:22 2019 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 40F1EABEAB for ; Mon, 22 Jul 2019 08:50:22 +0000 (UTC) (envelope-from 76nemo76@gmx.ch) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3468F8B287 for ; Mon, 22 Jul 2019 08:50:20 +0000 (UTC) (envelope-from 76nemo76@gmx.ch) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1563785409; bh=rqHADv2FqsIqURnPgC3QnwCTl1rVvyj9wDecO7DWQx8=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=Hr3o+H1tq3YRItFm7OrxNFbPQuXGPECozojzu/spyUA7lwSc+olawe8WbLsENAbQf Ax+K1+gAEFlAcYfBkcsJeyHXKWh5Wmo8vyP3qLmplyVclE8ZpXDFVKbVgQJF+1+9Im SVkymtnlEmuAXKHN9bDDfRf17fgHdv6V5QE7W0kY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.88.189] ([85.195.219.254]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M7kwW-1ibvUx0hwO-00vOPX; Mon, 22 Jul 2019 10:25:47 +0200 Subject: Re: Assign an IP address to a bridge fail To: =?UTF-8?B?S2FtaWxhIFNvdcSNa292w6E=?= Cc: freebsd-questions@freebsd.org References: <240458a3-789a-7368-1848-e7dc66bb2eb7@gmx.ch> From: Pierre Dupond <76nemo76@gmx.ch> Message-ID: <316cb53f-4dad-90c1-664b-7a139ef8950e@gmx.ch> Date: Mon, 22 Jul 2019 10:25:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Provags-ID: V03:K1:rvqj5+QlXo9ARBGRZTAxuvY9eaoEPI/WXhb5RDo882fkkm2w6LH svFmw0HU0/LQ37hMa53CY3PpdlpFX86uKCoNUJw/mImgZKbbLjvjZlUOVNoiSF7FA8TaUJ2 sUzoH0w1CalUyTDAEcixcNDZ43wpUV5HRo0djs4kcFvqFtCWzXe575BdOaTWkPNicCNB/e0 vZr6L/zMN2Cq69w4JpfFA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:XDURahCagM4=:JEnhlcwlFrCxi2b0eWLhOP pUBcS8+0nMPgLLMwkWNA6t3OtbeC9WsLUHF3LjHmks7Sxh/WmlfmZ+hy8g3qtTtbTDjKU82Df nCr3ASTucOntTESV6wknKBDcBV6PhyB3nzFTs/7dwOtGBmothNk38a+gFlUSvntlINaaiQ1yC VH+xtZ6+hH73u2oxhXEjq+GefNJbmMEdO1xgDJ1jDLuz/9Z1eK2RdsrTOO3t/6YHsGIY15ckR rR485hH7HZ6fMFn27x1O7/XaNZJiNJ1lJ/aL4LEQwuxRVxsxOeJM4P3TB0fMBF7iSyZY6dyqV 7CWy2WLKQ/egmHDepbVRxAHfb8YDRLqzwCdz/1Twi2PCdk29G2SUGioO/NW043/yF6FK7Aomz 4Rn55L25G76O30oDyYryeSRzEP6BhiVKCRKt+JiCFMIpf/rGPmDUZPwM7VcT+x6PeZZIFcVO/ 2TQRZRc5fM4vIlz5Tqx35tBiay1fSgesz87JUtxBIvSeREFFde4ZdbEa3MyQbPdgjAAp0cn7l cQdCtL1BHpo0kE/8G56B4N5JlE0LA+4uncxG5ifY0lYDaYZj0CLF8++SSxNNnjm++/K/vTCTB joddTnlzHpraMkuDt/h0o1Zx0rcJSJWQyGMUNoG50T+iKn8bPrDORcyxD7HZxyxOM/lK358Kn r+BdLDettt3Bz3xub8lKLkb+DwgojidVhQjJTVJ1HeJ9sIYfCCVu0Y5eRkn8DqlXUBs2zlelg VViGqj/5UOXPpqJW+gtO7SvKvVSalRuJRpZryJylwgRakpkysWLJxJDRDb18i1u2yuKCh2spA jYyP/CnYrowJGmn4X8N6xl3rO48RGbJo6ghF/uf0rLgeRsMjb4WW5Zgd5gW2A5myL91PT2lKw yKK2V35b+EkWgrjV7ccxdZgTOKFJeym/iF64/eUmEWfRQHEcBKx9i+X7ATbEXp8gbuEk8sXXf mK6OREasM+ZrZBSvSCfmZMXx+QtR76ieY1V5JM/4oWhYIjxborGGJGjmKZfph6K0UhfSCKgCT XWb/VcSemJPzpsYZGWfRHu8l8T+mrNBJqLC5zSQuCUE//NBfTKvLcxoMwTWktsgIGvdAyf3it JabpKjLaO5x5lc= X-Rspamd-Queue-Id: 3468F8B287 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.b=Hr3o+H1t; spf=pass (mx1.freebsd.org: domain of 76nemo76@gmx.ch designates 212.227.17.20 as permitted sender) smtp.mailfrom=76nemo76@gmx.ch X-Spamd-Result: default: False [-3.92 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmx.ch]; R_SPF_ALLOW(-0.20)[+ip4:212.227.17.0/27]; MX_GOOD(-0.01)[cached: mx00.emig.gmx.net]; DKIM_TRACE(0.00)[gmx.net:+]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.25)[-0.248,0]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_IN_DNSWL_LOW(-0.10)[20.17.227.212.list.dnswl.org : 127.0.3.1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmx.ch]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmx.net:s=badeba3b8450]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[gmx.ch]; TO_MATCH_ENVRCPT_SOME(0.00)[]; IP_SCORE(-1.07)[ip: (-6.27), ipnet: 212.227.0.0/16(-1.43), asn: 8560(2.37), country: DE(-0.01)]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jul 2019 08:50:22 -0000 Hi, =C2=A0=C2=A0=C2=A0=C2=A0 Thanks for the tip. I have slightly modified the file "/etc/rc.conf" and now the network is setup correctly. You have t= o note that the command "inet 172.16.0.11" (in the variable "ifconfig_bridge0") should appear first otherwise the address is not set. By the way, since there is 4 igb cards on this machine, it seems to be a good idea to add this instruction: kern.ipc.nmbclusters=3D"131072" in the file "/boot/loader.conf" as it is mentioned in the man page of the "igb" driver and in this link: =C2=A0=C2=A0 https://docs.netgate.com/pfsense/en/latest/hardware/tuning-and-troubleshoo= ting-network-cards.html best regards, =2D----------------------------------------------Functioning file rc.conf----------------------------------------------------------- #The configuration of the network. The four #network cards of the APU are used here as a unique bridge. # #Since this machine is often used as a server, #having a bridge can avoid to cable an external #switch to connect to it some other net devices. cloned_interfaces=3D"bridge0" ifconfig_igb0=3D"up" ifconfig_igb1=3D"up" ifconfig_igb2=3D"up" ifconfig_igb3=3D"up" #Only one variable "ifconfig_bridge0" should be defined #and the address specification should be the first parameter. #With this solution the bridge is correctly configured at boot, #otherwise some strange and wrong things happen and the network #does not work. ifconfig_bridge0=3D"inet 192.168.1.11/23 addm igb0 addm igb1 addm igb2 addm igb3 up" defaultrouter=3D"192.168.1.1" #To have all the interfaces (present and future, for instance #when dynamically created) with the IPv6 capability ipv6_activate_all_interfaces=3D"YES" # #Force the creation of temporary IPv6 address. Complicate #tracing ipv6_privacy=3D"YES" #All the network prefixes used on this interface. ipv6_prefix_bridge0=3D"2000:0:0:0 fd:0:0:0" #Prefer IPv6 address when possible by using rules #described in RFC 6724. ip6addrctl_enable=3D"ipv6_prefer" ifconfig_bridge0_ipv6=3D"inet6 fd::2 prefixlen 64" ifconfig_bridge0_alias0=3D"inet6 2000::2 prefixlen 64" ipv6_defaultrouter=3D"fd0::1" # #Reste de la config #------------------ # clear_tmp_enable=3D"YES" hostname=3D"oche.local.sourire.ch" sshd_enable=3D"YES" ntpdate_enable=3D"YES" ntpd_enable=3D"YES" powerd_enable=3D"YES" # Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable dumpdev=3D"AUTO" zfs_enable=3D"YES" Le 21/07/2019 =C3=A0 23:16, Kamila Sou=C4=8Dkov=C3=A1 a =C3=A9crit=C2=A0: > > > On Sun, 21 Jul 2019, 20:30 Pierre Dupond, <76nemo76@gmx.ch > > wrote: > > Hi all, > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 I am facing a= strange problem. Just after installing a fresh > > Freebsd 12 on an Pc Engines APU machine, I build a bridge with the 4 > > network cards. > > > If I try to setup the address of the bridge in the "/etc/rc.conf" > file, > I can not ping (outside the address > > given to the bridge). But if I comment the line for setting the > address > in the file > > "/etc/rc.conf" and I set the address manually with the command > > "ifconfig bridge0 inet 172.16.0.11 netmask 255.255.254.0" the ping > works. > > Do I have made an obvious mistake in the "rc.conf" file? What could = be > the reason of this problem? > > Any ideas would be greatly appreciated. > > > best regards, > > > ----------------------------------Content of the rc.conf > file---------------------------------------------------------- > root@oche:~ # cat /tmp/rc.conf > cat: /tmp/rc.conf: No such file or directory > root@oche:~ # cat /etc/rc.conf > cloned_interfaces=3D"bridge0" > ifconfig_bridge0=3D"addm igb0 addm igb1 addm igb2 addm igb3 up" > ifconfig_igb0=3D"up" > ifconfig_igb1=3D"up" > ifconfig_igb2=3D"up" > ifconfig_igb3=3D"up" > ifconfig_bridge0=3D"inet 172.16.0.11 netmask 255.255.254.0" > defaultrouter=3D"172.16.0.10" > # > #Reste de la config > #------------------ > # > clear_tmp_enable=3D"YES" > hostname=3D"oche.local.sourire.ch " > sshd_enable=3D"YES" > ntpdate_enable=3D"YES" > ntpd_enable=3D"YES" > powerd_enable=3D"YES" > # Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable > dumpdev=3D"AUTO" > > -----------------------------------------------Info about the > bridge and > ping commands > > bridge0: flags=3D8843 metric > 0 mtu > 1500 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ether 02:91:bc:80:6d:00 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 inet 172.16.0.11 netmask = 0xfffffe00 broadcast 172.16.1.255 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 id 00:00:00:00:00:00 prio= rity 32768 hellotime 2 fwddelay 15 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 maxage 20 holdcnt 6 proto= rstp maxaddr 2000 timeout 1200 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 root id 00:00:00:00:00:00= priority 32768 ifcost 0 port 0 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 groups: bridge > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 nd6 options=3D9 > root@oche:~ # ping 172.16.0.11 > PING 172.16.0.11 (172.16.0.11): 56 data bytes > 64 bytes from 172.16.0.11 : icmp_seq=3D0 ttl=3D6= 4 > time=3D0.221 ms > 64 bytes from 172.16.0.11 : icmp_seq=3D1 ttl=3D6= 4 > time=3D0.202 ms > 64 bytes from 172.16.0.11 : icmp_seq=3D2 ttl=3D6= 4 > time=3D0.203 ms > ^C > --- 172.16.0.11 ping statistics --- > 3 packets transmitted, 3 packets received, 0.0% packet loss > round-trip min/avg/max/stddev =3D 0.202/0.209/0.221/0.009 ms > root@oche:~ # ping 172.16.0.10 > PING 172.16.0.10 (172.16.0.10): 56 data bytes > ping: sendto: Host is down > ping: sendto: Host is down > ping: sendto: Host is down > ping: sendto: Host is down > ^C > --- 172.16.0.10 ping statistics --- > 4 packets transmitted, 0 packets received, 100.0% packet loss=C2=A0 > > > You're redefining ifconfig_bridge0 in your rc.conf (you have it there > twice).=C2=A0 > > Also, there were some issues with bridge config in rc.conf, but I > don't recall the details. In any case, not having ifconfig_bridge0 > twice is a good start.=C2=A0 > > Best,=C2=A0 > Kamila=C2=A0 > (sent from my phone)=C2=A0 >