LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   What is the necessary hardware to connect two computers in a LAN configuration? (https://www.linuxquestions.org/questions/linux-hardware-18/what-is-the-necessary-hardware-to-connect-two-computers-in-a-lan-configuration-4175449922/)

stf92 02-12-2013 11:30 PM

What is the necessary hardware to connect two computers in a LAN configuration?
 
Hi: The scenario:

(a) No knowledge whatsoever about LAN.
(b) Two desktops at home, one of them connected to the internet by only using a cable modem.
(c) The other one stands alone, up to now.
(d) Each machine has only one LAN chip.

I aim at:
(d) Having communications between both computers.
(e) At least one computer must have internet.

Some questions: What is the minimum hardware I need to make the connection? Do I need a router? And the cables? Are they commercially available?

Stéphane Ascoët 02-13-2013 01:37 AM

You just need a crossed RJ45 cable.

stf92 02-13-2013 02:12 AM

OK. I see in the internet that from each computer a cable goes to the hub or switch. I guess from the hub a cable goes to the cable modem. But then these are three cables. I'm afraid I did not get you.

EDDY1 02-13-2013 02:14 AM

You may have to get an additional network card for the computer that is already connected to network so as to use crossover cable. Or you can get another router with atleast 2 ports.

displace 02-13-2013 02:23 AM

A switch is normally used on an internal network. You could connect both computers and a modem via a switch, but you would have to setup internet access on both desktops. A typical NAT setup is to use a router, connect the modem to its WAN port and the desktop computers to its LAN ports. The computers are configured with DHCP, and the router connects to the internet.

TobiSGD 02-13-2013 05:39 AM

Most modern cable modems act already as router, not as modem. You can easily check that with checking how your machine gets the network interface set up. If the network interface is using DHCP to get its settings the modem acts as router. In that case you need nothing but a switch (hubs are outdated and should not be used) and three cables (Cat5-E). All of these are commercially available.

stf92 02-13-2013 05:55 AM

Quote:

Originally Posted by displace (Post 4890503)
A switch is normally used on an internal network. You could connect both computers and a modem via a switch, but you would have to setup internet access on both desktops. A typical NAT setup is to use a router, connect the modem to its WAN port and the desktop computers to its LAN ports. The computers are configured with DHCP, and the router connects to the internet.

So the connection via a switch and the connection via router are two different approaches, or is the router scenario a particular case of the switch connection?

TobiSGD 02-13-2013 06:34 AM

Quote:

Originally Posted by stf92 (Post 4890650)
So the connection via a switch and the connection via router are two different approaches, or is the router scenario a particular case of the switch connection?

You can see the router as a device that connects different networks, for example the Internet and your local network, while a switch is used to extent an existing network. If your cable modem acts as router you already have a separate home netwrok and just need to extend it with a switch.

stf92 02-13-2013 07:43 AM

Quote:

Originally Posted by TobiSGD (Post 4890634)
Most modern cable modems act already as router, not as modem. You can easily check that with checking how your machine gets the network interface set up. If the network interface is using DHCP to get its settings the modem acts as router. In that case you need nothing but a switch (hubs are outdated and should not be used) and three cables (Cat5-E). All of these are commercially available.

Alright. Then:
Street cable goes to MODEM which goes to SWITCH which goes to both computers A and B. Cat5-E is needed for all connections except street to modem, which is a coaxial cable provided by the company.

This, provided I use DHCP, and I have done so up to the present. I can get the Cat5-E cables and, about the switch: they offer me for 10/100Mbits/s. My ISP is presently giving me 1Mbit/s. Does this mean that switch is 100 times faster than I need?

michaelk 02-13-2013 07:54 AM

Depends on your ISP but typically in the US basic home cable setup only provides one DHCP IP address. If this is true and your MODEM is not also a router then a switch will not work.

stf92 02-13-2013 08:03 AM

A physical inspection of the modem reveals it has one I/O connector for the coaxial cable, and two I/O connectors, one labeled USB, the other, Ethernet. I guess this is not enough to know if it is also a router.

I certainly have the model. It's a Motorola Surfboard SB5101i. If I look in google or go to the motorola.com site, what should I look for to know it is also a router?

frieza 02-13-2013 08:08 AM

it depends, if your modem has only one ethernet plug on the back (which is the likely situation), then you need a router

typical home routers (I would recommend a Linksys router) have a built in 4 port switch
(actually it's a 5 port switch, but to all intents and purposes it's a 4 since port 5 is separated by the router's firmware used as the WAN port, but that's neither here nor there)

thus your network diagram would look something like this

Code:

<wall plug>
    |
    |
 <coax> 
 {modem}
<ethernet>
    |
    |
  <wan>{router}<sw1><sw2><sw3><sw4>
                |    |    |    |
                |    |    +----+--{empty}
                |    |
                |    +--{computer 2}
                |
              {computer1}


schneidz 02-13-2013 08:13 AM

Quote:

Originally Posted by Stéphane Ascoët (Post 4890483)
You just need a crossed RJ45 cable.

not necessarily true:
Quote:

Originally Posted by lazlow (Post 3798085)
If either end is GigE then the above statement is not true. GigE will automatically handle doing this without using a crossover cable.

however passing internet packets between the 2 pc's will require the op to know about iptables rules:
http://www.linuxquestions.org/questi...6/#post3804866
(probably easier for them to buy an off-the-shelf router for like 40 bucks).

stf92 02-13-2013 08:16 AM

@frieza:

I'm telling you. It has one and only one Ethernet jack and one (empty, i.e., not used) USB jack.

stf92 02-13-2013 08:23 AM

The following link, http://www.ehow.com/how_8540501_conf...rd-router.html, by its name is telling the sb5101 is a router too! However its the only place where the word "router" is mentioned.

schneidz 02-13-2013 08:28 AM

Quote:

Originally Posted by stf92 (Post 4890749)
@frieza:

I'm telling you. It has one and only one Ethernet jack and one (empty, i.e., not used) USB jack.

ignore the usb port (some people like to connect to internet using usb but i think it is preferential to use ethernet). -- fyi, the internet transceiver cannot provide internet access to both usb and ethernet at the same time. that would be the function of a router.

the easiest thing to do would probably be to buy a router and the necessary cables (probably a 802.11n wifi router).

the cheapest thing to do would probably be to transform an old pc into a router using something like smoothwall linux (but that would require basic system administration knowledge).

TobiSGD 02-13-2013 08:49 AM

Quote:

Originally Posted by stf92 (Post 4890740)
It's a Motorola Surfboard SB5101i.

According to the manual this device acts as router, so you can simply extent your network using a switch.

Quote:

I can get the Cat5-E cables and, about the switch: they offer me for 10/100Mbits/s. My ISP is presently giving me 1Mbit/s. Does this mean that switch is 100 times faster than I need?
Yes, that means that the switch can handle 100 times the bandwidth of your Internet connection. It also means that your PCs are able to communicate with a bandwidth of 100 MBit/sec (theoretical, in practice you will get about 11 MByte/sec, which is slightly slower) with each other (if both also have 100MBit or better network adapters). Trust me, you will not want something that is slower.

stf92 02-13-2013 08:57 AM

So the fact it (the Motorola) has only one RJ45 jack means nothing. Alright! However the manual, for which I thank you very much, does not apply to the SB5101i. Could this mean the SB5101i is not a modem-router?

schneidz 02-13-2013 09:00 AM

any reason why a switch would be preferable over a wifi router ?

stf92 02-13-2013 09:10 AM

According to this link, http://forums.whirlpool.net.au/archive/1483426 the difference between the SB5101i and the SB5101u is just the stand-by button. The SB5101i has it, the other has it not. They are identical units otherwise, according to the poster. So, I'm already buying cables and switch. Thanks again, TobiSGD.

stf92 02-13-2013 09:13 AM

Quote:

Originally Posted by schneidz (Post 4890780)
any reason why a switch would be preferable over a wifi router ?

A switch is sensibly cheaper?

onebuck 02-13-2013 09:53 AM

Member Response
 
Hi,

You can extend the LAN using a Network Switch.
Network Switch;
Quote:

A network switch is a computer networking device that links network segments or network devices. The term commonly refers to a multi-port network bridge that processes and routes data at the data link layer (layer 2) of the OSI model. Switches that additionally process data at the network layer (layer 3) and above are often called layer-3 switches or multilayer switches.
Switches exist for various types of networks including Fibre Channel, Asynchronous Transfer Mode, InfiniBand, Ethernet and others. The first Ethernet switch was introduced by Kalpana in 1990.[1]


Function
A switch is a telecommunication device that receives a message from any device connected to it and then transmits the message only to the device for which the message was meant. This makes the switch a more intelligent device than a hub (which receives a message and then transmits it to all the other devices on its network). The network switch plays an integral part in most modern Ethernet local area networks (LANs). Mid-to-large sized LANs contain a number of linked managed switches. Small office/home office (SOHO) applications typically use a single switch, or an all-purpose converged device such as a residential gateway to access small office/home broadband services such as DSL or cable Internet. In most of these cases, the end-user device contains a router and components that interface to the particular physical broadband technology. User devices may also include a telephone interface for VoIP.
An Ethernet switch operates at the data link layer of the OSI model to create a separate collision domain for each switch port. With 4 computers (e.g., A, B, C, and D) on 4 switch ports, any pair (e.g. A and B) can transfer data back and forth while the other pair (e.g. C and D) also do so simultaneously, and the two conversations will not interfere with one another. In full duplex mode, these pairs can also overlap (e.g. A transmits to B, simultaneously B to C, and so on). In the case of a repeater hub, they would all share the bandwidth and run in half duplex, resulting in collisions, which would then necessitate retransmissions.
You can expand your LAN with a router.
Router
Quote:

A router is a device that forwards data packets between computer networks, creating an overlay internetwork. A router is connected to two or more data lines from different networks. When a data packet comes in one of the lines, the router reads the address information in the packet to determine its ultimate destination. Then, using information in its routing table or routing policy, it directs the packet to the next network on its journey. Routers perform the "traffic directing" functions on the Internet. A data packet is typically forwarded from one router to another through the networks that constitute the internetwork until it reaches its destination node.[1]
The most familiar type of routers are home and small office routers that simply pass data, such as web pages, email, IM, and vidoes between the home computers and the Internet. An example of a router would be the owner's cable or DSL modem, which connects to the Internet through an ISP. More sophisticated routers, such as enterprise routers, connect large business or ISP networks up to the powerful core routers that forward data at high speed along the optical fiber lines of the Internet backbone. Though routers are typically dedicated hardware devices, use of software-based routers has grown increasingly common.
Hope this helps!

WiseDraco 02-13-2013 12:58 PM

if look at start scenario, that can be done with ethernet switch: on the computer where must be internet connection, do aliase for ethernet, like as eth0:0 192.168.1.1 asides of another ethetrnet address, given to it, with cable modem for internet, and configure eth on another computer somehow a-la eth0 192.168.1.2, then put all three etjhernet cables to switch. but on many things is not best solution. hardware router is better, and put additional ethernet card in one of computers, and use them as router ( with iptables and packet forwarding) is also good variant, imho.

stf92 02-13-2013 03:51 PM

Quote:

Originally Posted by WiseDraco (Post 4890930)
if look at start scenario, that can be done with ethernet switch: on the computer where must be internet connection, do aliase for ethernet, like as eth0:0 192.168.1.1 asides of another ethetrnet address, given to it, with cable modem for internet, and configure eth on another computer somehow a-la eth0 192.168.1.2, then put all three etjhernet cables to switch. but on many things is not best solution. hardware router is better, and put additional ethernet card in one of computers, and use them as router ( with iptables and packet forwarding) is also good variant, imho.

Thanks a lot. For the moment I prefer simplicity over effectiveness. So, the hardware conditions are now:
  • 1. Cable modem-router (in what follows called modem) connected to ISP.
  • 2. Switch connected to modem, computer A and computer B.

I'm reading The Network Administrator's Guide (The Linux Documentation Project) and really all this is for the benefit of the book I am about to begin reading. That is, so I can see the examples working. But, if things are so simple, perhaps I can make the thing work right now!

A question: what is, or how do I do an alias of the type eth0:0 192.168.1.1. From the man page for ifconfig, I can do 'ifconfig eth0 <some address>'. Do you mean the alias builtin command?

fbobraga 02-13-2013 06:39 PM

Quote:

Originally Posted by stf92 (Post 4890788)
A switch is sensibly cheaper?

No: it's not as easy to find - wifi-routers are very common, even in supermarkets you will find them, what makes it very cheap

* at home, I have one of these: http://www.amazon.com/TP-Link-TL-WR3...words=TL-WR340 (cheapest I've found, at the time I've bought it [two years ago...])

TobiSGD 02-13-2013 06:44 PM

Quote:

Originally Posted by fbobraga (Post 4891139)
No: it's not as easy to find - wifi-routers are very common, even in supermarkets you will find them, what makes it very cheap

* at home, I have one of these: http://www.amazon.com/TP-Link-TL-WR3...words=TL-WR340 (cheapest I've found, at the time I've bought it [two years ago...])

You can find switches in any computer store and in home improvement stores here, for about these prices: http://www.amazon.com/D-Link-DES-110.../dp/B000GHD73Y

So, yes, they are significantly cheaper.

stf92 02-13-2013 06:46 PM

By chance, do they use infrared technology? Some part of the electromagnetic spectrum has to be used. Infrared would make them very poorly efficient.

stf92 02-13-2013 06:48 PM

TobiSGD, you would not be so kind to write two or three command lines so I can see the thing in action? It would highly motivate me.

TobiSGD 02-13-2013 07:30 PM

I don't quite get what you mean with that. Wifi routers (aka WLAN routers) use radio transmission. I am quite sure you have heard about WLAN earlier, I would think.
What commands do you mean?

stf92 02-13-2013 08:16 PM

Well, about network aliases (ifconfig eth0:0 192.168.111) I think they're used only for security reasons, so for the moment I could dispense with them. I see, you posted while I was writing and I was not aware of that. Suppose I have things as in post #24. Some elementary procedure, that is the minimal one that would make one machine connect to internet while talking to the other machine? The machine I am using right now to post let it be A. I presume some ifconfig commands alone would make the three things, A, B and the ISP to be connected together, where B is the other machine. Am I right?

EDIT: in an electronics forum, they told me it is as easy as electrically connecting the two hosts and the switch.But there is post #23, showing things are a little more complex.

TobiSGD 02-13-2013 09:17 PM

If you want to let the machines connect with each other you have to know the IPs for those machines. So you either have to tell the router that the specific machines always get the same IPs from its DHCP server or you use static IPs for those machines.
In my network (about 16 machines) I use a mixed approach, the Windows machines of my friends get their IPs from the DHCP server of the router, since they don't have the need to let their machines communicate (except with the file-server). My machines (all Linux) have static IPs.
I don't use aliases or something similar, just plain static IPs, set up with NetworkManager on the Slackware systems and /etc/network/interfaces on the CLI-only Debian machine.

stf92 02-13-2013 09:23 PM

Quote:

Originally Posted by TobiSGD (Post 4891205)
If you want to let the machines connect with each other you have to know the IPs for those machines. So you either have to tell the router that the specific machines always get the same IPs from its DHCP server or you use static IPs for those machines.
In my network (about 16 machines) I use a mixed approach, the Windows machines of my friends get their IPs from the DHCP server of the router, since they don't have the need to let their machines communicate (except with the file-server). My machines (all Linux) have static IPs.
I don't use aliases or something similar, just plain static IPs, set up with NetworkManager on the Slackware systems and /etc/network/interfaces on the CLI-only Debian machine.

OK. I use (or my ISP uses) DHCP. But the ISP only provides dynamic IPs. Can dynamic IPs work in my case?

stf92 02-13-2013 09:26 PM

I donot want to confuse you so I use another post. The IPs I simply can get them with ifconfig. That's very easy. For instance:
Code:

root@darkstar:~# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 576
        inet 190.244.62.185  netmask 255.255.255.0  broadcast 255.255.255.255
        ether 90:2b:34:b8:78:cf  txqueuelen 1000  (Ethernet)
        RX packets 892142  bytes 68344919 (65.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 27268  bytes 2892190 (2.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 41  base 0x8000 

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 16436
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 40  bytes 2720 (2.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 40  bytes 2720 (2.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

The IP for machine A is then 190.244.62.185. Now if, for intance, I reset the modem, I can get another IP.

fbobraga 02-13-2013 11:28 PM

Quote:

Originally Posted by TobiSGD (Post 4891143)
So, yes, they are significantly cheaper.

nice to know it, but is a bit late for me (I needed wireless anyway - bought mine in a supermarket WallMart-like nearby my home, in a non-business day :P)

fbobraga 02-13-2013 11:34 PM

http://www.amazon.com/D-Link-DIR-601...ireless+switch R$21.99!

frieza 02-13-2013 11:41 PM

Quote:

Originally Posted by stf92 (Post 4891209)
OK. I use (or my ISP uses) DHCP. But the ISP only provides dynamic IPs. Can dynamic IPs work in my case?

what your ISP does in this instance is irrelevant, as that simply provides your INTERNET facing address

a typical home setup would look something like this
Code:

+-
|        {ISP}
|external  |
|(public    /
|facing IP) |
|      <coax>[modem]<ethernet>
+- (DHCP ASSIGNED)      |{dhcp server, or pass-through dhcp from ISP}
|                      |
|                      |{router obtains dhcp from modem or ISP) 
|                      |
|internal              |                          {dhcp server in router firmware}
|(private network)    <wan>[router (with built-in switch]<sw1><sw2><sw3><sw4><wifi>
|(separate IP address from public network)                |    |    |          ^(wifi signal)
|                                                          |    |    |         
|                                                        [PC1] [PC2][game console]
|
|                                                          (wifi signal)  v      v
|                                                                      [Laptop] [tablet]
+-                                                        {devices obtain dhcp from router}

(yes a typical hous probably wouldn't have THAT many devices, but that's just an illustration)

in this case, the IP your computer(s) has is separate from the one your ISP hands you and the communication between the internet and your devices is handled by the router, this is referred to as a NAT (network address translation)

this also has the added benefit of preventing any unwanted traffic from entering your network (as any inbound traffic has to be explicitly assigned a computer before it is allowed in) (this is called port-forwarding)

granted a significant portion of households are more like
Code:

<ISP>---/---<modem>---[PC]
where the pc would perhaps get it's IP from either the modem or the ISP directly, but the trend is moving more and more towards the above as people have more than one internet connected device (pcs, tablets, laptops, game consoles, blu-ray players etc...

WiseDraco 02-14-2013 01:39 AM

Quote:

Originally Posted by stf92 (Post 4891053)
Thanks a lot. For the moment I prefer simplicity over effectiveness. So, the hardware conditions are now:


A question: what is, or how do I do an alias of the type eth0:0 192.168.1.1. From the man page for ifconfig, I can do 'ifconfig eth0 <some address>'. Do you mean the alias builtin command?

there is example from my old rc.alias file :)

#!/bin/sh
#setting up IP alias interfaces
echo "Setting 172.16.41.2, 172.16.41.3, 172.16.41.x IP Aliases ..."
/sbin/ifconfig lo 127.0.0.1
/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo

/sbin/ifconfig eth0 up
/sbin/ifconfig eth0 172.16.41.2

echo " up aliases"

/sbin/ifconfig eth0:0 172.16.41.3
/sbin/ifconfig eth0:1 172.16.41.4
/sbin/ifconfig eth0:2 172.16.41.5
/sbin/ifconfig eth0:3 172.16.41.6
/sbin/ifconfig eth0:4 172.16.41.7
/sbin/ifconfig eth0:5 172.16.41.8
/sbin/ifconfig eth0:6 172.16.41.9

/sbin/ifconfig eth0:7 172.16.41.10
/sbin/ifconfig eth0:8 172.16.41.11
/sbin/ifconfig eth0:9 172.16.41.12
/sbin/ifconfig eth0:10 172.16.41.13
/sbin/ifconfig eth0:11 172.16.41.14
/sbin/ifconfig eth0:12 172.16.41.15
/sbin/ifconfig eth0:13 172.16.41.16
/sbin/ifconfig eth0:14 172.16.41.17
/sbin/ifconfig eth0:15 172.16.41.18
/sbin/ifconfig eth0:16 172.16.41.19
/sbin/ifconfig eth0:17 172.16.41.20


if you can do net aliase, you can write string similar this ( for your situation) in /etc/rc.d/rc.local file. after restart it can be done setting aliase.

PS aliases not using "in security reasons" - contrary, configuration with cable modem and local machines in one switch is some insecure way to do all. for security networks must be separated and filtereed throught iptables with correct rules.
aliases is used for assign more than one ip address to one ethernet interface. sometimes it be need...

fbobraga 02-15-2013 09:40 AM

Quote:

Originally Posted by stf92 (Post 4891053)
For the moment I prefer simplicity over effectiveness

A router, instead of a switch, is "dead-simple" to setup: it comes with a step-by-step guide very easy to follow (and cam be a wifi-router, providing a Access Point to any wireless device, like nowadays phones and tablets)

frieza 02-15-2013 10:10 AM

interesting, however i fail to see where interface aliases has ANYTHING to do with the OP's question, the answer is a simple,
modem-router/switch-pc1/2, done
maybe one or both machines need static IP address, but still each machine needs only ONE IP address per machine, interface aliases here would be superfluous.

Quote:

Originally Posted by WiseDraco (Post 4891313)
there is example from my old rc.alias file :)

#!/bin/sh
#setting up IP alias interfaces
echo "Setting 172.16.41.2, 172.16.41.3, 172.16.41.x IP Aliases ..."
/sbin/ifconfig lo 127.0.0.1
/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo

/sbin/ifconfig eth0 up
/sbin/ifconfig eth0 172.16.41.2

echo " up aliases"

/sbin/ifconfig eth0:0 172.16.41.3
/sbin/ifconfig eth0:1 172.16.41.4
/sbin/ifconfig eth0:2 172.16.41.5
/sbin/ifconfig eth0:3 172.16.41.6
/sbin/ifconfig eth0:4 172.16.41.7
/sbin/ifconfig eth0:5 172.16.41.8
/sbin/ifconfig eth0:6 172.16.41.9

/sbin/ifconfig eth0:7 172.16.41.10
/sbin/ifconfig eth0:8 172.16.41.11
/sbin/ifconfig eth0:9 172.16.41.12
/sbin/ifconfig eth0:10 172.16.41.13
/sbin/ifconfig eth0:11 172.16.41.14
/sbin/ifconfig eth0:12 172.16.41.15
/sbin/ifconfig eth0:13 172.16.41.16
/sbin/ifconfig eth0:14 172.16.41.17
/sbin/ifconfig eth0:15 172.16.41.18
/sbin/ifconfig eth0:16 172.16.41.19
/sbin/ifconfig eth0:17 172.16.41.20


if you can do net aliase, you can write string similar this ( for your situation) in /etc/rc.d/rc.local file. after restart it can be done setting aliase.

PS aliases not using "in security reasons" - contrary, configuration with cable modem and local machines in one switch is some insecure way to do all. for security networks must be separated and filtereed throught iptables with correct rules.
aliases is used for assign more than one ip address to one ethernet interface. sometimes it be need...


WiseDraco 02-15-2013 10:34 AM

Quote:

Originally Posted by frieza (Post 4892341)
interesting, however i fail to see where interface aliases has ANYTHING to do with the OP's question, the answer is a simple,
modem-router/switch-pc1/2, done
maybe one or both machines need static IP address, but still each machine needs only ONE IP address per machine, interface aliases here would be superfluous.

and what way then, one of machines can be in the same time get internet via cable modem ( connect to computer via ethernet) and connection to another local computer? without aliases or buying second NIC for that computer?

onebuck 02-15-2013 10:53 AM

Member Response
 
Hi,

For a SOHO LAN you can setup '/etc/host' to help facilitate;
Quote:

excerpt from 'man host'
NAME
host - DNS lookup utility

SYNOPSIS
host [-aCdlnrsTwv] [-c class] [-N ndots] [-R number] [-t type] [-W wait] [-m flag] [-4] [-6] {name} [server]

DESCRIPTION
host is a simple utility for performing DNS lookups. It is normally used to convert names to IP addresses and vice versa. When no arguments or options
are given, host prints a short summary of its command line arguments and options.

name is the domain name that is to be looked up. It can also be a dotted-decimal IPv4 address or a colon-delimited IPv6 address, in which case host
will by default perform a reverse lookup for that address. server is an optional argument which is either the name or IP address of the name server
that host should query instead of the server or servers listed in /etc/resolv.conf.
Don't forget;
Quote:

/etc/host.conf /etc/hosts /etc/hosts.allow /etc/hosts.deny /etc/hosts.equiv /etc/resolv.conf/
Additional helpful info;
You can also look at Network section of Slackware®-Links for some helpful links.

frieza 02-15-2013 11:51 AM

Quote:

Originally Posted by WiseDraco (Post 4892359)
and what way then, one of machines can be in the same time get internet via cable modem ( connect to computer via ethernet) and connection to another local computer? without aliases or buying second NIC for that computer?

think about what you're asking for a moment.

you can't plug more than one device into ONE physical port, no matter how many aliases that port HAS, you need a switch.
a router can hand numbers via DHCP and has a built in switch, which covers BOTH requirements, both machines talk to each other, AT LEAST one has internet.. note the original verbiage was AT LEAST ONE, not ONLY ONE.

anyone who says anything about interface aliases are over-complicating the matter for someone who already admits to being a novice.
the next step would be to learn to flash DD-WRT or openwrt on the router and learn how to use iptables to DENY internet access to the other one, but that's a project perhaps for the future.. get the simplest setup working FIRST, then make it more complicated.

stf92 02-15-2013 12:24 PM

OK. I have just called (not trying to contradict anyone) my technician and he says: with the modem and the switch you can do the following: communicate one computer to the other, with one of them enjoying internet (or even the other one too if I remember well). But the machine with internet must be on all the time. That is, if I turn it off, I can't use the other.

Let that be so. Then I do not need anything else. Every time I enter the room with the computers, I just turn "the one" on, and voila! Now, how to set up the software to do it, is something I do not know yet, but methinks it must be extremely easy.

schneidz 02-15-2013 12:34 PM

Quote:

Originally Posted by stf92 (Post 4892440)
... But the machine with internet must be on all the time. That is, if I turn it off, I can't use the other.
...

that is why people usually buy a cheap low-power wifi-router (so they dont have to keep their expensive pc on 24/7 and burn electricity).

as far as software goes maybe if you post the output of lspci, ifconfig, ifconfig -a ... of the pc sharing the internet connection maybe someone can suggest a method of getting online on both pc's (the link i provided in my first response to this thread details what i did to get my blu-ray player (netflix/ pandora) to work thru my htpc).

frieza 02-15-2013 12:51 PM

Quote:

Originally Posted by stf92 (Post 4892440)
OK. I have just called (not trying to contradict anyone) my technician and he says: with the modem and the switch you can do the following: communicate one computer to the other, with one of them enjoying internet (or even the other one too if I remember well). But the machine with internet must be on all the time. That is, if I turn it off, I can't use the other.

Let that be so. Then I do not need anything else. Every time I enter the room with the computers, I just turn "the one" on, and voila! Now, how to set up the software to do it, is something I do not know yet, but methinks it must be extremely easy.

to be more clear, the little Linksys routers you buy off the shelf are in fact nothing more than heavily customized, purpose built computers, designed to do one task and one only, and that is to provide communication between one network (the computers in your house) and another (the internet in this case), but at their most fundamental they are a computer, the advantage though is they are cheaper, and consume far less power than a PC, and require far less configuration than a general purpose computer as most of the work has been done by the manufacturer of the device.

most home routers are just plug and go and should work sufficiently out of box to satisfy the average home user, with that, you can have BOTH machines plugged into the router

the reason for this being, as the technician said, the modem is
Quote:

Originally Posted by technician
with the modem and the switch you can do the following: communicate one computer to the other, with one of them enjoying internet

enter the router, which i already told you was a computer, it acts as a middle man between the router and your other computers, like a person in a bucket brigade, the computer hands the router the data, which then forwards it on to the modem, which then hands the reply to the router, which is forwarded to the proper computer.

essentially the router talks to the modem and 'hides' the rest of rest of the computers behind insofar as the modem thinks there is only one computer in your house as the modem can only see the router, it can't see past the router.

they talk to each other, and both talk to the internet.
you can have one or both on as long as the router and modem have power you have internet.
simple as that.

stf92 02-15-2013 01:32 PM

1 Attachment(s)
I see two drawbacks to wifi. First it is infrared, and so, very easily blocked by walls, etc. Second, I already bought the switch. If what "the technician said" (see post #43) is true, then the power consumption does not matter, for I am always on computer A. There will be no excess power at all...

OK. You beat me, guys. I choose the router method. Would a Zeppelin 740N (wifi) do?

EDIT: I deleted the (old) second paragraph.

WiseDraco 02-15-2013 01:39 PM

Quote:

Originally Posted by stf92 (Post 4892475)
I see two drawbacks to wifi. First it is infrared, and so, very easily blocked by walls, etc. Second, I already bought the switch. If what "the technician said" (see post #43) is true, then the power consumption does not matter, for I am always on computer A. There will be no excess power at all. OK. This doesn't really belong here.

Two possible outcomes: (a) I stick to the switch and sooner or later I'll learn how to do it (even call the tech). (b) I buy a Zepelin 740N (wifi) and I'll expend less effort. But I'll insist in (a) for a while. So, I'm attaching the output of lspci, ifconfig, ifconfig -a ... of the pc sharing the internet connection.


absolutely wrong. wifi work in 2.4 GHz range
http://en.wikipedia.org/wiki/Wi-Fi
it is some nlocking from walls, especially concrete with steel, but in general, it is not bad technology for internet access point at home.
for share internet to another computer, as i say earlier, you must be use iptables for network address translation. it is not bad thing, if you want a learn yourself small about networking and so on, but in general, i agree, is be better to purchase wifi router. it has be prices from approh 15 - 20 usd...

WiseDraco 02-15-2013 01:42 PM

Quote:

Originally Posted by schneidz (Post 4892445)
that is why people usually buy a cheap low-power wifi-router (so they dont have to keep their expensive pc on 24/7 and burn electricity).

on other side, you may have a linux boh, who already work at your home 24/7 to serves as your local fileserver, handle as your personal mail \ web \ftp\ dns server, and you can it additionally give a firewall role too ;)

schneidz 02-15-2013 01:42 PM

Quote:

Originally Posted by stf92 (Post 4892475)
I see two drawbacks to wifi. First it is infrared, and so, very easily blocked by walls, etc. Second, I already bought the switch. If what "the technician said" (see post #43) is true, then the power consumption does not matter, for I am always on computer A. There will be no excess power at all. OK. This doesn't really belong here.

Two possible outcomes: (a) I stick to the switch and sooner or later I'll learn how to do it (even call the tech). (b) I buy a Zepelin 740N (wifi) and I'll expend less effort. But I'll insist in (a) for a while. So, I'm attaching the output of lspci, ifconfig, ifconfig -a ... of the pc sharing the internet connection.

sorry this thread is very hard to follow (i didnt know you already bought the switch -- then there is no need to use pc-a as a router).
fyi: wifi uses rf.

so you are set up at this point, correct ?
if not all you need to do is plug a cat-5 cable from the internet transceiver to the correct port of the switch (usually colored yellow). then plug a cat-5 cable from the swicth to pc-a and pc-b. then plug in the switch into a wall outlet.

not sure what software you needed...

frieza 02-15-2013 01:44 PM

Quote:

Originally Posted by stf92 (Post 4892475)
I see two drawbacks to wifi. First it is infrared, and so, very easily blocked by walls, etc. Second, I already bought the switch. If what "the technician said" (see post #43) is true, then the power consumption does not matter, for I am always on computer A. There will be no excess power at all. OK. This doesn't really belong here.

Two possible outcomes: (a) I stick to the switch and sooner or later I'll learn how to do it (even call the tech). (b) I buy a Zepelin 740N (wifi) and I'll expend less effort. But I'll insist in (a) for a while. So, I'm attaching the output of lspci, ifconfig, ifconfig -a ... of the pc sharing the internet connection.

it's becoming clear to me that this so called 'technician' doesn't know WHAT he/she is talking about

Quote:

First it is infrared, and so, very easily blocked by walls
totally wrong, WIFI is a MICROWAVE radio,(2.4GHz, the same frequency as some cordless phones), and is NOT easily blocked by walls. what WiFi IS easily blocked by is METAL objects in walls.


second of all, wi-fi is OPTIONAL unless you have a LAPTOP, TABLET or other portable device, otherwise two PCs in close proximity should be attached to a WIRED router such as a Linksys BEFSR41, which has a 4 port switch, plus a wan port (technically a 5 port switch , with 4 lan ports and the 5th port segmented off as a wan port)

doing it with just the modem and a switch might work but it's wrong.


All times are GMT -5. The time now is 03:38 AM.