# How to setup a development network for the ENC28J60 on XP?

I'm working on an ethernet connection with the ENC28J60. During development, I'd like to connect the chip to my computer directly (i.e. not via a gateway). This computer is running XP, has a primary network interface over WLAN (local IP 192.168.1.69 (DHCP assigned), default gateway 192.168.1.254, subnet mask 255.255.255.0) and I do not use the ethernet for other connections.

How should I setup the network? Normally, you'd use the default settings with DHCP to get an IP address assigned, however now, I think I have to set this up manually. Is this correct? How should I setup the ethernet configuration on my computer?

The ENC28J60 and its PIC's configuration use the IP address 192.168.0.140 for themselves, and 192.168.0.1 for the default gateway.

• I'm not sure if this is the correct / best place to ask this. Perhaps Super User or Server Fault are more appropriate, but I'm not familiar with those sites. Are they more appropiate? – user17592 Apr 21 '13 at 11:19
• What are the IP-address details for your wlan o your PC? – jippie Apr 21 '13 at 12:16
• @jippie local: 192.168.1.69 (DHCP assigned), default gateway: 192.168.1.254, subnet mask: 255.255.255.0. I added them to the question – user17592 Apr 21 '13 at 12:17
• Ah, OK, so 192.168.0.x should work on the wired interface. – jippie Apr 21 '13 at 12:20
• You might find this interesting software: wireshark.org It is commonly called a sniffer and can spit out all data/packets it receives/sends on one or more interfaces. You want to filter on your wired interface. Mind you that many institutions like universities have this kind of software on their black list, you are not allowed to have it installed. This is because you can often easily find usernames/passwords and other personal infomation on the network. – jippie Apr 21 '13 at 12:22

The gateway is a just a default network node used to find addresses not in the routing table. Wikipedia has quite a good article that explains it here:

Default gateway

But in your case for a start I'd set the computer to have a fixed IP address of 192.168.0.1 which should work, later you can use 'route print' to see how XP sets up the routing table for that device, but it may not appear depending on other settings. You can setup mutiple IP addresses per adapter so your 'other stuff' like the Internet will still work.

• The gateway has nothing to do with routing tables. The gateway is where a node will send a packet when the destination IP address is not on its local net. – Olin Lathrop Apr 21 '13 at 12:40

What you want to do is set up static addresses. The address assigned to your PC when it is connected to your LAN is irrellevant. You are trying to set up your own LAN consisting of only the PC and the PIC, if I understand your question correctly.

Pick something, like 192.168.0.xxx addresses. In that case, you can set up your net like this:

Network mask: 255.255.255.0
router:       192.168.0.1
PC:           192.168.0.2
PIC:          192.168.0.3

Actually the router doesn't matter because there is no router, but the PC software will probably make you fill in something. You can make the three addresses anything from 1 to 254 within the same network. It doesn't matter as long as they are unique.

You should also use a crossover cable if you are connecting two end devices directly to each other. Some device can auto-flip, so this might not be necessary.