Username Always stay logged in
Password:

 

Pages: [1]
  Print  
Author Topic: Static IP  (Read 2311 times)
martinc
Global Moderator
Pro Designer
*****

Karma: +1/-0
Offline Offline

Posts: 148



View Profile
« on: November 28, 2011, 12:40:47 AM »

>per mitch, set it outside the DHCP range as to avoid assignment conflicts
>once you decide what network(192.168.x.x) you want to be on, make sure the rest of the computers and router are on it or else you can't connect to anything

/etc/network/interfaces
Code:
#dhcp
#auto eth0
#iface eth0 inet dhcp

auto eth0
iface eth0 inet static
     address 192.168.1.10                 (what IP you want the system to be)
     network 192.168.[b]1[/b].0                  (what network you're on)
     netmask 255.255.255.0              (255 for the permanent octet)
     broadcast 192.168.1.255            (255 for the variable octet)
     gateway 192.168.1.1                  (router IP)

bring the connection down and up
Code:
ifdown eth0
# ifup eth0

to restart interfaces
Code:
/etc/init.d/networking restart

if DNS server is local, flush cache
Code:
/etc/rc.d/init.d/nscd restart
# or just restart
shutdown -r now

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

Address Info

    10.0.0.1 through 10.255.255.254
        Class A address range
            16,777,214 addresses
            16,777,214 computers on 1 network
            (10.x.x.x)
            Uses a subnet mask of 255.0.0.0
            Uses a broadcast address of 10.255.255.255
            First octet must be the same on all computers

    172.16.0.1 through 172.31.255.254
        Class B address range
            1,048,574 addresses
            65,534 computers on each of 16 possible networks
            (172.16.x.x to 172.31.x.x)
            Uses a subnet mask of 255.255.0.0
            Uses a broadcast address of 172.16-31.255.255
            First two octets must be the same on all computers

    192.168.0.1 through 192.168.255.254
        Class C address range
            65,534 addresses
            254 computers on each of 256 possible networks
            (192.168.0 to 255.x)
            Uses a subnet mask of 255.255.255.0
            Uses a broadcast address of 192.168.0-255.255
            First three octets must be the same on all computers

Pretty damn good networking read
Howto and more commands
Howto and example
Logged

I have as much authority as the Pope, I just don't have as many people who believe it. --George Carlin
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Greenday Theme Designed By [S.W.T]