Networking Question

Tony Arnold tony.arnold at manchester.ac.uk
Thu Jun 8 11:06:33 UTC 2006


OOzy,

On Thu, 2006-06-08 at 13:23 +0300, OOzy Pal wrote:
> I am running Kubuntu-Dapper and using ADSL. I also have
> Apache/PHP/MySQL running.
> 
> I have reserved 192.168.20.x for my virtual hosts. up to now I have
> 192.168.20.1 with eth0:1->192.168.20.1
> 192.168.20.2 with eth0:2->192.168.20.2
> 192.168.20.3 with eth0:3->192.168.20.3
> 
> My ADSL router IP is 192.168.1.1.
> 
> Now, I clicked on K-Menu->System Settings->Network Settings. A window
> with 4 tabs appeared. The tabs are as follows:
> 
> 1. Network Interface: with eth0 and IP 192.168.20.3 dhcp enabled
> 2. Router: IP 192.168.1.1
> 3. Domain Name System: with host name oozy and domain name servers as
> 192.168.1.1
> 4. Network Profile: empty
> 
> my /etc/hosts have the following entries:
> 
> 127.0.0.1 localhost www.oozy.com oozy
> 192.168.10.1 oozy www.oozy.com
> 
> 192.168.20.1 www.e1.com
> 192.168.20.2 www.e2.org
> 192.168.20.3 www.e2.org
> 
> 
> # The following lines are desirable for IPv6 capable hosts
> ::1 ip6-localhost ip6-loopback
> fe00::0 ip6-localnet
> ff00::0 ip6-mcastprefix
> ff02::1 ip6-allnodes
> ff02::2 ip6-allrouters
> ff02::3 ip6-allhosts
> 192.168 oozy
> ##########END OF HOSTS############
> 
> Notes: Virtual hosts work fine
> 
> I would like to get some education about these settings. Also, I have
> these questions:
> 
> 1. Why my network interface IP address 192.168.20.3 which is the IP
> address of a virtual host?

I can't answer this one.

> 2. How can I make my computer IP address different from 127.0.0.1
> localhost. I want to make like 192.168.10.1 oozy?

Computers don't have IP addresses, but the interfaces on them do! If you
type ifconfig in a terminal window, the network interface will be listed
along with their IP addresses and other details. You will find a device
called lo, or the local loopback interface which has the 127.0.0.1
address. There is a load of stuff which relies on this, so I would leave
it well alone. (For example, by default some daemons will listen on the
local loopback interface which allows other processes on your system to
talk to the daemon, but does not allow anyone from the outside world to
talk to them).

> Why is the IP address of my router and the IP of the Domain Name
> System is the same?

This is because your ADSL router is acting as a forwarding dns server.
dns requests go to your router which then passes them straight on to
your ISP's dns servers. The answer is routed back to your computer. This
is quite common for modern ADSL routers. Things get configured that way
through DHCP served by your router. You may be able to configure your
router differently, but I don't see what advantage it would give you.

Regards,
Tony.
-- 
Tony Arnold, IT Security Coordinator, University of Manchester,
IT Services Division, Kilburn Building, Oxford Road, Manchester M13 9PL.
T: +44 (0)161 275 6093, F: +44 (0)870 136 1004, M: +44 (0)773 330 0039
E: tony.arnold at manchester.ac.uk, H: http://www.man.ac.uk/Tony.Arnold





More information about the ubuntu-users mailing list