LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   Can't change the address of rl0 on OpenBSD 3.3 (https://www.linuxquestions.org/questions/%2Absd-17/cant-change-the-address-of-rl0-on-openbsd-3-3-a-208598/)

coldy 07-23-2004 01:51 AM

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:

Jul 1 09:39:54 fake /bsd: arp: attempt to overwrite entry for 10.0.0.1 on lo0 by 00:50:fc:f0:9b:40 on rl0
When I changed the network settings [I read it from http://www.openbsd.org/ site] I've tried to write changes with
Quote:

# sh /etc/netstart
and it prints me
Quote:

route: fake.localhost: bad value
writing to routing socket: File exists
writing to routing socket: File exists
writing to routing socket: File exists
writing to routing socket: File exists
writing to routing socket: File exists
writing to routing socket: File exists
writing to routing socket: File exists
writing to routing socket: File exists
writing to routing socket: File exists
writing to routing socket: File exists
writing to routing socket: File exists
writing to routing socket: File exists
writing to routing socket: File exists
writing to routing socket: No such process
add net default: gateway 10.0.0.2: not in table
writing to routing socket: File exists
the output of /var/log/messages is
Quote:

Jul 1 08:19:55 debian last message repeated 2 times
Jul 1 08:34:55 fake last message repeated 4 times
Jul 1 08:48:27 fake last message repeated 3 times
Jul 1 08:56:59 fake last message repeated 3 times
Jul 1 08:59:55 fake last message repeated 3 times
Jul 1 09:18:26 fake last message repeated 6 times
Jul 1 09:19:55 fake last message repeated 2 times
Jul 1 09:29:55 fake last message repeated 2 times
here is uname -a output and the ifconfig of interface rl0
Quote:

#uname -a
OpenBSD fake.localhost 3.3 GENERIC#44 i386
[snip]rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
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 :(

chort 07-23-2004 03:54 AM

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).

coldy 07-23-2004 04:43 AM

Hi chort, here is the content of my /etc/hostname.rl0

Quote:

inet 10.0.0.7 255.255.255.0 NONE
and /etc/mygate
Quote:

10.0.0.2
I've restarted it twice before post my message, but it continue showing the message on the screen. And when it delete the gateway that I am trying to apply permanently, I am doing
Quote:

# route add default 10.0.0.2
And if it's possible, can you tell me how to update the netstart script to latest, I hope it will help me to apply the network settings.

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:

Jul 1 09:39:54 fake /bsd: arp: attempt to overwrite entry for 10.0.0.1 on lo0 by 00:50:fc:f0:9b:40 on rl0
Am I in wrong or it's right, but what is the reason to try change my loopback address ? :eek:
Thanks again

chort 07-23-2004 11:16 AM

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".

coldy 07-23-2004 12:37 PM

Ok, I think you are right, here is the output from the command that you gave me
Quote:

# netstat -ranf inet
Routing tables


Destination Gateway Flags Refs Use Mtu Interface
default 10.0.0.2 UGS 0 1448 - rl0
10.0.0/24 link#2 UC 0 0 - rl1
10.0.0.1 0:40:95:8:f4:2b UHL 0 471 - lo0
127/8 127.0.0.1 UGRS 0 0 33224 lo0
127.0.0.1 127.0.0.1 UH 0 1456 33224 lo0
10.0.0.2/24 link#1 UC 0 0 - rl0
10.0.0.2 0:50:fc:f0:9b:40 UHL 1 5169 - rl0
224/4 127.0.0.1 URS 0 0 33224 lo0
and bellow is the content of all /etc/hostname* files. They are two: /etc/hostname.rl0
Quote:

inet 10.0.0.7 255.255.255.0 NONE
and /etc/hostname.rl1
Quote:

inet 10.0.0.1 255.255.255.0 NONE
If I can fix this error _with your help_ I will try to route the Internet connection from the OpenBSD machine to other PCs in home.

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:

chort 07-23-2004 04:54 PM

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.

coldy 07-24-2004 03:33 PM

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

chort 07-24-2004 06:18 PM

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.

coldy 07-25-2004 11:16 AM

I mean that when I do
Quote:

# route delete default
# route add default 10.0.0.2
and restart the PC, after that it don't remember the change of the default gateway /I must add the default gateway againg after reboot/. I use this PC to learn the *BSD way of working with it, and I am using it just for web server. I understand you about the netstart script and the update risks of loosing the config files. I will download and install 3.5 next week. For someone like me - completly newbie - / I think/ it dosn't matter when OS will be preinsatalled, it matter when you will learn it.

Thanks for the help chort!

frob23 07-25-2004 12:23 PM

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.)

chort 07-25-2004 06:59 PM

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.

frob23 07-25-2004 10:06 PM

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.