LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-18-2003, 05:21 AM   #1
neon
Member
 
Registered: Aug 2003
Location: Thailand
Distribution: Fedora 3
Posts: 56

Rep: Reputation: 15
creating a network ??


i have 2 computers connected through a cross wire, 1 is running XP and one is running Red Hat 7.2
how do i create a connection between these two computers?

when i try to ping a computer within my network, it says:

ping 1.2.3.4
ect: Network is unreachable

wat should i do now?
 
Old 08-18-2003, 06:15 AM   #2
Lazarus
Member
 
Registered: Dec 2001
Location: Kent in UK
Distribution: Fedora 2
Posts: 170

Rep: Reputation: 30
On your xp box try ipconfig. should give you the ip address of the box etc. If not your NIC,driver may be faulty/set up wrong. Sorry im not an xp expert.
On Linux type ifconfig eth0 this should give lots of info including ip address.
If both OK then look to your cable. Must be crossover if you are using no hub.
If all above ok xp or linux firewall may be problem. must allow ping for a start.
 
Old 08-21-2003, 04:53 AM   #3
neon
Member
 
Registered: Aug 2003
Location: Thailand
Distribution: Fedora 3
Posts: 56

Original Poster
Rep: Reputation: 15
How do i know if both are ok? what do you mean?
I have a dual OS on one machine.. Linux and XP.. XP connection works fine, but when i try to ping with linux.. doesn't seem to work.. please help.. i'm so lost...
 
Old 08-21-2003, 05:07 AM   #4
Beuzekom
Member
 
Registered: Aug 2003
Location: Netherlands
Distribution: Redhat 9.0
Posts: 38

Rep: Reputation: 15
Did you define a network connection in XP?

Settings -> network connections

If configured - Click on properties and check the TCP/IP setting

How is the IP address obtained (automatically via DHCP or manually set?)

Jamie
 
Old 08-21-2003, 05:13 AM   #5
neon
Member
 
Registered: Aug 2003
Location: Thailand
Distribution: Fedora 3
Posts: 56

Original Poster
Rep: Reputation: 15
yeah, it is configured to connect to another XP.. but i don't know about connecting to Linux though..

automatically.. yeah, DHCP
can i specify my own ip? if i want to do that are there any restrictions?
 
Old 08-21-2003, 05:17 AM   #6
Beuzekom
Member
 
Registered: Aug 2003
Location: Netherlands
Distribution: Redhat 9.0
Posts: 38

Rep: Reputation: 15
If the link between the 2 computer is separated from the internet you can configure a private network.

In Linux you can easily change the IP setting of each EN card

E.g.
PC (XP) 10.0.0.2 (subnet 255.0.0.0)
PC(Linux) 10.0.0.3 (subnet 255.0.0.0)

If you set the above settings you should be able to ping each other.
 
Old 08-21-2003, 05:22 AM   #7
Lazarus
Member
 
Registered: Dec 2001
Location: Kent in UK
Distribution: Fedora 2
Posts: 170

Rep: Reputation: 30
You can set your own ip in linux for example

ifconfig eth0 192.168.1.2

It will revert to the previous setting on next reboot.

In XP it should also be quite easy
 
Old 08-21-2003, 05:23 AM   #8
kev82
Senior Member
 
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 50
there are restrictions to ip, the ones that will never be used on the net(ie for internal machines are)

192.168.*.*
10.*.*.*
and another one, starts 172 but forgotten the rest

so set one of the machines to 192.168.0.1 and the other to 192.168.0.2, subnet mask 255.255.255.0

if you still cant ping then its a firewall issue if the two xp machines can ping each other then its on the linux side, try dropping the firewall and pinging, iptables -P INPUT ACCEPT. to put the firewall back iptables -P INPUT DROP

Last edited by kev82; 08-21-2003 at 05:24 AM.
 
Old 08-21-2003, 05:31 AM   #9
neon
Member
 
Registered: Aug 2003
Location: Thailand
Distribution: Fedora 3
Posts: 56

Original Poster
Rep: Reputation: 15
why does it have to start with 192.168.*.* all the time?
currently, the xp machine is set to
169.254.203.113 by DHCP

i'm not even sure how to check the linux ip??

can i check the XP's ip from the linux machine?
 
Old 08-21-2003, 06:02 AM   #10
Beuzekom
Member
 
Registered: Aug 2003
Location: Netherlands
Distribution: Redhat 9.0
Posts: 38

Rep: Reputation: 15
The Internet Assigned Numbers Authority (IANA) has reserved the following three blocks of the IP address space for private internets:


10.0.0.0 - 10.255.255.255 (10/8 prefix)
172.16.0.0 - 172.31.255.255 (172.16/12 prefix)
192.168.0.0 - 192.168.255.255 (192.168/16 prefix)

Your 169 address is probably give to you by your ISP. Check (in DOS) with ipconfig /all.

Could you please send your network config .... number of ethernet cards and connecion
 
Old 08-21-2003, 06:03 AM   #11
kev82
Senior Member
 
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 50
that 169 address is the one set by 2k/xp when it cant negotiate a dhcp address, to get the xp computer working with linux it will be easier for now to choose a static address. if your not on the internet then you can choose any address you want apart from a few reserved ones but if you were on the internet, then say you chose the address 129.234.4.13(dur.ac.uk backup nameserver) some traffic destined for this nameserver could find its way to you instead, which isnt really a good thing. so when ipv4 was released they came up with some addresses that could never be used on the internet, they are as i stated above so if you use any of them you are in no danger of interrupting anyone elses network.

ive never used xp but hopefully its similar to 2k, you want to go to control panel->network connections->local area network, this should bring up a dialog for you to choose ip and dns, choose ip manually and enter 192.168.0.1, for the subnet mask you want 255.255.255.0. as for default gateway and dns just leave it blank.

now from the xp machine you can test youve done this right if you try to ping 192.168.0.1 you should get replies.

now go to the linux machine, there might be some silly gui tool to do this but i dont know anything about those, get a root shell and type

ifconfig eth0 down
ifconfig eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255

you should now from the linux machine be able to ping 192.168.0.2, see if you can get them to ping each other, if not then its a firewall issue, you can take down the linux firewall as i showed above iptables -P INPUT ACCEPT, and to bring it back iptables -P INPUT DROP
 
Old 08-22-2003, 10:01 AM   #12
neon
Member
 
Registered: Aug 2003
Location: Thailand
Distribution: Fedora 3
Posts: 56

Original Poster
Rep: Reputation: 15
>>ifconfig eth0 down
>>ifconfig eth0 192.168.0.2 netmask 255.255.255.0 broadcast >>192.168.0.255

thanks.. i'll go try it out.
just wondering..what's the difference between all these addresses in that line you gave?
ip?
net masK?
broadcast?
 
Old 08-22-2003, 10:28 AM   #13
kev82
Senior Member
 
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 50
this should give you a rough idea what the different numbers are, im sure theres lots of info on the net if you google for ipv4
 
Old 08-22-2003, 10:46 AM   #14
neon
Member
 
Registered: Aug 2003
Location: Thailand
Distribution: Fedora 3
Posts: 56

Original Poster
Rep: Reputation: 15
hey, thanks!
 
Old 08-25-2003, 04:46 AM   #15
neon
Member
 
Registered: Aug 2003
Location: Thailand
Distribution: Fedora 3
Posts: 56

Original Poster
Rep: Reputation: 15
hey! again! i have solved the pinging problem!
now how do i actually see other computers on my network? how can i view files and stuff?
 
  


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
Need help creating a shared folder for the network dragon_fire04 Linux - Networking 7 09-03-2005 02:52 PM
Creating a network blkmage Linux - Networking 3 05-15-2005 11:11 AM
Creating different network profiles for a laptop basileus Debian 1 02-16-2005 04:06 PM
creating X.25 network how? mchitrakar Linux - Networking 0 05-12-2004 04:37 AM
Creating a Network without having a router Nukem Linux - General 5 12-30-2003 07:24 PM


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

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration