Date: Tue, 03 Apr 2001 00:34:34 -0500 From: halber mensch <shocker@ionet.net> To: questions@freebsd.org Subject: re: DHCP to ifconfig Options Message-ID: <3AC960EA.46DF9EBC@ionet.net>
next in thread | raw e-mail | index | archive | help
I have been trying to nogg out the answer as well for about the past year. I finally sat down today, resolved to fix the problem. I started off figuring how to change the mediaopt through ifconfig.. the sytax being: ifconfig [identifier] media [your media (100baseTX e.g.)] mediaopt [option] [option] should be either full-duplex or half-duplex. This is good because by the report of DHCLIENT, you'd think you specify the media in a form like 100baseTX <full-duplex>. And if you've ever tried that, you know as well as I do that dhclient just looks at you funny and walks off. so now the only thing left to do was automate it. I can't really justify logging in to correct my media type every time the system reboots.... I tried editing rc.conf... ifconfig_xl0 ="DHCP" .. and since another ifconfig to the device can be issued... ifconfig_xl0 = "media 10baseT/UTP mediaopt full-duplex" well... it went full-duplex, but the second ifconfig line (for some odd reason I haven't yet fingered out) knocks out the DHCP info obtained by dhclient. poop. back to square one.. read rc.network for the umpteenth time. then I found this in rc.network... for ifn in ${network_interfaces}; do showstat=false if [ -e /etc/start_if.${ifn} ]; then . /etc/start_if.${ifn} showstat=true Eureeka! This is it! This little line of script, for those that can't yet read it, means that rc.network looks for a file named like "start_if.xl0" in the case of my nic. Make a file in /etc named similar, only substitute your interface identifier. Inside it, place the ifconfig line you need to use to set your media. In my case: ifconfig xl0 media 10baseT/UTP mediaopt full-duplex was all I had to enter in that line. In rc.conf, leave only the ifconfig line specifying DHCP setup. The system will first execute the start_if.XX# to set the media, then launch dhclient to nab your lease. Be sure to remove any media options from dhclient.conf. mach's gut, reid === original message === I was wondering why my internet connection was so slow comparing to windows, when I executed the ifconfig, and sow its output: rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet6 fe80::200:b4ff:fec2:2d28%rl0 prefixlen 64 scopeid 0x1 inet 213.22.0.5 netmask 0xfffffc00 broadcast 213.22.3.255 ether 00:00:b4:c2:2d:28 media: autoselect (none) status: active supported media: autoselect 100baseTX <full-duplex> 100baseTX 10baseT/UTP <full-duplex> 10baseT/UTP 100baseTX <hw-loopback> The problem I think is that the media should be selected "full-duplex". So, I checked the man pages for rl and ifconfig and dhclient.conf, and tryed inserting a "mediaopts full-duplex" to the dhclient.conf file, so that he could pass it to ifconfig, and set my connection properly... but it didnt work... the output from ifconfig stays just the same... My question would be: Where and what should I change the DHClient/ifconfig configurations so that I can take full advantage of my cable connection trough FreeBSD. bash-2.04$ dmesg |grep rl rl0: <RealTek 8139 10/100BaseTX> port 0xd000-0xd0ff mem 0xc5800000-0xc58000ff irq 5 at device 9.0 on pci0 rl0: Ethernet address: 00:00:b4:c2:2d:28 miibus0: <MII bus> on rl0 rlphy0: <RealTek internal media interface> on miibus0 rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto Thanks in advance. Joao Fernandes PS: I'm not in the list, so please reply to my personal box as well, root@opsydopsy.net.dhis.org. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AC960EA.46DF9EBC>