LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Networking with a switch (https://www.linuxquestions.org/questions/linux-networking-3/networking-with-a-switch-126792/)

Wynd 12-17-2003 08:13 PM

Networking with a switch
 
I have two computers, one running Slack, the other running Windows 2000. I used to have my network set up so the 2k box had two network cards (cable modem/Internet and switch/LAN) and I would access the Internet on the second computer by setting the first one to use ICS and act as a DHCP server. Now, I found out that my ISP provides multiple IPs, so I changed everything around: plugged the cable modem and both computers into the switch. Now they can access the internet independently, but I have no LAN. There is nothing in Network Neighborhood on the 2k box (not sure how to check in linux). So, how can I get the computers to see each other? If I get more cat 5 cable and run one from the second NIC in the 2k box to the switch, would it do anything? :confused:

jstu 12-17-2003 10:17 PM

Read up on samba.
www.samba.org

chort 12-18-2003 01:04 AM

Both computers can see each other just fine on your LAN. You've fallen for the common misconception that Microsoft networking == LAN (and vis versa). Really, a LAN is just a bunch of systems running the same protocols and physically connected some how (in this case, through the switch). Your Win2K box runs IP (Internet Protocol), and so does Linux. Technically speaking, they're networked to each other.

What you're thinking of is SMB/CIFS, which is Microsoft networking and uses a set of proprietary protocols built on top of IP. For that, use Samba (like above).

Wynd 12-18-2003 12:57 PM

Yeah I know that, but this is the thing. I am running Samba on this computer, but they don't see each other. I can look in network neighborhood or do "smbclient -L <IP of Win2000 box>" and they don't see each other. I would guess because they seem to be going through the Internet to reach each other (several hops) instead of right to each other. My network is set up like this:
Code:

|Cable Modem|
      |
      |
  |Switch|
    / \
Comp1  Comp2

Correct me if I am wrong anywhere. The definition of "LAN" I am using is where they can talk to each other without leaving my house. They are not set up for this because they both have network cards that have non-local IPs (via DHCP). If I got an additional network card for each computer and hooked them to the switch with statis IPs like 192.168.0.1 and 192.168.0.2 or something, would that work? As far as I can see, using the cable modem with the switch is basically like giving the cable modem more ports, like I had both computers directly plugged into the modem.

jstu 12-18-2003 01:55 PM

Can you ping the linux box from the windows and vice versa. Or try a traceroute. See what that returns

chort 12-18-2003 03:26 PM

Oooooh, you have multiple IPs from your ISP and each computer gets an Internet IP? OK, that makes more sense.

You could get an additional NIC for each box and hook them together with a crossover cable (giving each NIC a private IP on the same net). Another way to do it would be to use some sort of gateway between the cable modem and the switch. Most SoHo devices do not have support for multiple WAN IPs, but you could use a Linux box for this and configure ipmasq. Then the Linux box (or any other *nix, for that matter) would have both external IPs and it would NAT them to internal private IPs. Your internal boxes would have private IPs.

Using only your current equipment, you could buy one more NIC for the Linux box and setup NAT on the Linux box. The cable modem would plug into one NIC on the Linux box, and the other NIC would plug into the switch with the Windows box.


All times are GMT -5. The time now is 02:21 AM.