LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 02-15-2013, 04:14 PM   #61
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,096

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369

unless you placed them in a script, then restarting the network should do

Code:
#/etc/init.d/network restart

Code:
#/etc/init.d/networking restart

Code:
# service network restart

Code:
# service networking restart
or something like that
(no you don't have to run ALL of those lines, just one of them, it's just that the syntax varies based on which distribution of Linux you are using.
if you're using windows it would be
Code:
c:\> ipconfig /release
c:\> ipconfig /renew
most distributions ship out of box (read, are pre-configured on install) to use DHCP, and most routers out of box are configured to serve DHCP

failing that (unless the commands are in one of your startup scripts), than simply rebooting will do the trick.

Last edited by frieza; 02-15-2013 at 04:15 PM.
 
1 members found this post helpful.
Old 02-15-2013, 04:29 PM   #62
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,125

Original Poster
Rep: Reputation: 46
Well, thank you very much.

Last edited by stf92; 02-15-2013 at 04:32 PM.
 
Old 02-15-2013, 04:37 PM   #63
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,125

Original Poster
Rep: Reputation: 46
I would like to know how many IPs should I handle for the whole LAN. Suppose 192.168.1.1 is one of them. This would be associated with the MAC on, say, machine A. Then I need, say, 192.168.1.2 for machine B. OK. Now, how many other IPs should I know of?
 
Old 02-15-2013, 04:44 PM   #64
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,096

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
with 2 computers, a router and a modem, there would be about 5 IPs, but only 3 need to keep track of

the router's Internal IP address (used for accessing the router's configuration page, this is usually 192.168.1.1 by convention
then the IPs of the computers which would be 192.168.1.2 and 192.168.1.3 (or by default 192.168.1.100 and 192.168.1.101 on alot of routers), though you can statically assign them in /etc/network/interfaces (just google that file for the syntax)

some routers can assign IPs on a per mac address, but those are usually the more expensive ones.

the other addresses would be the IP of the router's WAN port and the IP address of the cable modem, (and your public ip which can be found by googling what's my IP), but unless you are running an internet facing server you don't need to know those.

Last edited by frieza; 02-15-2013 at 04:45 PM.
 
Old 02-15-2013, 05:16 PM   #65
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,125

Original Poster
Rep: Reputation: 46
Quote:
Originally Posted by frieza View Post
with 2 computers, a router and a modem, there would be about 5 IPs, but only 3 need to keep track of ...
Well, the public IP I can know it with ifconfig. In fact, I did the physical connection and booted A and B. Then run ifconfig in A and saw the public IP. Then the same in B and the same: I had the public IP! ifconfig shows, for A:

inet 192.168.0.100 netmask 255.255.255.0 broadcast 192.168.0.255


For B:
inet 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255

Of course the configuration is now totally symetric with respect to A, B. I presume the public IP is the broadcast above, and the default A computer IP is 192.168.0.100. Hence that of B is 192.168.0.2. Internet is OK on A, and B.

Next I did 'ping 192.168.0.2' from A and 'ping 192.168.0.100' from B: success. Can I access A's files from B (or viseversa)?

Last edited by stf92; 02-15-2013 at 05:18 PM.
 
Old 02-15-2013, 05:27 PM   #66
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 2,150

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
It is a router only in that it is a network device between an internal network and the cable connection.

The device has only one connection, and that one connection must go to a switch, hub, or computer.

A switch is nice when you have three or more computers attached - you can make independent sessions between two of the computers without impacting the throughput of the third (presumably connecting to a remote system). A hub is simpler, but traffic on any impacts all... And switches have become cheap enough to push hubs out. Operationally, they are equivalent.

Many cable modems include a switch, but for a higher charge...

Switches also tend to have a processing unit on board that provide DHCP capability to simplify host configuration. This also means that SOMETIMES you have to connect to the switch to reset/configure for your own use. This is also needed to set your own password to prevent someone else from taking over your switch. Usually (if the switch is separate from the cable modem as in this case) you must configure the switch properly to communicate with the cable modem.

The usual case is that the cable modem will get its IP number from the cable company. The single internal network is likely configured to use 192.168.0.1 for its IP number (other values are also possible). The switch usually has to talk to the cable modem, and unless the cable modem provides DHCP (usually), then the switch must be configured to use a 192.168.0.2-254 address (this also assumes the switch knows how to use DHCP for the wan connection to get an IP number from the cable modem...).

If the cable modem is using 192.168.0.x network to talk to the switch, then the switch cannot use 192.168.0.x network to talk to computers connected to the switch. Usually the result is to use 192.168.1.x for the internal network (mine does this, even though the modem contains a 4 port switch + wireless).
 
Old 02-15-2013, 05:43 PM   #67
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,125

Original Poster
Rep: Reputation: 46
Thanks jpollard. What I would like to know is if I can now do as if I were the owner of a cibercafe and, from my machine, i can see all the other machines. In windows, for instance, there would be drives D:, E:, F:, ... in the server, representing the clients disks. I presume I would have to know more than I know to do this. NFS can help? More radically. Can I login from B into A? rlogin?
 
Old 02-15-2013, 06:03 PM   #68
schneidz
Senior Member
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 3,958

Rep: Reputation: 606Reputation: 606Reputation: 606Reputation: 606Reputation: 606Reputation: 606
Quote:
Originally Posted by stf92 View Post
...
Next I did 'ping 192.168.0.2' from A and 'ping 192.168.0.100' from B: success. Can I access A's files from B (or viseversa)?
i recommend using sshfs.
 
Old 02-15-2013, 06:56 PM   #69
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,125

Original Poster
Rep: Reputation: 46
I'll try rlogin. I have been reading the manual and see that you must supply 'host' as an argument. I.e., the minimal syntax is 'rlogin <host name>'. Now, I've found this is the username people in the other machine (machine B) uses to just login (let's call it selui). And let B have IP 192.168.02. How do I associate this IP with hostname (i.e., username) selui?
 
Old 02-15-2013, 07:03 PM   #70
whizje
Member
 
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 583

Rep: Reputation: 129Reputation: 129
Code:
username@hostname or username@ip
 
Old 02-15-2013, 07:15 PM   #71
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,125

Original Poster
Rep: Reputation: 46
I consistently get 'Unknown host'. Should I not modify /etc/hosts?
 
Old 02-15-2013, 07:23 PM   #72
whizje
Member
 
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 583

Rep: Reputation: 129Reputation: 129
If you have not modified /etc/host you can use the usename@ip but the other computer must allow access.
 
Old 02-15-2013, 07:30 PM   #73
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,125

Original Poster
Rep: Reputation: 46
I used that form. A has 192.168.0.100, B has 192.168.0.2. In B I issued 'rlogin sem@192.168.0.100', where sem is a user in A, and I got 'Unknown host'.

EDIT: if only rlogin had a good tutorial but I don't seem to find one.
 
Old 02-15-2013, 08:35 PM   #74
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,125

Original Poster
Rep: Reputation: 46
Code:
Polling for DHCP server on interface eth0:
dhcpcd[1505]: version 5.5.6 starting
dhcpcd[1505]: all: not configured to accept IPv6 RAs
dhcpcd[1505]: eth0: waiting for carrier
dhcpcd[1505]: eth0: carrier acquired
dhcpcd[1505]: eth0: broadcasting for a lease
dhcpcd[1505]: eth0: offered 192.168.0.100 from 192.168.0.1
dhcpcd[1505]: eth0: acknowledged 192.168.0.100 from 192.168.0.1
dhcpcd[1505]: eth0: checking for 192.168.0.100
dhcpcd[1505]: timed out
dhcpcd[1505]: allowing 8 seconds for IPv4LL timeout
dhcpcd[1505]: eth0: leased 192.168.0.100 for 7200 seconds
dhcpcd[1505]: forked to background, child pid 1552
Starting Internet super-server daemon:  /usr/sbin/inetd
This exactly matches frieza's remarks. The whole process is made perfectly clear by the block code!
 
Old 02-15-2013, 09:02 PM   #75
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,096

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Quote:
Originally Posted by stf92 View Post
I used that form. A has 192.168.0.100, B has 192.168.0.2. In B I issued 'rlogin sem@192.168.0.100', where sem is a user in A, and I got 'Unknown host'.

EDIT: if only rlogin had a good tutorial but I don't seem to find one.
you probably won't find many rlogin tutorials anymore as it has been obsolete for some time now and has been replaced by SSH (yes you can still use rlogin but SSH is more flexible and is much easier to use).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to connect ubuntu computers into LAN jennifer.ayag Linux - Networking 3 12-04-2008 06:58 AM
list computers in LAN Lotharster Linux - Newbie 2 01-08-2006 11:10 AM
No Internet but LAN and VPN connect LAN work fine??? xavior Suse/Novell 7 11-09-2005 01:14 PM
KDE Lan Browser doesn't display available LAN computers dance2die Linux - Newbie 2 01-16-2005 08:14 PM
I cannot see my own server from computers on my LAN proroer Linux - Networking 2 09-07-2003 11:33 PM


All times are GMT -5. The time now is 04:46 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration