Re: kernel killing processes when out of swap
On Tue, Apr 12, 2005 at 06:40:50PM -0400, David Schultz wrote: Using madvise doesn't require changes per app, since MADV_PROTECT is inherited across exec. You just have to write a wrapper, much in the spirit of nice(1), to execute a protected version of X. Hmm, that's new to me, but certainly very useful and would do the trick in the case of X. The only problem seems to be that it doesn't seem to be shareable across fork() and that is isn't easily tunable after a process is started. Btw.: Why is this in madvise() and not in rfork() ? Is it because of POSIX ? Any pointers are welcome... Marc pgpAcf5b8T5HU.pgp Description: PGP signature
Re: A question about hot-pluggable PCI.
On Mon, Apr 11, 2005 at 11:21:14AM -0600, M. Warner Losh wrote: No we don't. We use what the BIOS provides, but will lazily allocate the BARs as necessary. We don't open the resource windows on the bridges, however. This 'sorta' works now. I program a hard-coded window into the PCI bridge behind CardBus. Drivers attaching to devices behind the bridge are able to get the ranges they need, with the exception of the ATA controller inside the chassis, which I know is a special case for PCI. This of course is a hack which may not work for the !i386 case, as it relies on the HUB-PCI bridge behaviour of Intel chipsets, which is to pass all transactions across (according to some of the comments in pci_pci.c). It turns out interrupt routing is the problem. I don't think it's possible to route an interrupt across CardBus to a downstream PCI bridge in the same way as is usually done for PCI-PCI bridges. When I added the following, I found drivers attaching to devices inside the chassis were able to allocate interrupts and service them:- %%% +if (!strcmp(device_get_name(bus), cardbus)) +intnum = 11; /* Hardcode the IRQ routed to my CardBus bridge */ +else intnum = PCIB_ROUTE_INTERRUPT(device_get_parent(bus), pcib, parent_intpin + 1); %%% ...whereas normally the code was 'routing' IRQ 6 to INTA on the bridge. I don't see a pcib_route_interrupt method for pccbb, which is the grandparent of the pcib instance I'm attaching. So I check if the devclass of the immediate parent is cardbus. This suggests that the code may have been erroneously routing an interrupt from 1 level up in the PCI bus hierarchy, which would explain why cbb was rejecting drivers downstream asking for IRQ 6 (my function interrupt is IRQ 11, I have no idea what IRQ 6 is, so I'll reject the allocation). However, it looks as though this doesn't do the right thing just yet, because drivers panic on detach when calling bus_release_resource() for their IRQ. : I had also thought of passing down a 'cold' flag, for pcibX to indicate to : pciY that this is a 'cold attach' (the BIOS hasn't been anywhere near the : devices behind this bridge -- it is as fresh as after a RST# assert). I don't think that's a wise idea. Currently, in pcib_attach(), after the call to pcib_attach_common(), I check to see if sc-secbus is 0. If it is, I call a new function, pcib_attach_cold(), which tries to initialize the bridge as if the BIOS had never touched it. So far this 'kinda' appears to do the right thing; the onboard OHCI controller gets its resources OK. I imagine some of the code from this effort could be cleaned up and pushed back into the tree to support other forms of PCI hot-plug in future. BMS ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: A question about hot-pluggable PCI.
In message: [EMAIL PROTECTED] Bruce M Simpson [EMAIL PROTECTED] writes: : On Mon, Apr 11, 2005 at 11:21:14AM -0600, M. Warner Losh wrote: : No we don't. We use what the BIOS provides, but will lazily allocate : the BARs as necessary. We don't open the resource windows on the : bridges, however. : : This 'sorta' works now. : : I program a hard-coded window into the PCI bridge behind CardBus. Drivers : attaching to devices behind the bridge are able to get the ranges they need, : with the exception of the ATA controller inside the chassis, which I know : is a special case for PCI. : : This of course is a hack which may not work for the !i386 case, as it relies : on the HUB-PCI bridge behaviour of Intel chipsets, which is to pass all : transactions across (according to some of the comments in pci_pci.c). It is possible to make this work without the reliance on the hub-pci behavior. You have to do things in a heirarchical manner, like I've been saying... : It turns out interrupt routing is the problem. I don't think it's possible : to route an interrupt across CardBus to a downstream PCI bridge in the same : way as is usually done for PCI-PCI bridges. Right. CardBus bridges have one interrupt. Period. That's all you get. Everyone gets it. : When I added the following, I found drivers attaching to devices inside the : chassis were able to allocate interrupts and service them:- : : %%% : +if (!strcmp(device_get_name(bus), cardbus)) : +intnum = 11; /* Hardcode the IRQ routed to my CardBus bridge */ : +else : intnum = PCIB_ROUTE_INTERRUPT(device_get_parent(bus), pcib, parent_intpin + 1); : %%% : : ...whereas normally the code was 'routing' IRQ 6 to INTA on the bridge. : I don't see a pcib_route_interrupt method for pccbb, which is the grandparent : of the pcib instance I'm attaching. So I check if the devclass of the immediate : parent is cardbus. This is way ugly. Chances are we need to add pcib_route_interrupt to pccbb to make this less gross. It is almost always a layering violation to string compare device names... If you find a bug in other parts of the driver tree, you should fix it there rather than kludge it in another part... : This suggests that the code may have been erroneously routing an interrupt : from 1 level up in the PCI bus hierarchy, which would explain why cbb was : rejecting drivers downstream asking for IRQ 6 (my function interrupt is : IRQ 11, I have no idea what IRQ 6 is, so I'll reject the allocation). : : However, it looks as though this doesn't do the right thing just yet, because : drivers panic on detach when calling bus_release_resource() for their IRQ. I think that you have to get pccbb to give you the right resource, rather than kludge around it. The more you kludge, the more you'll find that you get panics... :-) : : I had also thought of passing down a 'cold' flag, for pcibX to indicate to : : pciY that this is a 'cold attach' (the BIOS hasn't been anywhere near the : : devices behind this bridge -- it is as fresh as after a RST# assert). : : I don't think that's a wise idea. : : Currently, in pcib_attach(), after the call to pcib_attach_common(), I check : to see if sc-secbus is 0. If it is, I call a new function, : pcib_attach_cold(), which tries to initialize the bridge as if the BIOS : had never touched it. That's closer to ehright thing. : I imagine some of the code from this effort could be cleaned up and pushed : back into the tree to support other forms of PCI hot-plug in future. Some of it sounds like the right thing to do, other parts sound less wise to push back in :-) Warner ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Transitions in FreeBSD
On Tue, 12 Apr 2005, Scott Long wrote: All, I'd like to announce that I'm stepping down from the FreeBSD Core team. After several months and much thought, I've decided to re-focus on where my passions lie, which is release engineering and development. I intend to remain just as visible in the project as I was before the last election, so please don't think that I'm moving on from FreeBSD. Quite the opposite is true, in fact. The remaining Core members are doing a good job of handling the issues of the project, and as per the by-laws there will not be any action to fill my vacancy at this time. There is no conspiracy here. It's simply a recognition that I was wearing too many hats, and that some of those hats didn't fit as comfortably as others. I hope to become more productive in FreeBSD in the near future; my decision has already given me more time and energy to work on things like driver locking and ATAPICAM, and I have some very interesting projects starting in the background that I'm very excited about. Many thanks to those who supported me and my time on team. Scott Best regards Scott, Its takes someone real knowledgable to consider what they have and what they want and turn down one to work on another. Some people spend all there time trying to get noticed at what they do and take on things that they are not good at just to get there. From what I read that isnt anywhere or anything that your trying to do, which inturn in itself is a real respectfull act that more people these days should try to follow. So with that being said, I wish you the best of luck on everything your going to encounter in the future. As this bar has been set higher hopefully more people will try to follow this great example. Best of luck wishes: --c0ldbyte -- ( When in doubt, use brute force. -- Ken Thompson 1998 ) ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
re: kernel killing processes when out of swap
I've often wondered why swap doesn't have a root-only x% like the file system. Once the swap used reached 100% user processes would bomb but a root process could go ahead and use the secret x%. Another idea would be to have multiple swap files and implement a way to restrict one swap area to a specific GID (say wheel). While on the issue we could also reserve a range of process ID's for wheel group only. To always be able to log on and un-wedge a system would be most convenient. Later Mark Hittinger [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Route/arp help?
To access my dsl modem's line stats page, I have to create an arp entry and a route for it, under linux this was done as: (eth1 connected directly to dsl modem) ifconfig eth1 10.0.0.2 netmask 255.255.255.0 route add 10.0.0.1 dev eth1 arp -s 10.0.0.1 ff(not really f, but the MAC address of the dsl modem, NOT the nic). unfortunately, I cant seem to figure out the commands to get this to work under FreeBSD 5.3 Ifconfig is simple enough (replace eth1 with de0 in my case) Arp seems the same (except it needs colons) But the route command I have no clue. It doesnt seem to follow the same syntax as linux, and I havent figured out the correct syntax yet. Any help? Thanks, Mark ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
not able to get controlling tty
Hi, I have a program which prints the name of the controlling terminal. The code snippet is as follows: int main(int argc, char **argv) { int mib[4], len; struct kinfo_proc buf; udev_t ttydev; register struct dirent *dirp; register DIR *dp; struct stat dsb; char namebuf[sizeof(PATH_DEV) + MAXNAMLEN]; mib[0] = CTL_KERN; mib[1] = KERN_PROC; mib[2] = KERN_PROC_PID; mib[3] = getpid(); len = sizeof (buf); sysctl(mib, 4, buf, len, NULL, 0); ttydev = buf.kp_eproc.e_tdev; printf(ttydev is %u, major = %d, minor = %d\n, ttydev, major(ttydev), minor(ttydev)); if (!(dp = opendir(PATH_DEV))) return 1; strlcpy(namebuf, PATH_DEV, sizeof(PATH_DEV)); while ((dirp = readdir(dp))) { memset(namebuf + sizeof(PATH_DEV) - 1, '\0', MAXNAMLEN - sizeof(PATH_DEV) + 1); memcpy(namebuf + sizeof(PATH_DEV) - 1, dirp-d_name, dirp-d_namlen + 1); if (stat(namebuf, dsb) || (dsb.st_rdev != ttydev)) continue; printf(OK found\n); break; } } The value returned by buf.kp_eproc.e_tdev doesn't seems to be right. #/tmp/abc ttydev is 30479, major = 119, minor = 15 Device name is /dev/log # /tmp/abc ttydev is 30577, major = 119, minor = 113 Device name is /dev/log ttydev keeps on changing every time I run same program on same terminal. Is there any way to get terminal device (udev_t) from struct kinfo_proc? - Rajesh _ Marriages at Bharatmatriony.com http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Relationships that last forever ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Performance trouble on AMD64 webserver
Hi, I've an 2 processor Opteron server (Sun v20z) with 4GB of RAM. It runs FreeBSD 5.4-PRERELEASE. Everything is roses for 1-2 minutes after starting Apache. Then the server freezes for 10-20 seconds then resumes normal operation and chokes every couple of minutes. I tried with 512 and 1024 httpd processes running. It is a fairly dynamic webpage. Apache is coupled with mod_php. Each process takes 18-19MB of resident memory. I was tuning the machine after getting the nefarious collectng PV entries ... message. I tried to increase PMAP_SHPGPERPROC and all. It doesn't make the performance better. Snapshot of vmstat -z gives: ... PV ENTRY: 48, 4312872, 1611440, 616384, 8657151 The free value decreases to something close to 0 then the machine chokes to get back up to some large value. My loader.conf: accf_data_load=YES accf_http_load=YES kern.ipc.nmbclusters=131072 kern.maxusers=1024 The sysctl.conf: kern.ipc.somaxconn=1024 The customized part of kernel config: options VM_BCACHE_SIZE_MAX=(500*1024*1024) options MAXDSIZ=(1000*1024*1024) options MAXSSIZ=(1000*1024*1024) options DFLDSIZ=(1000*1024*1024) options PMAP_SHPGPERPROC=4096 options PMAP_SHPGPERPROC=16384 options SHMALL=131072 options SHMMAXPGS=131072 I've also removed lots of SCSI hardware, Wifi and USB parts which I don't need from the GENERIC config. Any Ideas how to make it work? Thanks, /S -- Sawek ak / UNIX Systems Administrator ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Route/arp help?
M. Parsons wrote: To access my dsl modem's line stats page, I have to create an arp entry and a route for it, under linux this was done as: (eth1 connected directly to dsl modem) ifconfig eth1 10.0.0.2 netmask 255.255.255.0 route add 10.0.0.1 dev eth1 route add -net 10.0.0.1/32 -iface de0 -cloning But 'ifconfig de0 10.0.0.2 netmask 255.255.255.0' (or ifconfig de0 10.0.0.2/24) should set a 10.0.0.0/24 route via de0 why would you want to set it again ? arp -s 10.0.0.1 ff(not really f, but the MAC address of the dsl modem, NOT the nic). unfortunately, I cant seem to figure out the commands to get this to work under FreeBSD 5.3 Ifconfig is simple enough (replace eth1 with de0 in my case) Arp seems the same (except it needs colons) But the route command I have no clue. It doesnt seem to follow the same syntax as linux, and I havent figured out the correct syntax yet. Any help? Thanks, Mark ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Route/arp help?
On 4/13/05, Iasen Kostov [EMAIL PROTECTED] wrote: M. Parsons wrote: To access my dsl modem's line stats page, I have to create an arp entry and a route for it, under linux this was done as: (eth1 connected directly to dsl modem) ifconfig eth1 10.0.0.2 netmask 255.255.255.0 route add 10.0.0.1 dev eth1 route add -net 10.0.0.1/32 -iface de0 -cloning But 'ifconfig de0 10.0.0.2 netmask 255.255.255.0' (or ifconfig de0 10.0.0.2/24) should set a 10.0.0.0/24 route via de0 why would you want to set it again ? arp -s 10.0.0.1 ff(not really f, but the MAC address of the dsl modem, NOT the nic). unfortunately, I cant seem to figure out the commands to get this to work under FreeBSD 5.3 Ifconfig is simple enough (replace eth1 with de0 in my case) Arp seems the same (except it needs colons) But the route command I have no clue. It doesnt seem to follow the same syntax as linux, and I havent figured out the correct syntax yet. Any help? Thanks, Mark Honestly I have no clue why its not working, it should be simple, but it isnt.. Here is what the arp cache shows and the routing table (and its ed0, not de0, my mistake in original message). arp: (after doing the arp -s command) modem (10.0.0.1) at 00:0b:23:2a:b0:c4 on ed0 permanent [ethernet] this looks right doesnt it? route: defaultmydslgateway UGS 0 8173 tun0 10/24 link#1 UC 00ed0 modem 00:0b:23:2a:b0:c4 UHLS04ed0 = 10.0.0.1/32link#1 UCS 00ed0 no idea here? 3 for ed0? is that right? note, ed0 is also creating the tun0 device (pppoe), but that was never a problem in linux. Im just confused. :( Its not a big deal, as its only my dsl line stats, but still confused why it aint working For the record, http://www.broadbandreports.com/faq/9693 is the page on how you access the line stats, and the MAC part is required for my modem. Thanks for all the help Mark ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
clear/set/test_bit header ??
Hi hackers, I am trying to port a software from Linux to FreeBSD (5.3). But, I can't find the equivalent header in FreeBSD of asm/bitops.h in Linux ? Here are the prototypes of the functions I am using: int clear_bit(int offset, int * flag); int set_bit(int offset, int * flag); int test_bit(int offset, int * flag); Any hints? Also if you know about a website which does this header-mapping (Linux-FreeBSD), I am interested to know about it ;-) Thanks, -aziz ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Route/arp help?
M. Parsons wrote: Honestly I have no clue why its not working, it should be simple, but it isnt.. Here is what the arp cache shows and the routing table (and its ed0, not de0, my mistake in original message). arp: (after doing the arp -s command) modem (10.0.0.1) at 00:0b:23:2a:b0:c4 on ed0 permanent [ethernet] Why do you set mac address static at all ? ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Route/arp help?
On 4/13/05, Iasen Kostov [EMAIL PROTECTED] wrote: M. Parsons wrote: Honestly I have no clue why its not working, it should be simple, but it isnt.. Here is what the arp cache shows and the routing table (and its ed0, not de0, my mistake in original message). arp: (after doing the arp -s command) modem (10.0.0.1) at 00:0b:23:2a:b0:c4 on ed0 permanent [ethernet] Why do you set mac address static at all ? Huh? I dont understand what youre saying. The only command I typed was arp -s 10.0.0.1 00:0b:23:2a:b0:c4 , which creates the arp address I should want. (my modems mac address is 00:0b:etc) The only thing I can possibly seeing as being screwed up, is seeing as I have a default gateway, when I do a telnet 10.0.0.1 its using my internet gateway instead of the ed0 device. Which is why I thought I needed a route command to force a 10.0.0.1 connection to go through ed0. (linux needed the route command...) Oh well, Ive probably confused you, and myself as well. :-) Mark ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: clear/set/test_bit header ??
In the last episode (Apr 13), Aziz KEZZOU said: Hi hackers, I am trying to port a software from Linux to FreeBSD (5.3). But, I can't find the equivalent header in FreeBSD of asm/bitops.h in Linux ? Here are the prototypes of the functions I am using: int clear_bit(int offset, int * flag); int set_bit(int offset, int * flag); int test_bit(int offset, int * flag); Any hints? Try the macros in bitstring.h; see the bitstring manpage for usage. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Help Wanted! [Re: Does anybody use gdb for kernel debugging any more?]
[Resending to get wider coverage] All, While there are ways to work around some of the problems that Greg describes, the simple fact is that kernel debugging has gone downhill quite badly in the past year. Much of this decay appears to be due to the rush to get GDB 6.x imported in time for FreeBSD 5.3. I thank Marcel profusely for working on this, but more work is needed. I'm looking for volunteers to spend a few evenings digging into GDB, KDB, and DDB and working out as many issues as possible. Greg's email should serve as a good starting point for these tasks. Thanks, Scott Greg 'groggy' Lehey wrote: In the last 10 months, I've had continual problems trying to use gdb for kernel debugging. I'm currently revising my notes for the BSDCan tutorial, and I can't work out how to get it to work any more. Since about June of last year I've discovered: - I can no longer get a dump out of ddb with the 'panic' command. I need to 'call doadump' - 'panic' doesn't only not do a dump, it doesn't reset the system either. I need to press 'reset'. - The invocation to do kernel debugging with gdb keeps changing. A year ago, it was simple: 'gdb -k kernel dump'. Now the -k command is gone, and on what I believe to be a valid kernel dump, kgdb gives me: # kgdb kernel.debug /var/crash/vmcore.1 kgdb: cannot read PTD - It's possible that the dump isn't valid after all, of course. But I can't debug the local system via /dev/mem either: # kgdb kernel.debug /dev/mem [GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so: Undefined symbol ps_pglobal_lookup] (kgdb) bt #0 0x in ?? () - Firewire debugging no longer works if you haven't compiled firewire into the kernel. Given the bugs I've seen above, I can't be bothered to try building a kernel with firewire, since I don't have much expectation that it will work either way. So what gives? Has the gdb interface withered away due to lack of love? Do *you* use it? If so, how do you address the issues above? Greg -- See complete headers for address and phone numbers. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Route/arp help?
In article [EMAIL PROTECTED] you write: On 4/13/05, Iasen Kostov [EMAIL PROTECTED] wrote: M. Parsons wrote: Honestly I have no clue why its not working, it should be simple, but it isnt.. Here is what the arp cache shows and the routing table (and its ed0, not de0, my mistake in original message). arp: (after doing the arp -s command) modem (10.0.0.1) at 00:0b:23:2a:b0:c4 on ed0 permanent [ethernet] Why do you set mac address static at all ? Huh? I dont understand what youre saying. He's wondering why ARP doesn't just work. The only command I typed was arp -s 10.0.0.1 00:0b:23:2a:b0:c4 , which creates the arp address I should want. (my modems mac address is 00:0b:etc) The only thing I can possibly seeing as being screwed up, is seeing as I have a default gateway, when I do a telnet 10.0.0.1 its using my internet gateway instead of the ed0 device. Which is why I thought I needed a route command to force a 10.0.0.1 connection to go through ed0. (linux needed the route command...) Oh well, Ive probably confused you, and myself as well. :-) I think you're trying to over-complexify the problem. All you really need to do is: # ifconfig ed0 alias 10.0.0.2/24 # telnet 10.0.0.1 No silly route commands, no forcing of ARP. Just add the IP address to the interface and do your connect. My guess is that the same is true in Linux, but I don't know the exact syntax there. -- Steve Watt KD6GGD PP-ASEL-IA ICBM: 121W 56' 57.8 / 37N 20' 14.9 Internet: steve @ Watt.COM Whois: SW32 Free time? There's no such thing. It just comes in varying prices... ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
SATA NCQ by software?
Hi, To use the advantages of SATA NCQ, do I have to use a specific controller, or is this only a software matter? ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Route/arp help?
On 4/13/05, Steve Watt [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED] you write: On 4/13/05, Iasen Kostov [EMAIL PROTECTED] wrote: M. Parsons wrote: Honestly I have no clue why its not working, it should be simple, but it isnt.. Here is what the arp cache shows and the routing table (and its ed0, not de0, my mistake in original message). arp: (after doing the arp -s command) modem (10.0.0.1) at 00:0b:23:2a:b0:c4 on ed0 permanent [ethernet] Why do you set mac address static at all ? Huh? I dont understand what youre saying. He's wondering why ARP doesn't just work. The only command I typed was arp -s 10.0.0.1 00:0b:23:2a:b0:c4 , which creates the arp address I should want. (my modems mac address is 00:0b:etc) The only thing I can possibly seeing as being screwed up, is seeing as I have a default gateway, when I do a telnet 10.0.0.1 its using my internet gateway instead of the ed0 device. Which is why I thought I needed a route command to force a 10.0.0.1 connection to go through ed0. (linux needed the route command...) Oh well, Ive probably confused you, and myself as well. :-) I think you're trying to over-complexify the problem. All you really need to do is: # ifconfig ed0 alias 10.0.0.2/24 # telnet 10.0.0.1 No silly route commands, no forcing of ARP. Just add the IP address to the interface and do your connect. My guess is that the same is true in Linux, but I don't know the exact syntax there. Because that just doesnt work, like ive mentioned above, I have to force a different MAC address into the ARP table. http://www.dslreports.com/faq/9693 is what im trying to accomplish. su-2.05b# ifconfig ed0 alias 10.0.0.2/24 su-2.05b# telnet 10.0.0.1 Trying 10.0.0.1... ^C su-2.05b# arp -s 10.0.0.1 00:0b:23:2a:b0:c4 su-2.05b# telnet 10.0.0.1 Trying 10.0.0.1... ^C oh well, I thank all you guys for trying to help, its just not working, and Im not going to waste any more of your guys time on it. Great to see helpful people in the mailing list, so Im going to stick around. :-) And for the record, the linux commands are: (and these commands work, as Ive used it for months in this setup): ifconfig eth1 10.0.0.2 netmask 255.255.255.0 route add 10.0.0.1 dev eth1 arp -s 10.0.0.1 000b232ab0c4 Mark ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Route/arp help?
On Wed, 2005-04-13 at 16:38, M. Parsons wrote: On 4/13/05, Iasen Kostov [EMAIL PROTECTED] wrote: M. Parsons wrote: To access my dsl modem's line stats page, I have to create an arp entry and a route for it, under linux this was done as: (eth1 connected directly to dsl modem) ifconfig eth1 10.0.0.2 netmask 255.255.255.0 route add 10.0.0.1 dev eth1 route add -net 10.0.0.1/32 -iface de0 -cloning But 'ifconfig de0 10.0.0.2 netmask 255.255.255.0' (or ifconfig de0 10.0.0.2/24) should set a 10.0.0.0/24 route via de0 why would you want to set it again ? arp -s 10.0.0.1 ff(not really f, but the MAC address of the dsl modem, NOT the nic). unfortunately, I cant seem to figure out the commands to get this to work under FreeBSD 5.3 Ifconfig is simple enough (replace eth1 with de0 in my case) Arp seems the same (except it needs colons) But the route command I have no clue. It doesnt seem to follow the same syntax as linux, and I havent figured out the correct syntax yet. Any help? Thanks, Mark Honestly I have no clue why its not working, it should be simple, but it isnt.. Here is what the arp cache shows and the routing table (and its ed0, not de0, my mistake in original message). arp: (after doing the arp -s command) modem (10.0.0.1) at 00:0b:23:2a:b0:c4 on ed0 permanent [ethernet] this looks right doesnt it? route: defaultmydslgateway UGS 0 8173 tun0 10/24 link#1 UC 00ed0 modem 00:0b:23:2a:b0:c4 UHLS04ed0 = 10.0.0.1/32link#1 UCS 00ed0 no idea here? 3 for ed0? is that right? note, ed0 is also creating the tun0 device (pppoe), but that was never a problem in linux. I was under the impression (but would need to check to make sure) that all incoming packets are diverted to ng_pppoe when it is hooked into the Ethernet interface. This would explain your problems. Can you try this without the interface being used for PPPOE? Im just confused. :( Its not a big deal, as its only my dsl line stats, but still confused why it aint working For the record, http://www.broadbandreports.com/faq/9693 is the page on how you access the line stats, and the MAC part is required for my modem. Thanks for all the help Mark ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]