LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   creating a network ?? (https://www.linuxquestions.org/questions/linux-newbie-8/creating-a-network-83051/)

neon 08-18-2003 04:21 AM

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?

Lazarus 08-18-2003 05:15 AM

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.

neon 08-21-2003 03:53 AM

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...

Beuzekom 08-21-2003 04:07 AM

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

neon 08-21-2003 04:13 AM

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?

Beuzekom 08-21-2003 04:17 AM

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.

Lazarus 08-21-2003 04:22 AM

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

kev82 08-21-2003 04:23 AM

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

neon 08-21-2003 04:31 AM

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?

Beuzekom 08-21-2003 05:02 AM

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

kev82 08-21-2003 05:03 AM

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

neon 08-22-2003 09:01 AM

>>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?

kev82 08-22-2003 09:28 AM

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

neon 08-22-2003 09:46 AM

hey, thanks!

neon 08-25-2003 03:46 AM

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?


All times are GMT -5. The time now is 07:08 PM.