LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 07-23-2004, 01:51 AM   #1
coldy
Member
 
Registered: Nov 2002
Distribution: Debian GNU/Linux, Gentoo
Posts: 75

Rep: Reputation: 15
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

Last edited by coldy; 07-23-2004 at 03:38 AM.
 
Old 07-23-2004, 03:54 AM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
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).
 
Old 07-23-2004, 04:43 AM   #3
coldy
Member
 
Registered: Nov 2002
Distribution: Debian GNU/Linux, Gentoo
Posts: 75

Original Poster
Rep: Reputation: 15
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 ?
Thanks again

Last edited by coldy; 07-23-2004 at 04:47 AM.
 
Old 07-23-2004, 11:16 AM   #4
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
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".
 
Old 07-23-2004, 12:37 PM   #5
coldy
Member
 
Registered: Nov 2002
Distribution: Debian GNU/Linux, Gentoo
Posts: 75

Original Poster
Rep: Reputation: 15
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
 
Old 07-23-2004, 04:54 PM   #6
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
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.

Last edited by chort; 07-23-2004 at 04:58 PM.
 
Old 07-24-2004, 03:33 PM   #7
coldy
Member
 
Registered: Nov 2002
Distribution: Debian GNU/Linux, Gentoo
Posts: 75

Original Poster
Rep: Reputation: 15
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
 
Old 07-24-2004, 06:18 PM   #8
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
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.

Last edited by chort; 07-24-2004 at 06:19 PM.
 
Old 07-25-2004, 11:16 AM   #9
coldy
Member
 
Registered: Nov 2002
Distribution: Debian GNU/Linux, Gentoo
Posts: 75

Original Poster
Rep: Reputation: 15
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!
 
Old 07-25-2004, 12:23 PM   #10
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
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.)

Last edited by frob23; 07-25-2004 at 10:08 PM.
 
Old 07-25-2004, 06:59 PM   #11
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
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.
 
Old 07-25-2004, 10:06 PM   #12
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
lol, you're right of course chort... brain fart.

I plead exhaustion (up over 24 hours because of work).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenBSD 3.7] console change noir911 *BSD 2 08-03-2005 05:11 PM
won't change ip address xushi Solaris / OpenSolaris 4 05-14-2005 03:11 AM
Change IP address lvran Linux - Networking 2 10-16-2003 01:19 AM
How do you change the IP Address? Diablotrickster Slackware 4 08-28-2003 07:31 PM
cannot change ip address ??? aherrys Linux - Networking 0 07-06-2003 03:34 AM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 11:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration