Re: ifconfig in rc.conf network problems

2004-05-31 Thread Marco Beishuizen
On stardate Sun, 30 May 2004, the wise Joost Bekkers entered:
On Sun, May 30, 2004 at 11:34:43PM +0200, Olaf Hoyer wrote:
2) put the media change in a separate shell script, and throw it unter
/usr/local/etc/rc.d, so that it will be executed later on
something like:
cat dc0-speedchange.sh
#!/bin/sh
ifconfig dc0 media 100baseTX
You might want to put stuff like that in /etc/start_if.dc0
It gets executed just before the ip address is set or dhclient
is started.
Yes, this did the trick.
Thanks,
Marco
--
Message will arrive in the mail.  Destroy, before the FBI sees it.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: ifconfig in rc.conf network problems

2004-05-31 Thread Marco Beishuizen
On stardate Sun, 30 May 2004, the wise Warren Block entered:
On Sun, 30 May 2004, Marco Beishuizen wrote:
I used to have two ifconfig lines in my rc.conf:
ifconfig_dc0=DHCP
ifconfig_dc0=media autoselect
The first to enable DHCP and the second to set my networkcard to 100BaseTX 
full duplex.
Can rc.conf work that way?  rc.conf is just a shell script, and you're 
assigning values to variables, so the second declaration would overwrite the 
first.  As to why that would have worked for you...  After dhclient runs 
successfully once, some of the information is kept on disk (resolv.conf, 
default route).  Maybe it was enough?
I don't know why but it did work. Now I put the media autoselect line in 
/etc/start_if.dc0 and that works.
Thanks,

Marco
--
Vote for ME -- I'm well-tapered, half-cocked, ill-conceived and
TAX-DEFERRED!
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: ifconfig in rc.conf network problems

2004-05-30 Thread Olaf Hoyer
On Sun, 30 May 2004, Marco Beishuizen wrote:


 I used to have two ifconfig lines in my rc.conf:
 ifconfig_dc0=DHCP
 ifconfig_dc0=media autoselect

 The first to enable DHCP and the second to set my networkcard to 100BaseTX
 full duplex.

 Now after an upgrade to 4.10-release this doesn't work anymore. When I put
 both lines in rc.conf only the second line is effective and overrides the
 first, but I want to use both DHCP and 100BaseTX. I need to use the media
 autoselect because the networkcard defaults to 10BaseT but I want to use
 100Mbit. When I don't use DHCP the network is unreachable. Pinging then
 gives a no route to host.


There are two solutions:

1) (Untested by me)

ifconfig_dc0=DHCP media 100baseTX

2) put the media change in a separate shell script, and throw it unter
/usr/local/etc/rc.d, so that it will be executed later on

something like:

cat dc0-speedchange.sh
#!/bin/sh
ifconfig dc0 media 100baseTX

HTH
Olaf
-- 
Olaf Hoyer[EMAIL PROTECTED]
Fuerchterliche Erlebniss geben zu raten,
ob der, welcher sie erlebt, nicht etwas Fuerchterliches ist.
(Nietzsche, Jenseits von Gut und Boese)
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: ifconfig in rc.conf network problems

2004-05-30 Thread Joost Bekkers
On Sun, May 30, 2004 at 11:34:43PM +0200, Olaf Hoyer wrote:
 
 2) put the media change in a separate shell script, and throw it unter
 /usr/local/etc/rc.d, so that it will be executed later on
 
 something like:
 
 cat dc0-speedchange.sh
 #!/bin/sh
 ifconfig dc0 media 100baseTX
 

You might want to put stuff like that in /etc/start_if.dc0
It gets executed just before the ip address is set or dhclient
is started.


-- 
greetz Joost
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: ifconfig in rc.conf network problems

2004-05-30 Thread Warren Block
On Sun, 30 May 2004, Marco Beishuizen wrote:
I used to have two ifconfig lines in my rc.conf:
ifconfig_dc0=DHCP
ifconfig_dc0=media autoselect
The first to enable DHCP and the second to set my networkcard to 100BaseTX 
full duplex.
Can rc.conf work that way?  rc.conf is just a shell script, and you're 
assigning values to variables, so the second declaration would overwrite 
the first.  As to why that would have worked for you...  After dhclient 
runs successfully once, some of the information is kept on disk 
(resolv.conf, default route).  Maybe it was enough?

Now after an upgrade to 4.10-release this doesn't work anymore. When I put 
both lines in rc.conf only the second line is effective and overrides the 
first, but I want to use both DHCP and 100BaseTX. I need to use the media 
autoselect because the networkcard defaults to 10BaseT but I want to use 
100Mbit. When I don't use DHCP the network is unreachable. Pinging then gives 
a no route to host.
There's an example of specifying media type in the dhclient.conf man 
page.

-Warren Block * Rapid City, South Dakota USA
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]