Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
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?
Distribution: Fedors Core 3, Red Hat 9, Mandrake 8.1
Posts: 52
Rep:
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.
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?
Distribution: Fedors Core 3, Red Hat 9, Mandrake 8.1
Posts: 52
Rep:
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)
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.
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).
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?
Distribution: Fedors Core 3, Red Hat 9, Mandrake 8.1
Posts: 52
Rep:
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.
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?
Distribution: Fedors Core 3, Red Hat 9, Mandrake 8.1
Posts: 52
Rep:
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.