Can't change the address of rl0 on OpenBSD 3.3
Hello friends, I am totally new in *BSD. Before months I installed on my old PC OpenBSD 3.3 but yesterday I've changed the network address and gateway. I want to use it for home gateway. Ok, everything is working but when I changed them it prints me in the screen
Quote:
Quote:
Quote:
Quote:
Quote:
address: 00:40:f4:43:41:a5 media: Ethernet autoselect (100baseTX full-duplex) status: active inet6 fe80::240:f4ff:fe43:41a5%rl0 prefixlen 64 scopeid 0x1 inet 10.0.0.7 netmask 0xffffffc0 broadcast 10.0.0.255 [/snip] I've searched in the forum for message like this on my screen, but I can't find anything. Can someone tell me please how to write permanently the settings, and what I wrong. Regards [edit] OpenBSD deletes the gateway that I want to use after few minutes ot may be hour. Really I don't know what to do to fix the network settings to work for me :( |
Well, did you try rebooting? If you edited /etc/hostname.rl0 and /etc/mygate correctly, rebooting should clear up everything. If that doesn't work, then paste the contents of the above two files to a reply here.
When I changed my network info on the fly, I always just use the ifconfig(8) command directly and then fix the routing if necessary using the route(8) command. I do know that the /etc/netstart script was rewritten a few months ago, so there may be a minor flaw in the version you're using that is causing less than perfect results. I'm fairly certain the new netstart script relied on a new parsing syntax for the command that reads it, so you wouldn't be able to just CVS the new version of netstart down (without upgrading, any way). |
Hi chort, here is the content of my /etc/hostname.rl0
Quote:
Quote:
Quote:
Thanks in advance ~ coldy P.S. I am thinking that maybe if I download the 3.5 version of OpenBSD and preinstall my current, everything will go fine, but first will try to fix the problem with your help friends. P.S.II. After I posted this message I looked my first post look: Quote:
Thanks again |
Seems like something has assigned 10.0.0.1 to loopback, or added a route to it on loopback.
Post the names and contents of all the /etc/hostname.if files also, post the output of $ netstat -ranf inet It's possible that somewhere you had a thinko and typed "lo0" rather than "rl0". |
Ok, I think you are right, here is the output from the command that you gave me
Quote:
Quote:
Quote:
thanks chort P.S. I tried again with # sh /etc/netstart, the message was the same, and it deleted the default gateway automaticly. maybe I must do pue install of OpenBSD :confused: |
Some how, some way 10.0.0.1 is being assigned to the loopback interface. That's completely wrong and broken. do this:
# grep -nr "10.0.0.1" /etc/*" That will tell you the name of all the files that have 10.0.0.1 in the /etc directory (and subdirectories) and it will give you what line number of the file to look at (and it ignores the file that is actually supposed to have it). Something has been improperly configured to assign that address to lo0. Edit: DOH! I see what one of the problems (maybe the problem) is: you have assigned IPs in the same subnet to two different interfaces--don't do that. Each interface needs to be on a separate subnet. |
Hi, when I've changed the network address of rl1 everything with the error messages on the screen goes fine (fixed), but the default gateway don't want to be applied permanently. Please, tell me how to update /etc/netstart to the current version. Thanks in advance again
~coldy |
What do you mean the default gateway doesn't want to be applied permanently? That's really vague. Could you explain exactly what that problem is?
As I said above, you can't just update your netstart script to the latest because that relies on some outside utilities. You would have to update more of the system and then you would be out of sync. You can't upgrade past 3.3 any way because the binary format changed from 3.3 to 3.4 on the x86 platforms. If you haven't done a lot of work on this system yet, the best thing to do would be to wipe it and install 3.5. When I upgraded from 3.3 to 3.4 I just backed up all my data and config files, then installed 3.4 as a new installation (allowed it to repartition the disks) and then imported my old data and configs once it was up and running on 3.4. By the way, at this point I don't think it's a problem with the netstart script at all, since your previous problem was due to a misconfiguration. If there are any additional problems now it's likely that those are misconfigurations as well. Post the details and we can help you locate it. |
I mean that when I do
Quote:
Thanks for the help chort! |
EDIT: THIS ANSWER IS INCORRECT IN REFERENCE TO THE ORIGINAL PROBLEM. PLEASE SEE BELOW FOR THE CORRECT METHOD. I AM SORRY IF ANYONE GOT CONFUSED OR MISCONFIGURED SOMETHING FOLLOWING THIS. I leave it just to maintain the integrity of the thread.
defaultrouter=172.23.23.1 Put that line in your rc.conf file -- replace the ip with the address of your actual router (that is from my rc.conf file so I know it works.) |
That's not the correct method for OpenBSD. On OpenBSD, you put 10.0.0.2 in /etc/mygate. The file might not exist, in which case you just create it with that value. The defaultrouter syntax is for FreeBSD, not OpenBSD.
|
lol, you're right of course chort... brain fart.
I plead exhaustion (up over 24 hours because of work). ;) |
All times are GMT -5. The time now is 02:45 AM. |