LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-05-2003, 10:45 PM   #1
dook
LQ Newbie
 
Registered: Dec 2003
Location: USA
Distribution: SuSE 8.2
Posts: 11

Rep: Reputation: 0
Static Ip Networking


Hello, I am trying to set up a network that uses static ips. The computers I'm using are'nt the best but its all I have to work with. I have 6 but am only working with 3 until I see how things work. Computer "B" is 200mhz and computer "E" and "F" are 133's. They all have network cards, are connected by a hub, and are running Redhat 7.3. The setting I've tried in /etc/sysconfig/network-scripts/ifcfg-eth0:

DEVICE=eth0
BOOTPROTO=static
IPADDR=10.0.0.1
NETMASK=255.255.255.0
GATEWAY= 10.0.0.254 (default)

same configuration for the other 2 computers except for the ip's.

when I run "route", I got something like: (sorry, trying from memory)

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
10.0.0.0 * 255.255.255.0 U 0 0 0 eth0
default 10.0.0.254 0.0.0.0 UG 0 0 0 eth0


just as a sidenote, on the hub computer B and F's conetion lights are on but E's isn't. When I ping the broadcast address from B, B and F's traffic light blinks but not E's. When I ping from F, only F's traffic light blinks. E's lights are dead, but it says OK when bringing up eth0 during the boot process.

I am not going to connect these computers to the internet. Any suggestions? Maybe a REAL tutorial on static IP networking somewhere that I'm just not seeing?
 
Old 12-06-2003, 12:04 AM   #2
tiger3
Member
 
Registered: Nov 2003
Location: Land of the Rising Sun!
Distribution: Fedors Core 3, Red Hat 9, Mandrake 8.1
Posts: 52

Rep: Reputation: 15
Looks good on your config as long as all computers are in the same network 10.0.0.0 255.255.255.0 If you are connecting NIC to NIC on computers you need a crossover cable. Try changing the cable and see if it works on the other computer whith the same cable. if so the cable may be a straight through which will work on non-like equipment, but not computer to computer.

pins 1,2,3,6 are switched on one end of a crossover cable.
 
Old 12-06-2003, 08:15 AM   #3
dook
LQ Newbie
 
Registered: Dec 2003
Location: USA
Distribution: SuSE 8.2
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks Brad, all the cables are straight through, but they are connected to a hub. I was using cables I made but tried some pre-made patch cables to and they gave the same results. On a network like this, what would be the gateway?

Thanks,
Dook
 
Old 12-06-2003, 08:21 AM   #4
tiger3
Member
 
Registered: Nov 2003
Location: Land of the Rising Sun!
Distribution: Fedors Core 3, Red Hat 9, Mandrake 8.1
Posts: 52

Rep: Reputation: 15
The gateway is the next hop a packet would take to get to the the router or internet. In your case I (not connecting to internet) You do not need a gateway.
Since they are connected trough a HUB. (I assume it is a dumb (does no routing)) All packets are recieved by all hosts. The best way is to have one computer act as a router for the others it would be the gateway in that case.
In your case you may just want to edit your /etc/hosts file. This will provide connectivity to all hosts connected to a switch or hub. (without the need for a router configuration)

Example: /etc/hosts
#IP Hostname Domainname #comments
127.0.0.1 localhost localhost.localdomain
10.0.0.1 mycomputer myhost.mydomain

You can name it just about anything you want. Add all host computers to this file and then you should have no problems. This file should be on every computer listing the other hosts. You can then ping or mount using the host name you gave it instead of having to use the IP.
As long as your cables are crossover.
Also pinging the 127.0.0.1 will see if your NICs are set up right. If it does not get a reply from itself something is set up wrong or your NIC is bad.

Last edited by tiger3; 12-06-2003 at 08:43 AM.
 
Old 12-06-2003, 08:28 AM   #5
baz2
Member
 
Registered: Nov 2002
Posts: 73

Rep: Reputation: 15
Quote:
Originally posted by dook
Thanks Brad, all the cables are straight through, but they are connected to a hub. I was using cables I made but tried some pre-made patch cables to and they gave the same results. On a network like this, what would be the gateway?

Thanks,
Dook
Since you are not trying to connect to the internet (so you said in your first post), you don't need a gateway. The gateway ip address is the address of a router that connects your lan to "the outside world" (could just be another lan, not necessarily the internet). IOW, if there is no router interface connected to your lan, there is no gateway.

So, the problem isn't the gateway. Instead of pinging the broadcast address, what happens if you ping to and from specific computers. It sounds to me like you should be able to ping between B and F okay. The problem with E sounds physical. You say "no lights." Do you mean on both the hub and the NIC? We need to pinpoint the problem. If there are lights on the NIC, but not where the cable plugs into the hub, I would suspect the cable as being bad. If there are no lights on the NIC, then the NIC may be bad. On E, try pining "localhost" or "127.0.0.1" and see if you get a response. If so, the eth0 is okay, and the problem is most likely the cable to the hub (or less likely, but worth checking: the port on the hub; to see, try plugging the cable into a different port).
 
Old 12-06-2003, 08:43 AM   #6
dook
LQ Newbie
 
Registered: Dec 2003
Location: USA
Distribution: SuSE 8.2
Posts: 11

Original Poster
Rep: Reputation: 0
baz2, I've think I've tried to ping B from F and vice versa, and deffinatly ran a nmap scan of them and ssh to them with no results. On E's NIC I don't remember seeing any lights and I switched cables around with the same results. To eliminate the cable/hub issue, I am using prefab cables and a netgear linksys 8port hub. E can ping itself through the loopback and its Ip addr, but still when I do this the both lights on the hub do not light up. I am glad to hear the gateway isn't the problem, that was really getting to me. In response to Brads post, I enabled IP forwarding on B and told F that B was its gateway (just for kicks because I'm runnin gout of ideas) and of course got no result. Is there any other information that you folks would need to clarify the situation?

-Dook
 
Old 12-06-2003, 08:51 AM   #7
tiger3
Member
 
Registered: Nov 2003
Location: Land of the Rising Sun!
Distribution: Fedors Core 3, Red Hat 9, Mandrake 8.1
Posts: 52

Rep: Reputation: 15
Look at both ends of the cable at the same time. With the tab down look at the colors of the wires if they are in the same sequence you have straight through and it will not work NIC to NIC. You need one that is different on one side.
you should see a green wire on one RJ-45 connector it will be on the left, on the other the green one will be on the right. If this is true you have a crossover. There are 8 wires but only 4 of them are actually used. wire 1 and 3 are switched and 2 and 6 are switched on one side.

CAT5 cable pinout
*******************************
CROSSOVER CABLE
Pins 1 ,2, 3 and 6 are crossed.

Side1 / Side2

1 white-green / 3 white-orange

2 green / 6 orange

3 white-orange / 1 white-green

4 blue / 4 blue

5 white-blue / 5 white-blue

6 orange / 2 green

7 white-brown / 7 white-brown

8 brown / 8 brown

********************************
STRAIGHT THROUGH
Is the same on both ends

Side1 / Side2

1 white-green / 1 white-green

2 green / 2 green

3 white-orange / 3 white-orange

4 blue / 4 blue

5 white-blue / 5 white-blue

6 orange / 6 orange

7 white-brown / 7 white-brown

8 brown / 8 brown

********************************
Quote:
I am using prefab cables and a netgear linksys 8port hub.
OK I misunderstood I thought you had the computers connected NIC to NIC. You need straight through cables for the linksys hub. Sorry.

Last edited by tiger3; 12-06-2003 at 09:02 AM.
 
Old 12-06-2003, 09:01 AM   #8
dook
LQ Newbie
 
Registered: Dec 2003
Location: USA
Distribution: SuSE 8.2
Posts: 11

Original Poster
Rep: Reputation: 0
Brad, thanks for the info but I am not connecting NIC to NIC. I am assuming the crossover occurs in the hub itself (which the 3 computers are connected to). When I made the cables I followed the straight-through convention but I'm not even using them now as to rule out the possibility of them being faulty. I am using pre-fabricated patch cables that were made by a networking company. The cables are straight through. On the hub there is a pushbutton switch labled "Normal/Link". I've been using the normal setting. Would "Link" be any different or is that just for daisy-chaining multiple hubs together?

-Dook

Last edited by dook; 12-06-2003 at 09:02 AM.
 
Old 12-06-2003, 09:06 AM   #9
tiger3
Member
 
Registered: Nov 2003
Location: Land of the Rising Sun!
Distribution: Fedors Core 3, Red Hat 9, Mandrake 8.1
Posts: 52

Rep: Reputation: 15
Well I am not sure about the button. I use a netgear switch. What happens when you ping 127.0.0.1?
 
Old 12-06-2003, 09:07 AM   #10
dook
LQ Newbie
 
Registered: Dec 2003
Location: USA
Distribution: SuSE 8.2
Posts: 11

Original Poster
Rep: Reputation: 0
When I ping the 127.0.0.1 on all three computers, I get replies.
 
Old 12-06-2003, 09:11 AM   #11
tiger3
Member
 
Registered: Nov 2003
Location: Land of the Rising Sun!
Distribution: Fedors Core 3, Red Hat 9, Mandrake 8.1
Posts: 52

Rep: Reputation: 15
Then your NICs are good. Did you try moving the cable to a different port?
One port may be for linking the hubs if you have more than one.
 
Old 12-06-2003, 09:13 AM   #12
dook
LQ Newbie
 
Registered: Dec 2003
Location: USA
Distribution: SuSE 8.2
Posts: 11

Original Poster
Rep: Reputation: 0
Yes, I've tried different ports and have not used the "Link" port.

-Dook
 
Old 12-06-2003, 09:15 AM   #13
tiger3
Member
 
Registered: Nov 2003
Location: Land of the Rising Sun!
Distribution: Fedors Core 3, Red Hat 9, Mandrake 8.1
Posts: 52

Rep: Reputation: 15
Does one of your computers have an ip of 10.0.0.254, that is your GATEWAY and default route according to your first post. That may be the problem. You do not need it.
 
Old 12-06-2003, 09:16 AM   #14
tiger3
Member
 
Registered: Nov 2003
Location: Land of the Rising Sun!
Distribution: Fedors Core 3, Red Hat 9, Mandrake 8.1
Posts: 52

Rep: Reputation: 15
if it is there and you try to send a packet it tries until it timesout to get to that address (10.0.0.254)
 
Old 12-06-2003, 09:18 AM   #15
dook
LQ Newbie
 
Registered: Dec 2003
Location: USA
Distribution: SuSE 8.2
Posts: 11

Original Poster
Rep: Reputation: 0
Nope, none of the computers have the IP 10.0.0.254. If I delete the gateway entry from the route table, and I try to ping anything, I get a "No connection" error. Last night I tired setting the gateways for the 3 computers to be 10.0.0.1, which is computer B. IP forwarding is enabled on computer B. Of couse it didn't work.

-Dook
 
  


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
Howto Assign Multiple Static Public IP Addresses under SBC's PPPoE Static Ip system o trekgraham Linux - Networking 8 04-17-2007 10:51 AM
Is there any static ARP for static IP network? linux_lover2005 Linux - Networking 2 05-18-2005 12:01 PM
FC2 Overriding static if in favor of dhcp system set for static pkraus109 Linux - Networking 8 09-21-2004 11:13 AM
Random Networking to Non-Networking o-o Ne0BDP Slackware 3 07-08-2004 01:18 AM
Trying to setup Linux networking (Static to ISP) friddick Linux - Networking 2 07-30-2003 04:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:26 PM.

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