OnlineSolution Forum IndexOnlineSolution Forum Index
OnlineSolution
FAQ  FAQ   Search  Search   Memberlist  Memberlist   Usergroups  Usergroups   Register  Register  
Register::  Log in Log in to check your private messages


 Advertisement

Post new topic  Reply to topic
 [ Linux ] Assign static IP address on Ubuntu/Debian « View previous topic :: View next topic » 
Author Message
Paul
PostPosted: Sun Mar 14, 2010 11:39 pm    Post subject: Assign static IP address on Ubuntu/Debian Reply with quote

Site Admin

Joined: 10 Dec 2007
Posts: 143
Location: New Zealand

Here are the easy steps to assign static IP address from command line:

1. Run sudo -s to configure everything as a root user (if you have permission).
2. Goto /etc/network directory
3. Open interfaces file
4. You will see the following lines if you're getting IP address from DHCP
Code:
auto eth0
iface eth0 inet dhcp

5. Change iface eth0 inet dhcp to following:
Code:
  iface eth0 inet static
    address 192.168.0.10
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255
    gateway 192.168.0.1

6. Save interfaces
7. run /etc/init.d/networking restart.

In above example, we have assigned static IP address of 192.168.0.10 with gateway 192.168.0.1.
_________________
Paul KH Kim

http://www.onlinesolution.co.nz
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

 Sponsor Link

Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



OnlineSolution - Since 2007
DAJ Glass (1.0.8) template by Dustin Baccetti
EQ graphic based off of a design from www.freeclipart.nu
Powered by phpBB © 2001, 2005 phpBB Group