Find the answer to your Linux question:
Results 1 to 9 of 9
Hello every one. I am new to linux and networking in general. From reading articles online I decided to set up a small private network at home for learning purposses. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2007
    Posts
    19

    Wink Problems configuring a private network. Help please


    Hello every one. I am new to linux and networking in general. From reading articles online I decided to set up a small private network at home for learning purposses. I have never setup a network in my life before

    I have both a public network and a private network.
    I have 2 PCs with Centos4.4 installed in both. Each has 2 network cards. 1 normal 10/100 ethernet card and one GigE card.

    The puplic network consist of:
    1 Machine which is my destop is connected to a router using normal 10/100 ethernet card. The desktop is connected to the only monitor.

    In the private network:
    The GigE card on the desktop machine(which is the second network card on that machine) is connected to the other GigE card in the second machine which is the server. The server is not connected to the router, thus does not access the internet. The server is not also connected to a monitor. My network link b/w the desktop and the server is CAT6 which is connected to both ends of the GigE card. This makes the private network.

    This means I have two separate networks:
    One with the desktop going out to the internet(small) and the second with
    the desktop and the server using CAT6.

    This is how my physical connection looks like:
    So, (for 10/100 ethernet on my desktop) I have plug desktop->router->modem.
    The server((GigE port)) is plug into the 2nd ethernet port(GigE port) on my desktop using CAT6
    Right now I can connect to the internet from my desktop b/c is connected to my router but I don't know how to connect to the 2nd computer (server).
    How do I make both computers to communicate using the GigE on both machines? I am begging for help here please. Please could some one help me out to configure both machines such that they could communicate with one another? I would really appreciate your help.
    Paddy

  2. #2
    Just Joined! F@32's Avatar
    Join Date
    Jul 2006
    Location
    Cowjackingstan, Alpha-Centauri
    Posts
    3
    Hey, I'm not linux guru, but have been running home networks for quiet some time.

    The rule of thumb for your LAN is set NIC's addresses in the same range and same subnet. Usually it is 192.168.x.y for IPs and 255.255.255.0 subnet. Set your desktop's NIC to 192.168.1.10 and your Server's to 192.168.1.11. It is important that IPs have the same first 3 digits and different fourth. If you don't have firewall running on server you should be able to ping 192.168.1.11 form your desktop. Once you can ping, you should be able to set up folder sharing and etc.

    Cheers

  3. #3
    Just Joined!
    Join Date
    Mar 2007
    Posts
    19
    Thank you F@32.
    Since I have 4 NIC cards on 2 PCs(one 10/100 and one GigE card on each pc), does it means that I should configure the IP addresses for the 4 NIC cards?
    Also during installation I enabled DHCP on each pc. How can I explicitely disable DHCP now and manually assign IP addresses to the NIC cards?

  4. #4
    Linux Newbie framp's Avatar
    Join Date
    Jul 2006
    Location
    Stuttgart, Germany
    Posts
    240
    I frankly don't have any experiences with CentOS . But that's what I suggest to do to get your network up and running:

    1) Either use the 1GB nic or 10/100 nic on both systems. Don't use both cards! Start with 1GB nic when they are supported by CentOS - otherwise use the 10/100 nics.
    2) Use IP 192.168.0.1, broadcast 192.168.0.255 and mask 255.255.255.0 on your server without monitor and 192.168.1.1, broadcast 192.168.1.255 and mask 255.255.255.0 on your desktop.
    3) Finally you should be able to ping 192.168.0.1 from your desktop
    4) Enable forwarding on your desktop (echo "1" > /proc/sys/net/ipv4/ip_forward) or use some CentOS special configuration to get this done
    5) Check your FW on your desktop and allow traffic from 192.168.0.0/255.255.255.0 to the router and vice versa
    6) Allow masquerading on your desktop
    7) If you want to have your server be accessed from the INet you have to create special iptables rules to get this done
    Install ssh on your server so you can access your server (without monitor) from your desktop (with monitor).

    I have a quite similar configuration at home - one Linux box as a gateway/firewall (not as a desktop) - and multiple clients (Win XP & Linux) in the private net which access the INet through the gateway.
    "Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." Linus Benedict Torvalds

  5. #5
    Just Joined!
    Join Date
    Mar 2007
    Posts
    19
    Thak you framp.
    The way my setup is right now I must use the 2 cards on the desktop. The 10/100 nic card on the desktop connects to the router which connects to the Internet cable modem.

    The 2nd 1GB nic card on the desktop connects to my 2nd 1GB nic card on my 2nd pc which is the server. The intergrated 10/100 nic card on the server is not connected.

    From your suggestions I have to assign 4 pc addresses not 2 because I have 4 cards in place. Out of all the 4 cards I will be using only 3 cards in my active connection. i.e 2(10/100 and GB)on the desktop and 1(GB)on the server.
    Right now Centos is installed on both of the PCs but I can't access the server from the desktop. What's the best possible way to configure? Thanks for any help.
    Paddy

  6. #6
    Just Joined!
    Join Date
    Mar 2007
    Posts
    19
    I am able to configure my network so that I can ping the server. The server is responging. But when I try to vnc into the server I get an error
    Code:
    main:        unable to connect to host: Connection refused (111)
    .
    I started the vncserver from the desktop as follows:
    Code:
     service vncserver start (it was ok)
    vncserver
    then 
    vncviewer.
    That's when I receive the error message
    main: unable to connect to host: Connection refused (111)
    Any idea what I might be doing wrong?

  7. #7
    Linux Newbie framp's Avatar
    Join Date
    Jul 2006
    Location
    Stuttgart, Germany
    Posts
    240
    You have to start vncserver on your server. Log on with ssh from your desktop and then start the vncserver. Then start vncviewer on your desktop
    "Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." Linus Benedict Torvalds

  8. #8
    Just Joined!
    Join Date
    Mar 2007
    Posts
    19
    thank you framp,
    I followed the steps you mentioned and I am having this error:
    Code:
    [root@localhost ~]# vncviewer
    vncviewer: ConnectToTcpAddr: connect: Connection refused
    Unable to connect to VNC server
    It looks like I need to do some thing on the server to allow the connection but I don't know exactly what.
    what I am doing wrong or what do I need to do next?

  9. #9
    Linux Newbie framp's Avatar
    Join Date
    Jul 2006
    Location
    Stuttgart, Germany
    Posts
    240
    I suggest to check the logs on your server for error messges when you start vncserver
    "Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." Linus Benedict Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •