Staticly Assign IP
Where in Debian can I staticly set an IP? I did a search and the board and found /etc/network/interface and there I have this text file...
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # This is a list of hotpluggable network interfaces. # They will be activated automatically by the hotplug subsystem. mapping eth0 script grep map eth0 # The primary network interface allow-hotplug eth0 iface eth0 inet dhcp I am not sure how to add my static IP, gateway and mask. |
Try this in your /etc/network/interfaces. This must help
Code:
auto eth0 |
Thanks makes sense however my info is as follows but I am not sure what my network and broadcast Ip would be...
Code:
auto eth0 |
You can simply omit the network and broadcast lines. Most likely you won't need them.
|
If you leave them, I believe yours should read
Quote:
|
I don't really understand this issue, so maybe I'm way off base, but my router allows me to match the MAC address of any computer connected to it with whatever IP address I want that computer to have. Isn't that the same thing?
For that matter, I've noticed that without me doing anything, the router always assigns each PC the same IP whenever it connects even if I don't specify that it should. |
Sort of. What your router is allowing is called "static DHCP". You enter the MAC and assign an IP. But all the clients are still using DHCP (i.e. they're polling the router asking for an address).
Right now it might appear that all the machines are always getting the same address. But if you turned all the machines off until the lease expired (mine defaults to 24 hours) and then started the computers up in a different order, the machines would get different IP's because they're assigned by the router on a first come first serve basis (unless you're using static dhcp). Now it's also possible to make the client static. That's what is happening here. This is useful if the router doesn't have static dhcp capability, but you always want you machine at the same IP (for example if you're forwarding ports to a server on your internal network and don't want the routing table messed up if you reboot and it gets assigned a different address). This is mostly a problem on large networks because if you have hundreds of machines, some of them being shut off at different times (like over a weekend) and then turned on in a different order, you could mess up your routing table if your server went down for the weekend also... |
I am not sure that the network address and broadcast address is correct? Looking at the subnet mask of 255.255.0.0, it seems he would want a network of 10.1.0.0 and a broadcast of 10.1.0.255. He is using a class B subnet with a class A private address, that is where I got my calculations. Now I am by no way a TCP guru, so if I'm off base, please let me know because I am always trying to learn more, but this one seemed pretty straight forward.
I also think Dead Parrot is correct, I don't think they are even required in the interfaces file as those are normally used for routers. However, if they are in there, they need to be correct. :study: |
All times are GMT -5. The time now is 03:46 PM. |