DaemonForums  

Go Back   DaemonForums > NetBSD > NetBSD General

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

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 14th May 2008
JMJ_coder JMJ_coder is offline
VPN Cryptographer
 
Join Date: May 2008
Posts: 464
Thanked 8 Times in 8 Posts
Default Network failure and output dumping onto console

Hello,

I have two problems that I think are co-related. The first is that output is dumped onto my console (no X, yet). It doesn't matter if I am in the middle of typing a command or in a program such as vi or the manpages, the output is dumped where the cursor is - though it doesn't affect anything (i.e., commands still work after be split up and it doesn't write into the files from vi). But, it is still very annoying! The messages, about 3 different ones, are:

(the italicized parts are replaced by the actual values)
Code:
DATE & TIME last message repeated N times

DATE & TIME dhclient: send_packet: Input/output error

DATE & TIME /netbsd: arplookup: unable to enter address for 192.168.0.1@00 MAC-ADRESS on nfe0 (host is not on local network)
The messages for this first problem don't matter (though, they relate to the second problem) - the problem is that they keeping dumping onto the console every couple of seconds.




The second problem (from which the specific error messages stem, I think) is that I can't always get my local gateway. If I soft boot into NetBSD, then all is fine. But, if I hard boot into NetBSD, then I have issues. It will not locate my local gateway - though I have my IP address. This is at least an improvement over 3.1 which wouldn't even let me get my IP address via DHCP on a hard boot. So on a hard boot, I can't ping say - www.google.com - though I can on a soft boot.

I get my IP address via DHCP from my ISP and my modem/router is statically set to 192.168.0.1. So say my address from my ISP is 62.24.38.124 - then the two are on different networks and I get the error messages - though I can ping using names on a soft boot with this setup and I can ping addresses on the network (i.e., 62.24.38.108 - even though it is only connected via the internet).
__________________
And the WORD was made flesh, and dwelt among us. (John 1:14)
Reply With Quote
  #2   (View Single Post)  
Old 14th May 2008
crayoxide crayoxide is offline
Fdisk Soldier
 
Join Date: May 2008
Posts: 46
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by JMJ_coder View Post
.. the problem is that they keeping dumping onto the console every couple of seconds.
You will need to edit your /etc/syslog.conf and point the source of the error message some place else besides /dev/console.

However, it usually is best that the administrator know about these kind of errors ASAP instead of ignoring them and/or sifting a logfile!

Reply With Quote
  #3   (View Single Post)  
Old 14th May 2008
anomie's Avatar
anomie anomie is offline
Local
 
Join Date: Apr 2008
Location: Texas
Posts: 446
Thanked 69 Times in 46 Posts
Default

Quote:
Originally Posted by JMJ_coder
The first is that output is dumped onto my console (no X, yet).. it is still very annoying!
There are a number of types of syslog messages sent to /dev/console by default. If you don't want to see them, just work on a different tty - e.g. Ctrl + Alt + F2.

Quote:
Originally Posted by JMJ_coder
DATE & TIME /netbsd: arplookup: unable to enter address for 192.168.0.1@00 MAC-ADRESS on nfe0 (host is not on local network)
What is your IP address/subnet while you're seeing this message? Perhaps delete your arp cache and see if the message appears again later:
# arp -da

Quote:
Originally Posted by JMJ_coder
I get my IP address via DHCP from my ISP and my modem/router is statically set to 192.168.0.1. So say my address from my ISP is 62.24.38.124 - then the two are on different networks and I get the error messages - though I can ping using names on a soft boot with this setup and I can ping addresses on the network (i.e., 62.24.38.108 - even though it is only connected via the internet).
Your modem/router is also a NAT device, right? Shouldn't your NetBSD box's IP address be on the 192.168.0/24 network?
__________________
Kill your t.v.
Reply With Quote
  #4   (View Single Post)  
Old 16th May 2008
JMJ_coder JMJ_coder is offline
VPN Cryptographer
 
Join Date: May 2008
Posts: 464
Thanked 8 Times in 8 Posts
Default

Hello,

Quote:
Originally Posted by crayoxide View Post
However, it usually is best that the administrator know about these kind of errors ASAP instead of ignoring them and/or sifting a logfile!
This is home computer, so I am the administrator.

Thanks for the tip on redirecting the output.
__________________
And the WORD was made flesh, and dwelt among us. (John 1:14)
Reply With Quote
  #5   (View Single Post)  
Old 16th May 2008
JMJ_coder JMJ_coder is offline
VPN Cryptographer
 
Join Date: May 2008
Posts: 464
Thanked 8 Times in 8 Posts
Default

Hello,

Quote:
Originally Posted by anomie View Post
Your modem/router is also a NAT device, right? Shouldn't your NetBSD box's IP address be on the 192.168.0/24 network?
I don't believe the modem has a public IP address. All it has is the 192.168.0.1 address - and that address is locked in the modem's programming from the factory. And the computer doesn't have a NAT address. It is only assigned the address from the ISP (whether the ISP uses NAT on their end, I don't know, but I don't run NAT from my end).

The network works except for those two glitches - no DNS from a hard boot and those ugly error messages.
__________________
And the WORD was made flesh, and dwelt among us. (John 1:14)
Reply With Quote
  #6   (View Single Post)  
Old 16th May 2008
anomie's Avatar
anomie anomie is offline
Local
 
Join Date: Apr 2008
Location: Texas
Posts: 446
Thanked 69 Times in 46 Posts
Default

That sounds screwy to me (but I'm sure ISP's have done stranger things).

How about simply creating a static alias on your NIC, e.g. 192.168.0.50/24? Then at boot time you'd be on the same network as your 192.168.0.1 device.
__________________
Kill your t.v.
Reply With Quote
  #7   (View Single Post)  
Old 16th May 2008
JMJ_coder JMJ_coder is offline
VPN Cryptographer
 
Join Date: May 2008
Posts: 464
Thanked 8 Times in 8 Posts
Default

Hello,

Quote:
Originally Posted by anomie View Post
How about simply creating a static alias on your NIC, e.g. 192.168.0.50/24? Then at boot time you'd be on the same network as your 192.168.0.1 device.
How would I go about setting up a static alias? And how would that affect the dynamic IP address?


P.S. - I did find the modem log that gives me the initial IP address (192.168.1.64) and subnet (255.255.0.0 - this is for the whole LAN).
__________________
And the WORD was made flesh, and dwelt among us. (John 1:14)
Reply With Quote
  #8   (View Single Post)  
Old 16th May 2008
anomie's Avatar
anomie anomie is offline
Local
 
Join Date: Apr 2008
Location: Texas
Posts: 446
Thanked 69 Times in 46 Posts
Default

See this netbsd-users thread for notes on setting up an alias.

But now I am again thinking we are not on the same page about how your network is set up. Could you just post the results of:

# ifconfig -a

# route show | grep default

??
__________________
Kill your t.v.
Reply With Quote
  #9   (View Single Post)  
Old 16th May 2008
JMJ_coder JMJ_coder is offline
VPN Cryptographer
 
Join Date: May 2008
Posts: 464
Thanked 8 Times in 8 Posts
Default

Hello,

Quote:
Originally Posted by anomie View Post
See this netbsd-users thread for notes on setting up an alias.
Thank you. Well, we're getting somewhere. Adding the alias (I went the route of ifconfig ... alias) it resolves the ARP and DNS error. But, even though I put it in my rc.conf file, it will not assign the alias on a hard boot. So on a hard boot, I still have no DNS and I get that ARP error. If I enter the alias via the command line manually, it is immediately resolved. It will assign the alias on a soft boot.

Also, I am still getting the dhclient and last message errors. I could not look at them by using the tips given earlier in this thread, but it would be nice to know why I am getting these errors.




Quote:
Originally Posted by anomie View Post
But now I am again thinking we are not on the same page about how your network is set up. Could you just post the results of:

# ifconfig -a

# route show | grep default

??
I think the modem acts almost as a network bridge. The results you are looking for are:

Note: the ifconfig was run from Slackware and not NetBSD (I don't have my 4.0 setup completely setup yet). The only differences are device names and NetBSD has an additional device fwiw0 (I think that is the correct name) set to address 0.0.0.0
Code:
eth0      Link encap:Ethernet  HWaddr 00:1A:92:51:E4:0D  
          inet addr:76.212.227.73  Bcast:76.212.227.255  Mask:255.255.255.0
          inet6 addr: fe80::21a:92ff:fe51:e40d/64 Scope:Link
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1494 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1727 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1096456 (1.0 MiB)  TX bytes:326868 (319.2 KiB)
          Interrupt:17 Base address:0x2000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:400 (400.0 b)  TX bytes:400 (400.0 b)
Code:
default   76.212.227.74   UG

Note that the actual IP address of both my IP and the default gateway change dynamically upon each DHCP request.
__________________
And the WORD was made flesh, and dwelt among us. (John 1:14)
Reply With Quote
Old 16th May 2008
anomie's Avatar
anomie anomie is offline
Local
 
Join Date: Apr 2008
Location: Texas
Posts: 446
Thanked 69 Times in 46 Posts
Default

Quote:
Originally Posted by JMJ_coder
even though I put it in my rc.conf file, it will not assign the alias on a hard boot.
Can you post the exact rc.conf entry you added?

Quote:
Originally Posted by JMJ_coder
Note: the ifconfig was run from Slackware and not NetBSD (I don't have my 4.0 setup completely setup yet).
But the results are similar on NetBSD after you boot? Publicly routable IP address for your NIC, and publicly routable IP address (which belongs to your ISP) for the gateway?
__________________
Kill your t.v.
Reply With Quote
Old 16th May 2008
JMJ_coder JMJ_coder is offline
VPN Cryptographer
 
Join Date: May 2008
Posts: 464
Thanked 8 Times in 8 Posts
Default

Hello,

Quote:
Originally Posted by anomie View Post
Can you post the exact rc.conf entry you added?
ifconfig nfe0 inet 192.168.1.64 netmask 255.255.0.0 alias


This works except during a hard boot.



Quote:
Originally Posted by anomie View Post
But the results are similar on NetBSD after you boot? Publicly routable IP address for your NIC, and publicly routable IP address (which belongs to your ISP) for the gateway?
Not exactly sure what you are asking. It is the same setup for the network - computer -> DSL modem -> ISP. The same information is received from the DHCP server - an IP address and a gateway address (both can on completely different networks from session to session - i.e., 75.12.1.29 (IP) 75.12.1.254 (G) to 76.212.227.63 (IP) 76.212.227.74 (G)). The DSL modem never appears to receive a public IP address - it is always 192.168.0.1/16.
__________________
And the WORD was made flesh, and dwelt among us. (John 1:14)
Reply With Quote
Old 16th May 2008
JMJ_coder JMJ_coder is offline
VPN Cryptographer
 
Join Date: May 2008
Posts: 464
Thanked 8 Times in 8 Posts
Default

Hello,

Some new insights - it isn't so much the computer booting cold, as it is the modem do so. When the modem is powered on initially, it doesn't start negotiating with the ISP until the DHCP client tells it to, then it starts talking and very quickly dhclient gets enough information to go on, but the modem is still negotiating. So that when I first login (with some very quick typing, I might add ), I can ping the internet via DNS, but ifconfig shows the IP address as the private address - no alias (I wonder if you try to create an alias of the same address if it drops it). Within a matter of seconds, the modem is finished negotiating and gives dhclient the IP address, which displays via ifconfig - still no alias.

The reason it works on a soft boot is because the modem is still retaining all the DHCP information on a line that is still leased to me and it doesn't spend half a minute having to negotiate with the ISP after dhclient thinks it is done.
__________________
And the WORD was made flesh, and dwelt among us. (John 1:14)
Reply With Quote
Old 17th May 2008
anomie's Avatar
anomie anomie is offline
Local
 
Join Date: Apr 2008
Location: Texas
Posts: 446
Thanked 69 Times in 46 Posts
Default

Quote:
Originally Posted by JMJ_coder
ifconfig nfe0 inet 192.168.1.64 netmask 255.255.0.0 alias

This works except during a hard boot.
I am surprised it works at all. It seems like the entry in /etc/rc.conf should be:
Code:
ifaliases_nfe0="inet 192.168.1.64 netmask 255.255.0.0"
__________________
Kill your t.v.
Reply With Quote
Old 17th May 2008
anomie's Avatar
anomie anomie is offline
Local
 
Join Date: Apr 2008
Location: Texas
Posts: 446
Thanked 69 Times in 46 Posts
Default

Quote:
Originally Posted by JMJ_coder
The reason it works on a soft boot is because the modem is still retaining all the DHCP information on a line that is still leased to me...
Ok. I don't know what to suggest. Sounds like you've perhaps diagnosed the issue, though.
__________________
Kill your t.v.
Reply With Quote
Old 17th May 2008
JMJ_coder JMJ_coder is offline
VPN Cryptographer
 
Join Date: May 2008
Posts: 464
Thanked 8 Times in 8 Posts
Default

Hello,

Quote:
Originally Posted by anomie View Post
I am surprised it works at all. It seems like the entry in /etc/rc.conf should be:
Code:
ifaliases_nfe0="inet 192.168.1.64 netmask 255.255.0.0"
I think I tried that one first - and I think it worked, but I migrated to ifconfig to explore other options.
__________________
And the WORD was made flesh, and dwelt among us. (John 1:14)
Reply With Quote
Old 17th May 2008
JMJ_coder JMJ_coder is offline
VPN Cryptographer
 
Join Date: May 2008
Posts: 464
Thanked 8 Times in 8 Posts
Default

Hello,

Quote:
Originally Posted by anomie View Post
Ok. I don't know what to suggest. Sounds like you've perhaps diagnosed the issue, though.
O.K., I got it working. Here is what I added to my rc.conf:

Code:
IP=`ifconfig nfe0 | grep -E 'inet.[0-9]' | awk '{print $2}'`
if [ "$IP" = "192.168.1.64" ]; then
        ifconfig nfe0 inet 192.168.1.63 netmask 255.255.0.0
fi
ifconfig nfe0 inet 192.168.1.64 netmask 255.255.0.0
I found out that you can't assign an alias with the same IP address as the one the interface currently has, so I had to check to see if it was the same and if it was, change it (it was going to change anyway) to set the alias properly. Alias is set and all is peachy keen.

Only two side effects of this -

1) for that half-minute to minute while the modem is finishing up all its loose ends, you can't reach the internet (big deal!).
2) when it runs through the if statement and assigns 192.168.1.63 and 192.168.1.64 becomes the alias - when the IP address if finally set, it makes 192.168.1.64 the IP address and the address from DHCP becomes the alias. I don't know why, but it still works the same.



I am still getting the dhclient error, but I have no clue as to why. I guess I just have to redirect the error message someplace else.
__________________
And the WORD was made flesh, and dwelt among us. (John 1:14)
Reply With Quote
Old 17th May 2008
JMJ_coder JMJ_coder is offline
VPN Cryptographer
 
Join Date: May 2008
Posts: 464
Thanked 8 Times in 8 Posts
Default

Hello,

A big thank you to anomie for helping me track down that error.
__________________
And the WORD was made flesh, and dwelt among us. (John 1:14)
Reply With Quote
Old 17th May 2008
anomie's Avatar
anomie anomie is offline
Local
 
Join Date: Apr 2008
Location: Texas
Posts: 446
Thanked 69 Times in 46 Posts
Default

Glad you put a solution together.
__________________
Kill your t.v.
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
dwm status bar won't display apm output asemisldkfj General software and network 6 16th August 2009 11:07 PM
Digital sound output Zodox FreeBSD General 5 12th November 2008 02:21 PM
C and file input/output 18Googol2 Programming 3 20th August 2008 04:02 PM
strange security run output deadeyes FreeBSD Security 5 2nd July 2008 04:51 PM
PHP Dumping Core Every 15 seconds?? Michael FreeBSD General 2 21st June 2008 08:17 PM


All times are GMT. The time now is 08:19 PM.


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