Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 12-08-2012, 12:55 AM   #1
Registered: Sep 2012
Posts: 372

Rep: Reputation: 1
cannot ping me as

Hi, I am trying to fight a static IP setup so that I can ftp files between the machines. I'm using Slackware 13.37 on 2 desktop machines with an ethernet cable connecting. Hence no router and the gateway in the netconfig setup was empty. I have visually and electrically tested the cable and that is OK. The lights at both ends of the cable are on. I have setup the primary machine with IP= and the secondary machine IP=
The secondary machine can ping itself and gets a no returned packets when pinging the primary. The primary machine gets not returned packets for either itself or when pinging the secondary.
I have not touched rc.inet1.conf, rc.wireless.conf, or rc.modules.
Have I done good so far ? Do I need to configure any of the rc.* files?
I am fighting wifi and connecting to it but do not think those should effect this. I have read toooooo much and am beginning to transfer logic between the problems, so anything is possible.

Last edited by waddles; 12-08-2012 at 12:57 AM.
Old 12-08-2012, 04:03 AM   #2
Senior Member
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,665

Rep: Reputation: 485Reputation: 485Reputation: 485Reputation: 485Reputation: 485
IIRC I needed to splice the cable at one end (either end) swapping between the Brown and Red lines for this to work. That's when I connected two boxes DIRECTLY without Switch without Router, and the IPv4 protocol ran over and between the boxes. <That was more than a decade ago ) If you have no Switch nor Router I think you can do the same.

However, if you give much time over "man route" you should be able to set up a static route between them and exchange packets. Just be sure that one box routes its packets to the other and vice versa. Else you should use a router as a gateway between two IPs.

The inet configuration file for Slackware is found at /etc/rc.d/rc.inet1.conf, but be sure to backup the original first

cp /etc/rc.d/rc.inet1.conf /etc/rc.d/rc.inet1.conf~
Then right there you can hardcode the Static IP each of the boxes and set the gateway

# Config information for eth0:
........ scroll a bit to lower,

# Default gateway IP address:
Then rerun the protocol

~# /etc/rc.d/rc.inet1 restart
HOpe that helps.

Good luck.

Last edited by malekmustaq; 12-08-2012 at 04:05 AM.
Old 12-08-2012, 05:17 AM   #3
Registered: Sep 2012
Posts: 372

Original Poster
Rep: Reputation: 1
cannot ping me as

A VERY BIG THANKS for the response. It has helped to clear away much of the uncertainty/unknown.

I presume by by switching the "brown" and "red" lines you built what is called a crossover cable. That is what I have installed.
I looked at the man page for route which states: "NOTE: The specified gateway must be reachable first. This usually means that you have to set up a static route to the gateway beforehand. If you specify the address of one of your local interfaces, it will be used to decide about the interface to which the packets should be routed to."
Firstly here, I presume this might mean I must go back to netconfig (root) and reconfigure the static IP with a gateway (the instructions said to leave empty for a static IP) furthermore that the gateway for each machine is the other machine. Is that a correct interpretation? I wonder if that isn't redundant because netconfig sets up the gateway then modifying rc.inet1.conf is modified for that gateway and route command creates the route.
Isn't the route command plus the rc.inet1.conf overriding what the netconfig did or didn't do?
I also wonder about rc.modules needs modifying?

I will be staying with a simplistic "static network" simply because it is there and a direct solution to file transfer.

Unless you suggest otherwise it is also my intention to create a rc.inet1.conf.static file like you suggest then I can copy it to rc.inet1.conf and along with a route command to establish routes, in a script which I would run on each machine when I need then change back when finished.

Again thanks <):^)
Oops! made the mistake of looking further here is what I found. "Apparently" there are 2 ways to do this: 1) modify rc.inet1.conf or 2) a script to modify ifconfig settings and change route.
In modifying rc.inet1.conf there seem to be differences:
a) Leaving USE_DHCP[0]="" or ="no" or probably doesn't matter?
b) Leaving GATEWAY="" or ="" or ="... .1". Any explanations?
Using rc.local and loading it with:
killall dhcpcd
ifconfig eth0 netmask up
route add default gateway

I am thinking that the latter could be put into a script and run whenever. Is that a possibility?

Last edited by waddles; 12-08-2012 at 03:11 PM.
Old 12-10-2012, 07:26 AM   #4
Senior Member
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,064
Blog Entries: 1

Rep: Reputation: 90
about dhcpd, why not keeping it from starting with init? Go find the starting link in one of the rc[123456].d directories and move it out of there or rename it or whatever.

And the network configuration, if you expect it to last I'd recommend you leave it on the corresponding sysconfig files.... but that's just cause I love to nag other people with these futilities.

Also, you only care about these two boxes seeing each other? No router involved.
Old 12-10-2012, 07:28 AM   #5
Senior Member
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,064
Blog Entries: 1

Rep: Reputation: 90
Oh, and finally, if both boxes are set up with their corresponding IP addresses/netmasks, did you check that there's no netfilter stuff getting in the way?

iptables -L -nv
iptables -t nat -L -nv


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
my server can't ping other boxes on private network ( bweaver Linux - Networking 5 07-28-2011 03:20 PM
[SOLVED] iptables 192.168.1.x server, can't ping by 192.168.0.x momok Linux - Security 2 06-02-2011 01:32 AM
[root@wlxxb ~]# telnet 25 Trying telnet problem cnhawk386 Linux - Networking 1 10-10-2007 02:50 PM
What route to access daisy chained 2d router after (subnets?) Emmanuel_uk Linux - Networking 6 05-05-2006 01:47 AM
Is someone on my network?! ::ffff: ::ffff:192.168.0.:38201 ESTABLISHE ming0 Linux - Security 4 04-12-2005 01:04 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:10 AM.

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