basic networking

Here are some really stupid questions, but I'm not really sure what I'm doing, so any help will be appreciated. I'm trying to learn linux and basic networking. I have 2 computers: one has windows and the other I just installed Red Hat 7.1. In the network configuration screen of the Red Hat install, where do I get the IP address, network, broadcast, hostname, gateway & DNS? Can I just make these up? Also, How do I connect the computers? Right now I have the RJ45 from one network card to the other.
Thanks

you must use the same rank of ips for the two pcs.
if you have 192.168.0.1 in you windows box you can assing 192.168.0.2 to you linux box. you can play with the ip number depende of you mask.
if you havea mask 255.255.255.0, you only can use 255 ips for your network, this is a class C network.
e.g.
ip: 192.168.0.1
network: 192.168.0.0
mask: 255.255.0.0
brodcast: 192.168.255.255
this will be a class B network

the hostname is the name of you box, you can use you name like bob, but you can't repeat names in other pc.
gateway is the box or router that connects you lan with internet or other network.
dns is the service that translates name address to ip address. if you need you can set up a dsn server on your linux box, or simple use the dns server of your isp.
if you are using one silgle utp cable to connect the pcs, you must use the code A in one rj, and the code B in the other.

first of all, the example you gave is incorrect. if the first octet of the ip address starts with 192, then it is a class C address, not a class B. This means that the mask is 255.255.255.0 by default.

Second of all, you won't have 255 possible ip addresses, you will only have 254. The formula is 2 to the nth power - 2, where n represents the number of unmasked bits i.e., number of zeros in the fourth octet. the minus 2 is because you can't use zero (network number) and you can't use 255 (broadcast). However, some of your newer routers and switches will accomodate the zero network.

Third, if you are connecting computer to computer, make sure your cat 5 cable is a crossover cable, not a straight through or roll over. when connecting like devices, i.e., computer to computer, pin 1 is crossed to pin 3 and pin 2 is crossed to pin 6.

if you have any more questions, feel free to email me personally.

M.

true true true.
sorry :frowning:

Thanks for your help. I'm still having some problems. I set up my linux computer as follows:
ip: 192.168.0.1
network: 192.168.0.0
mask: 255.255.255.0
broadcast:192.168.0.255
gateway: 192.168.0.254

I also bought a crossover cat 5 cable and a linux compatible modem. When I try to ftp or telnet to 192.168.0.1 from my windows computer, everything times out. Am I missing something?

Also, I installed the new modem and it works (dials and connects), but netscape won't open any websites.
Please help.

:confused:

how is your windows machine configured? wow i have spent many of nites before tests trying to find the information clearly explained like manderson19 did nice job and you were right on the money....

I set up the windows computer with the same configuration except an ip of 192.168.0.2

I can dial out and connect to the internet with both computers (separately) now.

When I ping 192.168.0.1 from the windows computer or 192.168.0.2 from the linux box, they both time out.

I must be missing something somewhere. I had no idea this would be so difficult when I started. Any other suggestions will be appreciated.

Thanks

  1. the crossover cable MUST be connected directly from NIC to NIC

  2. when you connect to your ISP (when you dial out) you might receive a DHCP address (which is not 192.168.x.x).
    *solution* from Linux- give your NIC a static IP address using the ifconfig command (192.168.0.1)
    from Windows- give it a static IP of 192.168.0.2 FOR THE NIC THAT IS CONNECTED TO THE CROSSOVER

  3. you don't need DNS addresses or gateway address for this configuration

  4. Understand that if you give these machines these addresses, you will not be able to connect to the internet AT ALL

  5. I don't think you actually connected to your ISP when you launched Netscape (i think it was just the dial-tone that fooled ya')

  6. try pinging YOUR OWN IP. (i.e. if your at your Linux box, ping 192.168.0.1) if that times out, you have a hardware problem most likely.

  7. when both machines can ping eachother, you might be able to telnet to Linux: if not, check out RedHat's website and find configuring telnet RedHat 7.2

  8. good luck and post again:)

Network diagnostic starts from lower layers to upper layers.

  1. Ckeck connectivity [is there link between your computers]?
  2. Check data link layer [C:\arp -a on win32 or # arp -a -n on .nix/linux]
  3. Check network layer [ping remote_computer] - is there "network unreachable"? "request timeout"? is there a firewall active on any of these computers? Some people says that RH7.2 comes with the firewall enabled by default
    Good luck!

yeah if you're running them peer then you don't need a gateway this is problem where your problem lies because the information is being sent to a gateway address that doesn't exist
ip address and the subnet mask should be all you need for these two computers to comm.
if you're gonna use a gateway address the you need a gateway like a router or another box with two nics

PLease forgive me if someone has already said this....

easyiest way (in my opinion)

Hook your modem to your Windows box (if it's 2k enable internet sharing)

In the TCP/IP properties
set IP 192.168.240.1 (or something)
mask 255.255.255.0
thanks it.

On your linix box useing a crossover cable (from one NIC to another)
Set IP 192.168.240.2
mask 255.255.255.0
default gateway 192.168.240.1

That should get the boxes seeing each other. All you should need to do from there is assign DNS for the Linux box to have internet access.