Local network?


 
Thread Tools Search this Thread
Special Forums IP Networking Local network?
# 1  
Old 06-07-2010
Power Local network?

I have two PCs, witch have Linux Ubuntu.
I want to connect those computers by a local network, but I know right anything about the network.

I have a modem (not router) and a router that i don't use.
The desktop pc have 2 network cards. (eth0 eth1). The modem is on eth1.


Anyone help me! Thanks in advance for any reply!! Smilie
# 2  
Old 06-07-2010
Assign a different IP address to eth0 on each of the machines, say 192.168.1.2 and 192.168.1.3
Connect the two network cards together with a cross over ethernet cable, or, if your router has multiple LAN ports, plug each computer network card into the LAN ports on the router with a standard ethernet cable.
This User Gave Thanks to jgt For This Post:
# 3  
Old 06-07-2010
THANKS! Smilie

Pc 1:
Code:
ifconfig eth0 192.168.1.2

eth1 connected to the modem

Pc 2: (only one Ethernet port)
Code:
ifconfig eth0 192.168.1.3

So; if i do a
Code:
ping 192.168.1.3

on the first PC, it should work.

Thanks again!! Smilie

PS: there are differences between the cross-over Ethernet cable solution and the router solution? What is the fastest? Thanks!

PPS: On the pc2 should I see the Internet?
# 4  
Old 06-07-2010
Quote:
Originally Posted by mghis
PS: there are differences between the cross-over Ethernet cable solution and the router solution?
Not really if you're configuring your network statically.
Quote:
What is the fastest? Thanks!
No effective difference.
Quote:
PPS: On the pc2 should I see the Internet?
Nope. You asked about a local area network, this will let the two communicate with no internet access and does no routing.

If you just want to share your internet connection, a residential wireless router will do the job with less bother than trying to make one computer into a router. Plus you won't need to have one computer on 24/7.
This User Gave Thanks to Corona688 For This Post:
# 5  
Old 08-24-2010
Mghis, if you want to share your Internet, you are need those commands
echo 1 >/proc/sys/net/ipv4/ip_forward - allow forward
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.0.0/24 -j MASQUERADE

eth0 - Internet interface
192.168.0.0/24 - your local network
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Red Hat

Local Network Speed

Dear All, I have an intel NUC running CentOS 7 and physically connected to my Netgear CBVG834G router. They both have Gigabit Ethernet cards and supposedly a top notch network cable connecting the two devices. But when I run ethtool the connection is only running at 100Mbit/s What can I do... (3 Replies)
Discussion started by: freddie50
3 Replies

2. Shell Programming and Scripting

Copy file from local network and add it to MYSQL

Hello, i need some help. I have a Debian machine in network, which is a web server. I need to copy every day files from local network to MySQL table. Now it is done manually and i am just adding them from web panel (backend) and saving it's binary, extension and etc. Can i automaticly do this... (2 Replies)
Discussion started by: Dyrem
2 Replies

3. UNIX for Dummies Questions & Answers

Making webpy framework accessible from outside the local network

I am using ubuntu 12.04.03. I have some basic experience with webpy and I had it working for my LAN just by following the tutorial. The framework needs to be able to be used from outside the local network. I have difficulty seeing how to make the framework accessible from outside the lan. I tried... (10 Replies)
Discussion started by: frad
10 Replies

4. Shell Programming and Scripting

Print all Host on local network

Hello guys, I would like to develop a script which takes a host name as argument and displays a message whether the host is on the local network or not. How can I accomplish that? Is there a file or command that I can use to list all host on the local network? :confused: (4 Replies)
Discussion started by: Learn4Life
4 Replies

5. Linux

How to setup local IPv6 network

Hello everyone, I have question how i can setup local ipv6 network ? Here is my network: I have main ipv6 gw and server X for example that is connected with my main ipv6 gw and all ping6, traceroute6 is working. My local network is connected to one switch and main ipv4 gateway is that server X... (2 Replies)
Discussion started by: gild
2 Replies

6. AIX

Do I need to configure my local windows to FTP files from local windows to a UNIX AIX server?

Hi Friends, I have this script for ftping files from AIX server to local windows xp. #!/bin/sh HOST='localsystem.net' USER='myid_onlocal' PASSWD='mypwd_onlocal' FILE='file.txt' ##This is a file on server(AIX) ftp -n $HOST <<END_SCRIPT quote USER $USER quote PASS $PASSWD put $FILE... (1 Reply)
Discussion started by: rajsharma
1 Replies

7. IP Networking

ssh server is attachable from local network not from another network

hello i have a ubuntu ssh server that i can acess from any of my comnputers but only if they are on the same wireless network as the server. i tested trhis my tehtehring my samsung blackjack to my windows partition and installing openssh to windows it works when windows is on the wireless but no... (1 Reply)
Discussion started by: old noob
1 Replies

8. Gentoo

Install over local network

hello all, anyone can point to some good basic tutorial/howto (independent, not specific to any distro) about how to install linux over LAN from one PC with working linux distro to another PC without cdrom and floppy-just over LAN? Thanks in advance ! (2 Replies)
Discussion started by: vampirex
2 Replies

9. IP Networking

can i force connecting to local web server via internet network ?

Hello all this is general question , if i have web server installed in my local pc and i have client that connecting to that web server can i force it always to go via the internet network ? the reason im asking is .. that im noticed when i close my internet connection i still can connect to my... (2 Replies)
Discussion started by: umen
2 Replies
Login or Register to Ask a Question