Setting up Static IP with ubuntu server

Don´t be shy, Linux is fun! =)
Post Reply
User avatar
visser
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 472
Joined: 03 Apr 2007, 16:00
17
Location: online
Contact:

Setting up Static IP with ubuntu server

Post by visser »

Hey all, im really close to getting my ubuntu server to have a static ip. theres just a couple of errors that i cant really understand.

im following the guide from http://www.howtogeek.com/howto/ubuntu/c ... p-address/


so im editing the first file and have to create somethign like:
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

i know the default gateway. i also know the netmask.
but....
adress is the ip that i want for the server?
network?
broadcast?

help me please! lol

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Post by ayu »

Yes, address is the address of the computer in question, as in the computer where you are editing the file ^^

a netmask is a mask that is used to divide computers into subnets and specify the available hosts for every subnet

255.255.255.0
255.255.0.0
255.0.0.0

are default netmasks for the different IP classes.

"network" is the networks ID, and the "first" address is always the ID, while the last one (192.168.1.255) is the broadcast address, and on the broadcast address information is sent to all computers, for example if one computer is looking for a translation for a computer name, it can broadcast for it and get the answer from the machine that is owning the name. Or if a computer needs an address from a DHCP server and it doesn't have the DHCP servers address, it can boradcast and ask any DHCP server for a new address. The first one to answer is also the one that will give the computer a lease for an address.

EDIT: I might as well give you an example... =P

If you have a network where for example your router has the address "192.168.0.1" then that is the first available address in the network, since 192.168.0.0 is the network ID. The netmask for a network like this is usually set to 255.255.255.0 in a regular home network. It differs depending on what IP class you are using. Also in this case the broadcast address would be the last address, as in 192.168.0.255.

Well, you get the picture ;)
"The best place to hide a tree, is in a forest"

User avatar
visser
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 472
Joined: 03 Apr 2007, 16:00
17
Location: online
Contact:

Post by visser »

thanks again cats. another perfect answer :P

Post Reply