LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-04-2007, 08:03 AM   #1
agentc0re
Member
 
Registered: Apr 2007
Location: SLC, UTAH
Distribution: Slackware
Posts: 200

Rep: Reputation: 34
"Default" ethernet port not responding to SSH any more


I have 2 NIC's on my server. I just recompiled the stock kernel and since then eth0, i cannot connect to the server via SSH, WINSCP, Webmin, or VMWARE console server. I can however do it on eth1. eth0 ip addy is what i added to dns and thats why i was using eth0. Both are static, and did not swap IP's. DNS still has the ip for eth0 and the dns name is pingable from another machine.

Im really stumped as to why this is happenning... would have figured if SSH port is listening that it would be listening on all eth's

my ifconfig
Code:
eth0      Link encap:Ethernet  HWaddr 00:1C:23:CC:5A:7D
          inet addr:10.30.0.45  Bcast:10.30.0.255  Mask:255.255.255.0
          inet6 addr: fe80::21c:23ff:fecc:5a7d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:849189 errors:0 dropped:0 overruns:0 frame:0
          TX packets:39402 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:72540052 (69.1 MiB)  TX bytes:11578170 (11.0 MiB)
          Interrupt:16 Memory:f8000000-f8012100

eth1      Link encap:Ethernet  HWaddr 00:1C:23:CC:5A:7F
          inet addr:10.30.0.46  Bcast:10.30.0.255  Mask:255.255.255.0
          inet6 addr: fe80::21c:23ff:fecc:5a7f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1389127 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4660375 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:167585908 (159.8 MiB)  TX bytes:2048435092 (1.9 GiB)
          Interrupt:16 Memory:f4000000-f4012100

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:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
part of netstat
Code:
tcp        0      0 *:time                  *:*                     LISTEN
tcp        0      0 *:902                   *:*                     LISTEN
tcp        0      0 *:netbios-ssn           *:*                     LISTEN
tcp        0      0 *:8333                  *:*                     LISTEN
tcp        0      0 *:10000                 *:*                     LISTEN
tcp        0      0 *:auth                  *:*                     LISTEN
tcp        0      0 *:microsoft-ds          *:*                     LISTEN
tcp        0      0 *:8222                  *:*                     LISTEN
tcp6       0      0 *:http                  *:*                     LISTEN
tcp6       0      0 *:ssh                   *:*                     LISTEN
udp        0      0 *:biff                  *:*
udp        0      0 *:biff                  *:*
udp        0      0 lando.hearts:netbios-ns *:*
udp        0      0 10.30.0.46:netbios-ns   *:*
udp        0      0 *:netbios-ns            *:*
udp        0      0 lando.heart:netbios-dgm *:*
udp        0      0 10.30.0.46:netbios-dgm  *:*
udp        0      0 *:netbios-dgm           *:*
udp        0      0 *:10000                 *:*
udp        0      0 *:time                  *:*
udp        0      0 *:time                  *:*

Not sure what else i could post that would help. i haven't changed any config files and i wouldn't even know which ones to change to have this occur.

Last edited by agentc0re; 12-04-2007 at 08:06 AM.
 
Old 12-04-2007, 08:11 AM   #2
marty_oc
LQ Newbie
 
Registered: Nov 2007
Location: Prague, Czech Republic
Distribution: Debian, Ubuntu
Posts: 6

Rep: Reputation: 0
What error do you get when you try to connect to say SSH on eth0? Is it connection refused, or timeout ?

I will also check IPTABLES or any firewall rules. Post output of iptables-save to have a look.
 
Old 12-04-2007, 10:06 AM   #3
agentc0re
Member
 
Registered: Apr 2007
Location: SLC, UTAH
Distribution: Slackware
Posts: 200

Original Poster
Rep: Reputation: 34
When i use putty and try to connect via SSH i get
Code:
Server Unexpectedly closed network connection
Not sure how to output the results of iptables-save. i was under the impression thats how you saved your iptables settings.
 
Old 12-04-2007, 10:58 PM   #4
agentc0re
Member
 
Registered: Apr 2007
Location: SLC, UTAH
Distribution: Slackware
Posts: 200

Original Poster
Rep: Reputation: 34
Another thing i've noticed is that eth1 has become my "default" ethernet port. everything by default is going in or out of that port now instead of eth0.

Any idea's why that might be happening?
 
Old 12-05-2007, 04:02 AM   #5
zux
Member
 
Registered: Jul 2006
Location: latvia
Distribution: slackware
Posts: 140

Rep: Reputation: 26
Quote:
Originally Posted by agentc0re View Post
Another thing i've noticed is that eth1 has become my "default" ethernet port. everything by default is going in or out of that port now instead of eth0.

Any idea's why that might be happening?
it could be "default" just because the other one doesn't work, is the right module loaded? i have had problems if the 2 NIC's are same model and uses the same driver.
what does "iptables -L" say?
 
Old 12-05-2007, 07:29 AM   #6
agentc0re
Member
 
Registered: Apr 2007
Location: SLC, UTAH
Distribution: Slackware
Posts: 200

Original Poster
Rep: Reputation: 34
Quote:
Originally Posted by zux View Post
it could be "default" just because the other one doesn't work, is the right module loaded? i have had problems if the 2 NIC's are same model and uses the same driver.
what does "iptables -L" say?
Crap, i didn't even think about that. Yes they are the same nic and use the same driver. im guessing there is no way around which one it decides as default to use at that point eh?

here's iptables output just for fun.
Code:
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
 
Old 12-05-2007, 08:07 AM   #7
marty_oc
LQ Newbie
 
Registered: Nov 2007
Location: Prague, Czech Republic
Distribution: Debian, Ubuntu
Posts: 6

Rep: Reputation: 0
Quote:
Originally Posted by agentc0re View Post
When i use putty and try to connect via SSH i get
Code:
Server Unexpectedly closed network connection
Not sure how to output the results of iptables-save. i was under the impression thats how you saved your iptables settings.
iptables-save fills standart output with iptables rules. If you run it alone with no parameters or redirections, you will get list of your rules. (practically the same result for this time as iptables -L)


But considering the message from putty, I think that there may be a problem with sshd.

Regarding the "same driver" issue - check lsmod, it will tell you, which driver is used. If you use some kind of hotplug manager, the modules should be loaded correctly and when you see the NICs in ifconfig, they must be loaded correctly.

Check sshd version - try updating sshd.
 
Old 12-05-2007, 08:08 AM   #8
zux
Member
 
Registered: Jul 2006
Location: latvia
Distribution: slackware
Posts: 140

Rep: Reputation: 26
iptables is not the problem.
i don't realy remember how it went with those 2 NIC's, only remeber that there were some strange problems. there is probably a way to get around this, unfortunately i can't help you.
 
Old 12-06-2007, 10:24 AM   #9
agentc0re
Member
 
Registered: Apr 2007
Location: SLC, UTAH
Distribution: Slackware
Posts: 200

Original Poster
Rep: Reputation: 34
Solved

I figured out the problem.

i was checking out my route table and the default gateway was set for eth1 not eth0!
once i changed it, everything worked as normal again.

PS anyone know how to edit my title so i can add "solved" ? tried editing my first post title and it didn't change the title displayed in the forums.

Last edited by agentc0re; 12-06-2007 at 10:25 AM.
 
Old 12-06-2007, 10:38 AM   #10
agentc0re
Member
 
Registered: Apr 2007
Location: SLC, UTAH
Distribution: Slackware
Posts: 200

Original Poster
Rep: Reputation: 34
*puts foot in mouth

I think i spoke to soon, but i think i am on the right track.
Once i changed the default gw it did work and then it stopped working. default gateway is still there but i still have to use the other nic's ip to connect via ssh.
 
Old 12-06-2007, 10:47 AM   #11
agentc0re
Member
 
Registered: Apr 2007
Location: SLC, UTAH
Distribution: Slackware
Posts: 200

Original Poster
Rep: Reputation: 34
some investigating i've found this, but not sure if it is relevant.

route table from slack 12 box i'm having issues with
Code:
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
localnet        *               255.255.255.0   U     0      0        0 eth0
localnet        *               255.255.255.0   U     0      0        0 eth1
loopback        *               255.0.0.0       U     0      0        0 lo
default         10.30.0.1       0.0.0.0         UG    0      0        0 eth0
route table from slack 11 box.
Code:
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.30.0.0       *               255.255.255.0   U     0      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo
default         10.30.0.1       0.0.0.0         UG    1      0        0 eth0
granted i don't have 2 nic's in the second machine, but i do find it weird that instead of localnet it says 10.30.0.0. not sure if this is an update from 11 to 12. i've deleted the route for eth0 completely and readded it, with no changes.
 
Old 12-06-2007, 11:35 AM   #12
agentc0re
Member
 
Registered: Apr 2007
Location: SLC, UTAH
Distribution: Slackware
Posts: 200

Original Poster
Rep: Reputation: 34
Alright, lets hope i don't have to stick my other foot in my mouth.

i had to have both in there, which makes sense.
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
localnet        *               255.255.255.0   U     0      0        0 eth0
localnet        *               255.255.255.0   U     0      0        0 eth1
loopback        *               255.0.0.0       U     0      0        0 lo
default         10.30.0.1       0.0.0.0         UG    1      0        0 eth1
default         10.30.0.1       0.0.0.0         UG    1      0        0 eth0
 
Old 12-06-2007, 11:43 AM   #13
agentc0re
Member
 
Registered: Apr 2007
Location: SLC, UTAH
Distribution: Slackware
Posts: 200

Original Poster
Rep: Reputation: 34
*Sticks other foot in mouth.... dang it!

it worked for a while and then quit. not sure what the deal is.
 
Old 12-07-2007, 02:28 AM   #14
evilDagmar
Member
 
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480

Rep: Reputation: 31
Localnet is 127.0.0.0 which isn't something that should be on any interface but lo.

Use `route -n` instead.

No host is likely to do what you want it to on a IP network with two interfaces in the same netblock. This is a limitation of IPv4.
 
Old 12-07-2007, 03:23 AM   #15
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,376

Rep: Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756
I have noticed that with Slackware 12, if you have more than one NIC in a box, then the assignment of eth0 and eth1 (etc) can change from one reboot to the next. I suspect that this is due to different timings of the cards becoming available on the bus after initialising.
The solution is to assign eth0, eth1 etc to MAC addresses in /etc/udev/rules.d/network-devices.rules.
 
  


Reply



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
The window "Retrieving update information" is not responding chatless46 Linux - Newbie 3 06-04-2007 01:22 PM
why is the default to fsck's "ignore error" "yes"? leftPeg Linux - Software 3 02-20-2006 02:02 AM
Why does "crond" sleep and "ssh" hung up? Chowroc Linux - Networking 0 01-12-2006 12:24 AM
Getting error: "ALSA device "default" is already in use by another program." brynjarh Debian 7 02-04-2005 11:45 AM
"Opposite" to a "Listening" in Port Lingo General_Tso Linux - Security 6 02-11-2004 11:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:09 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