# PC 2 PC with ethernet wire



## graudeejs (Dec 15, 2008)

This question is bothering me for long time.
Is it (i believe it is) possible to connect my FreeBSD box to Windows Box using simple Ethernet wire directly

Can someone give me a tip, how can i do this (link, explanation etc would be helpful)


----------



## anemos (Dec 15, 2008)

Your simple question scares me.  D) You just put the wire to both machines, set two static IP's  (i.e. ifconfig), if none of the machines is a DHCP server, a netmask and that's it. You can ping each other.


----------



## bsddaemon (Dec 15, 2008)

What problem did you encounter, killasmurf86?

I havent been touching networking gears for months, but I just set up a testing LAN for you, and it works without a hitch.

So here is a brief summary what I have done:

- Make sure the FreeBSD network interface is up and assign it IP and netmask:



> # ifconfig em0 inet 192.168.1.1 netmask 255.255.255.0



- Now just for fun, I set up a web server with *nc*. I save this thread as a default page, and name it freebsd_forum.html. The web server is listening on port 8000 



> $ nc -l 8000 < freebsd_forum.html



- Now plug the cable, with most modem network cards, cross over and straigh through cable will work. I uses straigh through one

- Now in the Windows box, enable the network card, manually assign IP and netmask. For testing sake, I give it 192.168.1.2.

- In Windows box, open web browser (or telnet client), go to:


```
http://192.168.1.1:8000
```

- Immediatelly, the terminal spilled some lines from my FreeBSD box. Obviously, it is html request from Windows box. I cant post those line as the forum doesnt accept it. It is standard html request anyway

- Here is the screen dump from Windows box after retrieving the response.







I can see your thread now


----------



## rambetter (Dec 15, 2008)

Unless both machines have a gigabit ethernet adapter and your ethernet cable is capable of gigabit speeds, you will need a crossover cable instead of a normal one.


----------



## bsddaemon (Dec 15, 2008)

rambetter said:
			
		

> Unless both machines have a gigabit ethernet adapter and your ethernet cable is capable of gigabit speeds, you will need a crossover cable instead of a normal one.



Sorry but it is not entirely true. Back in the day, i was a hardware (mostly networking gears) mania guy. I had been testing LAN connection between 2 PCs with:

- Normal network cards (100Mb)
- Usb network cards (100Mb)
- Normal CAT-5 (not CAT-5e) cable
- Normal, not gigabit switch.

And they can talk to each others without any problem.

IIRC, if the network cards support *something* plus (+), then they can connect via a normal straigh-through cable.


----------



## graudeejs (Dec 15, 2008)

bsddaemon < i fallowed your post..
i can ping BSD box from windows, but can't ping win box from bsd box


----------



## bsddaemon (Dec 15, 2008)

You can disable Windows firewall or there is an option in the firewall setting to enable ICMP responses


----------



## graudeejs (Dec 15, 2008)

Fixed, killed dhcp client, and everything works...
Thanks, bsddaemon


----------



## anemos (Dec 16, 2008)

bsddaemon said:
			
		

> IIRC, if the network cards support *something* plus (+), then they can connect via a normal straigh-through cable.



This is what automatic-MDIX is and it can be found on some 100mb devices as well.


----------

