I've always used dhcp to take the correct values of the net. Now, i've a router, and i'd like to have a internal static IP address. But i have to make the same with another PC with XP.
For XP, i need the IP adress of the PC, the subnetmask and the default gateway. For my PC, with arch, the rc.conf lines needs:
The IP of my PC, the netmask, broadcast, and, in another line, the gateway.
Now, what i think is correct:
- The IP of each PC, can be obtained by ifconfig (Linux) and ipconfig (XP). I think this is correct ;-)
- The subnetmask (XP) is the same that netmask (Linux), and, the same that in the router web interface is called "subnet mask": 255.255.255.0
- The gateway and "default gateway" is the IP of the router (internal). The IP which i use to connect to the router web interface: 192.168.2.1
Now, what i'm in doubt:
What is the broadcast? why in arch is needed, and in XP no? Connecting to the router, there is no information about it. I can know it with a ifconfig in linux, but in XP "ipconfig /all" doesn't show it.
In this particular case, your broadcast address is 192.168.2.255, and in general, for subnet x.y.z.n/255.255.255.0, the broadcast address is x.y.z.255.
The default example in /etc/rc.conf illustrates this very well, IMO.
All gone ok. Now both PC's have static IP (internal).