Eduardo Meyer
2008-Oct-21 19:11 UTC
ifconfig won't allow me to change ether address and inet address in the same command
Hello :) Please, follow: # ifconfig rl0 ether 00:02:4f:0a:ce:f3 inet 192.168.2.12 netmask 255.255.255.0 ifconfig: can't set link-level netmask or broadcast # ifconfig rl0 inet 192.168.2.12 netmask 255.255.255.0 ether 00:02:4f:0a:ce:f3 ifconfig: ether: bad value # ifconfig rl0 inet 192.168.2.12 netmask 255.255.255.0 # ifconfig rl0 ether 00:02:4f:0a:ce:f3 I ask you some help, how can I accomplish both tasks with rc_ng? In /etc/rc.conf ifconfig_rl0="inet 192.168.2.12 netmask 255.255.255.0 ether 00:02:4f:0a:ce:f3" Won't allow me to do what I want. Any suggestions? I would like like to edit /etc/rc.local and any other kind of "workaround". Can rc.conf issue ifconfig twice for the same nic? Or can ifconfig accomplish this task by someway else other than issuing the command twice? Thank you. -- ==========Eduardo Meyer pessoal: dudu.meyer@gmail.com profissional: ddm.farmaciap@saude.gov.br
Freddie Cash
2008-Oct-21 19:44 UTC
ifconfig won't allow me to change ether address and inet address in the same command
On October 21, 2008 11:48 am Eduardo Meyer wrote:> Please, follow: > > # ifconfig rl0 ether 00:02:4f:0a:ce:f3 inet 192.168.2.12 netmask > 255.255.255.0 ifconfig: can't set link-level netmask or broadcast > > # ifconfig rl0 inet 192.168.2.12 netmask 255.255.255.0 ether > 00:02:4f:0a:ce:f3 ifconfig: ether: bad value > > # ifconfig rl0 inet 192.168.2.12 netmask 255.255.255.0 > # ifconfig rl0 ether 00:02:4f:0a:ce:f3 > > I ask you some help, how can I accomplish both tasks with rc_ng? In > /etc/rc.conf > > ifconfig_rl0="inet 192.168.2.12 netmask 255.255.255.0 ether > 00:02:4f:0a:ce:f3"You can split it across two ifconfig lines using the alias feature in rc.conf: ifconfig_rl0="ether 00:02:4f:0a:ce:f3" ifconfig_rl0_alias0="inet 192.168.2.12 netmask 255.255.255.0" We use something similar for setting interface options and vlans separate from adding IPs to the interface. -- Freddie Cash fjwcash@gmail.com
VANHULLEBUS Yvan
2008-Oct-21 20:41 UTC
ifconfig won't allow me to change ether address and inet address in the same command
On Tue, Oct 21, 2008 at 04:48:50PM -0200, Eduardo Meyer wrote:> Hello :)Hi.> Please, follow: > > # ifconfig rl0 ether 00:02:4f:0a:ce:f3 inet 192.168.2.12 netmask 255.255.255.0 > ifconfig: can't set link-level netmask or broadcast > > # ifconfig rl0 inet 192.168.2.12 netmask 255.255.255.0 ether 00:02:4f:0a:ce:f3 > ifconfig: ether: bad value > > # ifconfig rl0 inet 192.168.2.12 netmask 255.255.255.0 > # ifconfig rl0 ether 00:02:4f:0a:ce:f3 > > I ask you some help, how can I accomplish both tasks with rc_ng? In /etc/rc.conf > > ifconfig_rl0="inet 192.168.2.12 netmask 255.255.255.0 ether 00:02:4f:0a:ce:f3" > > Won't allow me to do what I want. Any suggestions? I would like like > to edit /etc/rc.local and any other kind of "workaround". Can rc.conf > issue ifconfig twice for the same nic? > > Or can ifconfig accomplish this task by someway else other than > issuing the command twice?For your information, I already filled PR bin/124004 some moths ago related to that issue. Yvan.
John Hay
2008-Oct-21 20:45 UTC
ifconfig won't allow me to change ether address and inet address in the same command
On Tue, Oct 21, 2008 at 04:48:50PM -0200, Eduardo Meyer wrote:> Hello :) > > Please, follow: > > # ifconfig rl0 ether 00:02:4f:0a:ce:f3 inet 192.168.2.12 netmask 255.255.255.0 > ifconfig: can't set link-level netmask or broadcast > > # ifconfig rl0 inet 192.168.2.12 netmask 255.255.255.0 ether 00:02:4f:0a:ce:f3 > ifconfig: ether: bad value > > # ifconfig rl0 inet 192.168.2.12 netmask 255.255.255.0 > # ifconfig rl0 ether 00:02:4f:0a:ce:f3 > > I ask you some help, how can I accomplish both tasks with rc_ng? In /etc/rc.conf > > ifconfig_rl0="inet 192.168.2.12 netmask 255.255.255.0 ether 00:02:4f:0a:ce:f3" > > Won't allow me to do what I want. Any suggestions? I would like like > to edit /etc/rc.local and any other kind of "workaround". Can rc.conf > issue ifconfig twice for the same nic?What about: ifconfig_rl0="ether 00:02:4f:0a:ce:f3" ipv4_addrs_rl0="192.168.2.12/24" John -- John Hay -- John.Hay@meraka.csir.co.za / jhay@FreeBSD.org
Maciej Suszko
2008-Oct-22 04:53 UTC
ifconfig won't allow me to change ether address and inet address in the same command
"Eduardo Meyer" <dudu.meyer@gmail.com> wrote:> Hello :) > > Please, follow: > > # ifconfig rl0 ether 00:02:4f:0a:ce:f3 inet 192.168.2.12 netmask > 255.255.255.0 ifconfig: can't set link-level netmask or broadcast > > # ifconfig rl0 inet 192.168.2.12 netmask 255.255.255.0 ether > 00:02:4f:0a:ce:f3 ifconfig: ether: bad value > > # ifconfig rl0 inet 192.168.2.12 netmask 255.255.255.0 > # ifconfig rl0 ether 00:02:4f:0a:ce:f3 > > I ask you some help, how can I accomplish both tasks with rc_ng? > In /etc/rc.conf > > ifconfig_rl0="inet 192.168.2.12 netmask 255.255.255.0 ether > 00:02:4f:0a:ce:f3" > > Won't allow me to do what I want. Any suggestions? I would like like > to edit /etc/rc.local and any other kind of "workaround". Can rc.conf > issue ifconfig twice for the same nic? > > Or can ifconfig accomplish this task by someway else other than > issuing the command twice?Use ifconfig_rl0_alias0 for second task. -- regards, Maciej Suszko. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 195 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20081022/fe014c7d/signature.pgp
Oliver Fromme
2008-Oct-27 16:09 UTC
ifconfig won't allow me to change ether address and inet address in ?the same command
Eduardo Meyer wrote: > # ifconfig rl0 ether 00:02:4f:0a:ce:f3 inet 192.168.2.12 netmask 255.255.255.0 > ifconfig: can't set link-level netmask or broadcast > > # ifconfig rl0 inet 192.168.2.12 netmask 255.255.255.0 ether 00:02:4f:0a:ce:f3 > ifconfig: ether: bad value > > # ifconfig rl0 inet 192.168.2.12 netmask 255.255.255.0 > # ifconfig rl0 ether 00:02:4f:0a:ce:f3 > > I ask you some help, how can I accomplish both tasks with rc_ng? In /etc/rc.conf > > ifconfig_rl0="inet 192.168.2.12 netmask 255.255.255.0 ether 00:02:4f:0a:ce:f3" > > Won't allow me to do what I want. Any suggestions? I would like like > to edit /etc/rc.local and any other kind of "workaround". Can rc.conf > issue ifconfig twice for the same nic? > > Or can ifconfig accomplish this task by someway else other than > issuing the command twice? Others have already suggested several workarounds. Another possibility is to set only the IP via rc.conf: ifconfig_rl0="inet 192.168.2.12 netmask 255.255.255.0" And set the MAC address with an interface start script which should be named /etc/start_if.rl0 in your case and contain this line: ifconfig rl0 ether 00:02:4f:0a:ce:f3 Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Gesch?ftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht M?n- chen, HRB 125758, Gesch?ftsf?hrer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "What is this talk of 'release'? We do not make software 'releases'. Our software 'escapes', leaving a bloody trail of designers and quality assurance people in its wake."