home network through router

Colin Law clanlaw at googlemail.com
Thu Sep 24 08:31:33 UTC 2009


2009/9/23 Karl F. Larsen <klarsen1 at gmail.com>:
snip
> If Your Ubuntu System has set to use DHCP, you will want to
> change it to a static IP address here is simple tip
>
> open the /etc/network/interfaces file.
>
> sudo vi /etc/network/interfaces
>
> If you are using DHCP for your primary network card which is
> usually eth0, you will see the following lines
>
> auto eth0
> iface eth0 inet dhcp
>
> As you can see, it’s using DHCP right now. We are going to
> change dhcp to static, and then there are a number of options
> that should add and here is the example and you can change
> these settings according to your network settings.
>
> 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
>
> Restart the neworking service using the following command
>
> sudo /etc/init.d/networking restart
>
>        What I did would was first $ sudo ifconfig and found what it
> was now, and then set it up to get it the same as a static ip
> number. It worked.

If you give your pc a fixed ip the same as the one previously given by
your DHCP server (probably your router) then don't forget to configure
the router so as not to give that address to another pc on the
network, otherwise you may end up with two on the same address which
is not good.

Colin




More information about the ubuntu-users mailing list