DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 7th March 2010
adealey adealey is offline
New User
 
Join Date: Mar 2010
Posts: 6
Default problem with static v4 IPs

Please excuse the fact that I'm probably overlooking something really obvious and trivial but I'm stuck.

I have some OpenBSD background but have not worked with it for a number of years. I recently decided to use OpenBSD (4.6) and pf to build a new firewall that I need.

Initially I set both network interfaces to dhcp in their hostname.if files (hostname.fxp0 & hostname.fxp1) just to make sure all the hardware was working correctly. Everything worked perfectly.

I then changed the hostname.if files to set static IPs as follows:

hostname.fxp1
Code:
inet w.x.y.z 255.255.255.0 w.x.y.255 description internal
where w.x.y.z is the actual IP (of course).

But when I bring the interface up, I get this result:
Code:
fxp1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
         lladdr 00:02:be:28:52:33
         priority: 0
         media: Ethernet autoselect (100BaseTX full-duplex)
         status: active
         inet6 fe80::202:b3ff:fe28:5233%fxp1 prefixlen 64 scopeid 0x2
and, indeed, I don't seem to have any valid IPv4 address.

I checked all the man pages but didn't find anything that illuminated me.

Can someone tell me what I'm missing here?
Reply With Quote
  #2   (View Single Post)  
Old 7th March 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Remove "description internal" from the file. Neither of these two words are valid options for fxp(4) media.
Reply With Quote
  #3   (View Single Post)  
Old 7th March 2010
adealey adealey is offline
New User
 
Join Date: Mar 2010
Posts: 6
Default

thanks for the suggestion but it had no effect. I still don't get an IPv4 address.
Reply With Quote
  #4   (View Single Post)  
Old 7th March 2010
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by texaganian View Post
But when I bring the interface up, I get this...
If you simply took the interface down, changed its configuration, & then brought it back up, this is insufficient to re-read the hostname.if(5) file & reinitialize the interface. What you need is netstart(8) which is executed (as root) by:

# sh /etc/netstart

Re-reading Section 6.2 of the FAQ is also warranted.
Reply With Quote
  #5   (View Single Post)  
Old 7th March 2010
adealey adealey is offline
New User
 
Join Date: Mar 2010
Posts: 6
Default

BTW, I don't have any trouble bringing up the interface manually.
ifconfig fxp1 inet w.x.y.z netmask 255.255.255.0 -inet6
does exactly what I need. But I don't seem to be able to configure hostname.fxp1 correctly to do the same thing automatically.
Reply With Quote
  #6   (View Single Post)  
Old 7th March 2010
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

What are the permissions on /etc/hostname.fxp1?
Reply With Quote
  #7   (View Single Post)  
Old 7th March 2010
adealey adealey is offline
New User
 
Join Date: Mar 2010
Posts: 6
Default

Thanks. Got it.

Curiously, now my original syntax also works and it sets the description properly.
Reply With Quote
  #8   (View Single Post)  
Old 7th March 2010
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by texaganian View Post
Got it.
It would be beneficial to anyone reading this thread if you would summarize what was the fix.
Reply With Quote
  #9   (View Single Post)  
Old 7th March 2010
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

I agree, I also failed to understand the problem.. description is however, a valid "interface-independent" option jggimi.

It's actually used as an example in hostname.if(5).
Reply With Quote
Old 8th March 2010
adealey adealey is offline
New User
 
Join Date: Mar 2010
Posts: 6
Default

Quote:
Originally Posted by ocicat View Post
It would be beneficial to anyone reading this thread if you would summarize what was the fix.
I had intended to do exactly that, ocicat, but then I discovered that my original syntax is now working perfectly so I'm more than a little confused and, unfortunately, can't say anything particularly enlightening.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
static ip's not showing up in routing table birdmansdomain OpenBSD General 4 27th November 2009 12:57 AM
snd_emu10k1 and static kly FreeBSD General 3 17th September 2009 01:28 PM
Static IP address problem rex FreeBSD General 2 25th November 2008 08:53 PM
Cannot assign static IP. bsdnewbie999 OpenBSD General 5 21st June 2008 09:50 AM
dhcpd problems... dynamic and static leases present edhunter FreeBSD General 7 16th May 2008 02:34 PM


All times are GMT. The time now is 09:15 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick