Re: two dc cards on 5.4
On Thu, Aug 11, 2005 at 11:07:45PM +0930, Malcolm Kay wrote: > > On Thu, 11 Aug 2005 07:47 pm, Matthew Seaman wrote: > > On Wed, Aug 10, 2005 at 05:33:30PM -0700, Sean Murphy wrote: > > > Sean Murphy wrote: > > > >dave wrote: > > > >>Hi, > > > >>Thanks for your reply. I'll give that a shot. My > > > >> problem is the dc0 card > > > >>gets it's ip via dhcp, can i still use media and mediaopt > > > >> with dhcp? Thanks. > > > >>Dave. > > > >> > > > >>___ > > > >>freebsd-questions@freebsd.org mailing list > > > >>http://lists.freebsd.org/mailman/listinfo/freebsd-question > > > >>s To unsubscribe, send any mail to > > > >>"[EMAIL PROTECTED]" > > > > > > > >try this in your rc.conf > > > > > > > >ifconfig_dc0="DHCP" > > > >ifconfig_dc0="100baseTX mediaopt full-duplex" > > > > > > > >ifconfig_dc1="DHCP" > > > >ifconfig_dc1="100baseTX mediaopt full-duplex" > > > > > > *Correction* > > > > > > ifconfig_dc0="DHCP" > > > ifconfig_dc0="media 100baseTX mediaopt full-duplex" > > > > > > ifconfig_dc1="DHCP" > > > ifconfig_dc1="media 100baseTX mediaopt full-duplex" > > > > Unfortunately, that won't work. /etc/rc.conf is part of a > > shell script, and all of those variable=value lines within it > > are literally assignments to shell variables. Thus all you're > > doing with those lines is setting 'ifconfig_dcX' to the value > > "DHCP" and then immediately resetting it to the value "media > > 100baseTX mediaopt full-duplex". > > > > On recent FreeBSD 6.x you can just combine the lines: > > > > ifconfig_dc0="DHCP media 100baseTX mediaopt full-duplex" > > > > (I can't remember if that also works on 5.x -- you'll need to > > read /etc/network.subr to find out). > > It would seem that the "DHCP" value causes a call to 'dhclient' > rather than 'ifconfig' and dhclient.conf(5) suggests that this is > where the options for a DHCP interface should reside. > > Malcolm Kay I think you are correct. The original poster could try: ifconfig_dc0="DHCP" in rc.conf and: interface "dc0" { media "media 10baseT/UTP"; } in /etc/dhclient.conf. Disclaimer: this is for ISC dhcp (I'm running 4.11, so you have to check the manpage). > > > > > In any case, and certainly for older FreeBSD versions you can > > always create a /etc/start_if.dc0 script, which will be run > > immediately before the ifconfig(8) command generated out of > > /etc/rc.conf. In your case, the script should look like: > > > > #!/bin/sh > > > > ifconfig dc0 media 100baseTX mediaopt full-duplex > > > > but you can put any arbitrary commands in there that you want. > > Ditto for the dc1 interface, except call the script > > /etc/start_if.dc1 (if that isn't bleedingly obvious...) There > > are corresponding /etc/stop_if.XXN scripts that can be created > > to do arbitrary stuff on interface shutdown as well. > > > >Cheers, > > > >Matthew > > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > -- Frank echo "f r a n k @ e s p e r a n c e - l i n u x . c o . u k" | sed 's/ //g' --->PGP keyID: 0x10BD6F4B<--- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: two dc cards on 5.4
On Thu, 11 Aug 2005 07:47 pm, Matthew Seaman wrote: > On Wed, Aug 10, 2005 at 05:33:30PM -0700, Sean Murphy wrote: > > Sean Murphy wrote: > > >dave wrote: > > >>Hi, > > >>Thanks for your reply. I'll give that a shot. My > > >> problem is the dc0 card > > >>gets it's ip via dhcp, can i still use media and mediaopt > > >> with dhcp? Thanks. > > >>Dave. > > >> > > >>___ > > >>freebsd-questions@freebsd.org mailing list > > >>http://lists.freebsd.org/mailman/listinfo/freebsd-question > > >>s To unsubscribe, send any mail to > > >>"[EMAIL PROTECTED]" > > > > > >try this in your rc.conf > > > > > >ifconfig_dc0="DHCP" > > >ifconfig_dc0="100baseTX mediaopt full-duplex" > > > > > >ifconfig_dc1="DHCP" > > >ifconfig_dc1="100baseTX mediaopt full-duplex" > > > > *Correction* > > > > ifconfig_dc0="DHCP" > > ifconfig_dc0="media 100baseTX mediaopt full-duplex" > > > > ifconfig_dc1="DHCP" > > ifconfig_dc1="media 100baseTX mediaopt full-duplex" > > Unfortunately, that won't work. /etc/rc.conf is part of a > shell script, and all of those variable=value lines within it > are literally assignments to shell variables. Thus all you're > doing with those lines is setting 'ifconfig_dcX' to the value > "DHCP" and then immediately resetting it to the value "media > 100baseTX mediaopt full-duplex". > > On recent FreeBSD 6.x you can just combine the lines: > > ifconfig_dc0="DHCP media 100baseTX mediaopt full-duplex" > > (I can't remember if that also works on 5.x -- you'll need to > read /etc/network.subr to find out). It would seem that the "DHCP" value causes a call to 'dhclient' rather than 'ifconfig' and dhclient.conf(5) suggests that this is where the options for a DHCP interface should reside. Malcolm Kay > > In any case, and certainly for older FreeBSD versions you can > always create a /etc/start_if.dc0 script, which will be run > immediately before the ifconfig(8) command generated out of > /etc/rc.conf. In your case, the script should look like: > > #!/bin/sh > > ifconfig dc0 media 100baseTX mediaopt full-duplex > > but you can put any arbitrary commands in there that you want. > Ditto for the dc1 interface, except call the script > /etc/start_if.dc1 (if that isn't bleedingly obvious...) There > are corresponding /etc/stop_if.XXN scripts that can be created > to do arbitrary stuff on interface shutdown as well. > >Cheers, > >Matthew ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: two dc cards on 5.4
On Wed, Aug 10, 2005 at 05:33:30PM -0700, Sean Murphy wrote: > Sean Murphy wrote: > >dave wrote: > > > >>Hi, > >>Thanks for your reply. I'll give that a shot. My problem is the > >>dc0 card > >>gets it's ip via dhcp, can i still use media and mediaopt with dhcp? > >>Thanks. > >>Dave. > >> > >>___ > >>freebsd-questions@freebsd.org mailing list > >>http://lists.freebsd.org/mailman/listinfo/freebsd-questions > >>To unsubscribe, send any mail to > >>"[EMAIL PROTECTED]" > >> > > > >try this in your rc.conf > > > >ifconfig_dc0="DHCP" > >ifconfig_dc0="100baseTX mediaopt full-duplex" > > > >ifconfig_dc1="DHCP" > >ifconfig_dc1="100baseTX mediaopt full-duplex" > > > > > > *Correction* > > ifconfig_dc0="DHCP" > ifconfig_dc0="media 100baseTX mediaopt full-duplex" > > ifconfig_dc1="DHCP" > ifconfig_dc1="media 100baseTX mediaopt full-duplex" Unfortunately, that won't work. /etc/rc.conf is part of a shell script, and all of those variable=value lines within it are literally assignments to shell variables. Thus all you're doing with those lines is setting 'ifconfig_dcX' to the value "DHCP" and then immediately resetting it to the value "media 100baseTX mediaopt full-duplex". On recent FreeBSD 6.x you can just combine the lines: ifconfig_dc0="DHCP media 100baseTX mediaopt full-duplex" (I can't remember if that also works on 5.x -- you'll need to read /etc/network.subr to find out). In any case, and certainly for older FreeBSD versions you can always create a /etc/start_if.dc0 script, which will be run immediately before the ifconfig(8) command generated out of /etc/rc.conf. In your case, the script should look like: #!/bin/sh ifconfig dc0 media 100baseTX mediaopt full-duplex but you can put any arbitrary commands in there that you want. Ditto for the dc1 interface, except call the script /etc/start_if.dc1 (if that isn't bleedingly obvious...) There are corresponding /etc/stop_if.XXN scripts that can be created to do arbitrary stuff on interface shutdown as well. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 8 Dane Court Manor School Rd PGP: http://www.infracaninophile.co.uk/pgpkey Tilmanstone Tel: +44 1304 617253 Kent, CT14 0JL UK pgpVKz0fhV5d7.pgp Description: PGP signature
Re: two dc cards on 5.4
Sean Murphy wrote: dave wrote: Hi, Thanks for your reply. I'll give that a shot. My problem is the dc0 card gets it's ip via dhcp, can i still use media and mediaopt with dhcp? Thanks. Dave. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" try this in your rc.conf ifconfig_dc0="DHCP" ifconfig_dc0="100baseTX mediaopt full-duplex" ifconfig_dc1="DHCP" ifconfig_dc1="100baseTX mediaopt full-duplex" *Correction* ifconfig_dc0="DHCP" ifconfig_dc0="media 100baseTX mediaopt full-duplex" ifconfig_dc1="DHCP" ifconfig_dc1="media 100baseTX mediaopt full-duplex" -- Sean Murphy Senior Network Technician California Institute of the Arts 661-253-7732 [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: two dc cards on 5.4
dave wrote: Hi, Thanks for your reply. I'll give that a shot. My problem is the dc0 card gets it's ip via dhcp, can i still use media and mediaopt with dhcp? Thanks. Dave. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" try this in your rc.conf ifconfig_dc0="DHCP" ifconfig_dc0="100baseTX mediaopt full-duplex" ifconfig_dc1="DHCP" ifconfig_dc1="100baseTX mediaopt full-duplex" -- Sean Murphy Senior Network Technician California Institute of the Arts 661-253-7732 [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: two dc cards on 5.4
google = "freebsd media rc.conf" -> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/config-network-set up.html Section shows: ifconfig_dc0="inet 192.168.1.3 netmask 255.255.255.0" ifconfig_dc1="inet 10.0.0.1 netmask 255.255.255.0 media 10baseT/UTP" So you want: ifconfig_dc0="100baseTX mediaopt full-duplex" ifconfig_dc1="100baseTX mediaopt full-duplex" Regards, Dave Seddon dave writes: Hello, I'm trying to get a pair of netgear cards to work on a 5.4-RELEASE-p6 box. My rc.conf looks as follows: ifconfig_dc0="DHCP" ifconfig_dc1="inet 192.168.0.200 netmask 255.255.255.255" When i only have one dc card in the box dc0 everything works, the box gets a dhcp ip. Put the second one in regardless whether or not the ifconfig dc1 line is uncommented and two things happen, first i get continuous watchdog timeouts from dc0, second dc0 does not get an IP. As i said the second card doesn't have to be configured, just in the box and it happens, i've checked i/o and irq's neither conflict between the two cards. One thing, with a single dc card the media is set to ethernet autoselect <100base-TX full-duplex and it's listed as active. Put the second card in and dc0 shows media ethernet autoselect but for media type i have none and status is listed as no carrier, i believe this is the reason for the lack of a dhcp ip, my question is i don't understand why. I've tried: ifconfig_dc0_mediaopt="100base-TX, full-duplex" but the system didn't like that. I'd like to tell fbsd specifically what mode these cards are to be probed to in, but nothing seems to work, and this only occurs when the second card is in the box. I've tried three separate cards, all give the same behavior. Some urgency! Any help greatly appreciated. Dave. ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: two dc cards on 5.4
Hi, Thanks for your reply. I'll give that a shot. My problem is the dc0 card gets it's ip via dhcp, can i still use media and mediaopt with dhcp? Thanks. Dave. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: two dc cards on 5.4
dave wrote: Hello, I'm trying to get a pair of netgear cards to work on a 5.4-RELEASE-p6 box. My rc.conf looks as follows: ifconfig_dc0="DHCP" ifconfig_dc1="inet 192.168.0.200 netmask 255.255.255.255" When i only have one dc card in the box dc0 everything works, the box gets a dhcp ip. Put the second one in regardless whether or not the ifconfig dc1 line is uncommented and two things happen, first i get continuous watchdog timeouts from dc0, second dc0 does not get an IP. As i said the second card doesn't have to be configured, just in the box and it happens, i've checked i/o and irq's neither conflict between the two cards. One thing, with a single dc card the media is set to ethernet autoselect <100base-TX full-duplex and it's listed as active. Put the second card in and dc0 shows media ethernet autoselect but for media type i have none and status is listed as no carrier, i believe this is the reason for the lack of a dhcp ip, my question is i don't understand why. I've tried: ifconfig_dc0_mediaopt="100base-TX, full-duplex" but the system didn't like that. I'd like to tell fbsd specifically what mode these cards are to be probed to in, but nothing seems to work, and this only occurs when the second card is in the box. I've tried three separate cards, all give the same behavior. Some urgency! Any help greatly appreciated. Dave. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" try a static address and fixed 100/full put this in your rc.conf and reboot *note* this is one line replace with an ip that works for your network ifconfig_dc0="inet x.x.x.x netmask 255.255.255.0 media 100baseTX mediaopt full-duplex" *note* this is one line replace with an ip that works for your network ifconfig_dc1="inet x.x.x.x netmask 255.255.255.0 media 100baseTX mediaopt full-duplex" -- Sean Murphy Senior Network Technician California Institute of the Arts 661-253-7732 [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
two dc cards on 5.4
Hello, I'm trying to get a pair of netgear cards to work on a 5.4-RELEASE-p6 box. My rc.conf looks as follows: ifconfig_dc0="DHCP" ifconfig_dc1="inet 192.168.0.200 netmask 255.255.255.255" When i only have one dc card in the box dc0 everything works, the box gets a dhcp ip. Put the second one in regardless whether or not the ifconfig dc1 line is uncommented and two things happen, first i get continuous watchdog timeouts from dc0, second dc0 does not get an IP. As i said the second card doesn't have to be configured, just in the box and it happens, i've checked i/o and irq's neither conflict between the two cards. One thing, with a single dc card the media is set to ethernet autoselect <100base-TX full-duplex and it's listed as active. Put the second card in and dc0 shows media ethernet autoselect but for media type i have none and status is listed as no carrier, i believe this is the reason for the lack of a dhcp ip, my question is i don't understand why. I've tried: ifconfig_dc0_mediaopt="100base-TX, full-duplex" but the system didn't like that. I'd like to tell fbsd specifically what mode these cards are to be probed to in, but nothing seems to work, and this only occurs when the second card is in the box. I've tried three separate cards, all give the same behavior. Some urgency! Any help greatly appreciated. Dave. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"