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 10th January 2011
unixjingleman unixjingleman is offline
Fdisk Soldier
 
Join Date: Jan 2011
Posts: 70
Default networking not working

Hi
My OpenBSD install went fine. My network cards were detected as xl0 and xl1.
On the first boot i did:
Code:
#ifconfig -a
to see if my interfaces had acquired I.Ps. yes they had. then i did:
Code:
#ping 192.168.2.234
this is the gateway. The response i got reported 100% packet loss. This was the same for both interfaces. The ethernet cards are old 3com cards which i thought would work with OpenBSD for sure. One of the cards came straight from a machine that ran Linux and it worked in that.
So i did a sniff with tcpdump and the OpenBSD box wasn't getting replies from arp requests that it had issued in an attempt to find it's own MAC address so it could ping the gateway. The arp cache on this OpenBSD box is emtpy and it doesn't respond to the gateway's arp requests addressed to it. I'm using the default install(generic kernel)
Any ideas?
Reply With Quote
  #2   (View Single Post)  
Old 10th January 2011
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

Please post the output of
  • ifconfig -A
  • netstat -rn -f inet
  • sysctl | grep forward
  • cat /etc/mygate
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #3   (View Single Post)  
Old 10th January 2011
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

Also include a detailed network topology, annotated firewall rulesets.. and perhaps a clue.
Reply With Quote
  #4   (View Single Post)  
Old 10th January 2011
unixjingleman unixjingleman is offline
Fdisk Soldier
 
Join Date: Jan 2011
Posts: 70
Default

Here's the output of netstat -rn:Routing tables

Code:
Internet:
Destination        Gateway            Flags   Refs      Use   Mtu  Prio Iface
default            192.168.1.254      GS         0        0     -     8 xl0  
127/8              127.0.0.1          UGRS       0        0 33200     8 lo0  
127.0.0.1          127.0.0.1          UH         4        0 33200     4 lo0  
192.168.1/24       link#2             C          1        0     -     4 xl1  
192.168.1.66       127.0.0.1          UGHS       0        0 33200     8 lo0  
192.168.1.67       127.0.0.1          UGHS       0        0 33200     8 lo0  
192.168.1.68       127.0.0.1          UGHS       0        0 33200     8 lo0  
192.168.1.254      link#2             HLc        1      679     -     4 xl1  
224/4              127.0.0.1          URS        0        0 33200     8 lo0
Here's the output of ifconfig -a:

Code:
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33200
	priority: 0
	groups: lo
	inet 127.0.0.1 netmask 0xff000000
	inet6 ::1 prefixlen 128
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	lladdr 00:04:76:e6:5c:4e
	priority: 0
	groups: egress
	media: Ethernet autoselect (none)
	status: no carrier
	inet6 fe80::204:76ff:fee6:5c4e%xl0 prefixlen 64 scopeid 0x1
	inet 192.168.1.66 netmask 0xffffff00 broadcast 192.168.1.255
xl1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	lladdr 00:02:1c:f1:35:51
	priority: 0
	media: Ethernet autoselect (none)
	status: no carrier
	inet6 fe80::202:1cff:fef1:3551%xl1 prefixlen 64 scopeid 0x2
	inet 192.168.1.67 netmask 0xffffff00 broadcast 192.168.1.255
xl2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	lladdr 00:01:02:b7:1b:16
	priority: 0
	media: Ethernet autoselect (100baseTX full-duplex)
	status: active
	inet6 fe80::201:2ff:feb7:1b16%xl2 prefixlen 64 scopeid 0x3
	inet 192.168.1.68 netmask 0xffffff00 broadcast 192.168.1.255
enc0: flags=0<>
	priority: 0
	groups: enc
	status: active
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33200
	priority: 0
	groups: pflog
/etc/mygate didn't exist.So i created it and put the default gateway's I.P in. That didn't help.The output of ping is still: "ping: wrote 64 192.168.1.254 64 chars, ret =-1 \ ping: sendto: host is down"And it isn't a router yet so the sysctl variables are still set to 0. I think 3 interfaces have I.Ps
Thank you very much for your help.I put the wrong I.P in the original post cause i forgot what the gateways i.p was.

Last edited by J65nko; 10th January 2011 at 11:40 PM. Reason: Added [noparse][code][/noparse] tags ;)
Reply With Quote
  #5   (View Single Post)  
Old 10th January 2011
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

xl0 and xl1 are not connected, only xl2 is an active link. Check cabling.
Reply With Quote
  #6   (View Single Post)  
Old 10th January 2011
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

Indeed, xl0/xl1 appear down.

It also seems like you're trying to join the same subnet with each interface, are they all requesting IP's from the same DHCP server? that's a silly plan.
Reply With Quote
  #7   (View Single Post)  
Old 10th January 2011
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

Code:
xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	lladdr 00:04:76:e6:5c:4e
	priority: 0
	groups: egress
	media: Ethernet autoselect (none)
	status: no carrier
	inet6 fe80::204:76ff:fee6:5c4e%xl0 prefixlen 64 scopeid 0x1
	inet 192.168.1.66 netmask 0xffffff00 broadcast 192.168.1.255
xl1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	lladdr 00:02:1c:f1:35:51
	priority: 0
	media: Ethernet autoselect (none)
	status: no carrier
	inet6 fe80::202:1cff:fef1:3551%xl1 prefixlen 64 scopeid 0x2
	inet 192.168.1.67 netmask 0xffffff00 broadcast 192.168.1.255
xl2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	lladdr 00:01:02:b7:1b:16
	priority: 0
	media: Ethernet autoselect (100baseTX full-duplex)
	status: active
	inet6 fe80::201:2ff:feb7:1b16%xl2 prefixlen 64 scopeid 0x3
	inet 192.168.1.68 netmask 0xffffff00 broadcast 192.168.1.255
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #8   (View Single Post)  
Old 11th January 2011
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

BSDfan has pointed out something significant, it should not be ignored.

Each NIC should be on its own subnet -- this topology is flawed.
Reply With Quote
  #9   (View Single Post)  
Old 11th January 2011
unixjingleman unixjingleman is offline
Fdisk Soldier
 
Join Date: Jan 2011
Posts: 70
Default

I don't care about the overall plan of the network at this stage. I'm still trying to determine if the interfaces work with OpenBSD at all. I only have one interface attached at a time. I'm just trying to get a basic dhcp I.P working. The other machines i've got all work. so the border router works for sure. I'm just trying to get one interface talking to the net. As all the interfaces were detected i don't know why i can't achieve this simple goal. I will configure properly when i find that i can do networking at all.
Any ideas, based the output of the commands i posted?.
Reply With Quote
Old 11th January 2011
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Yes. Look at your routing table. All your outbound routes are using your unplugged NICs.

Your "test" topology is the problem.
Reply With Quote
Old 11th January 2011
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

If the xl2 NIC still has a status: active you could do
Code:
 # dhclient xl2
And you should get an IP address from your router.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 11th January 2011
unixjingleman unixjingleman is offline
Fdisk Soldier
 
Join Date: Jan 2011
Posts: 70
Default

But i have an I.P address. That's not the problem. The problem is that when i try to ping the gateway i get:
ping: 192.168.1.254 64 chars, ret=-1
ping: sendto: Host is down
---192.168.1.254 ping statistics ----
9 packets transmitted, 0 packets recieved, 100% packet loss
and yet i know for a fact that the gateway isn't down
In the tcpdump output the OpenBSD box couldn't find it's own MAC address. It also didn't respond to the gateway's ARP queries to itself.
That's why i'm stuck. Thank you for all the replies though
Reply With Quote
Old 11th January 2011
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Look at your routing table. Again:
Code:
Internet:
Destination        Gateway            Flags   Refs      Use   Mtu  Prio Iface
default            192.168.1.254      GS         0        0     -     8 xl0
When you attempt to ping any address you will use xl0. xl0 is not connected.

Flush your routing table, and make sure xl0 is not in the table. Do this by using "route flush" and then examing the table once more. If xl0 is still included, delete or change the IP addresses of xl0 and xl1 to something unusable. ("ifconfig <nic> delete" or "ifconfig <nic> 10.10.10.10/24" etc.)

You want xl2 to be the only NIC in the 192.168.1/24 subnet, and a corrected routing table, if you want to communicate.
Reply With Quote
Old 11th January 2011
unixjingleman unixjingleman is offline
Fdisk Soldier
 
Join Date: Jan 2011
Posts: 70
Default

That solved it. Silly me. So the problem was that OpenBSD just was sending packets out on interfaces that weren't up. Sorry to waste time on such a simple issue and thanks again.
Reply With Quote
Old 11th January 2011
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Silly? Not at all. Time waste? Nope.

Your refusal to accept the explanation of the root cause of your problem ... twice? I hope that was a learning experience for you.
Reply With Quote
Old 11th January 2011
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

The dhclient command would have fixed your routing tables. There are always some people who just don't try the advice given here
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
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
Basic networking fail. diw OpenBSD General 13 31st March 2009 09:29 AM
Networking: CLI quick reference anomie Other BSD and UNIX/UNIX-like 0 2nd October 2008 01:21 AM
Would BSD be right to learn networking? php111 Off-Topic 17 25th September 2008 07:02 PM
Some networking help kevinz OpenBSD General 8 15th September 2008 03:34 AM
Networking between bsd and mac rex FreeBSD General 7 12th May 2008 07:57 AM


All times are GMT. The time now is 07:41 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