static routes in network configuration files

NoOp glgxg at sbcglobal.net
Wed Feb 16 19:52:55 UTC 2011


On 02/16/2011 02:39 AM, Charles Smith wrote:
> Hello,
> 
> I would like to establish a static route for my "Ubuntu 10.10" by
> adding it manually, rather than through the GUI (gnome-nettool).  A
> network search confirmed that the right place would be
> /etc/network/interfaces, but there is no stanza in that file for the
> interface in question, eth0.
> 
> Where does Ubuntu store the static routes?
> 
> I made a complete copy of /etc and added the route through the GUI,
> and then compared the new /etc against the old /etc.  There were no
> changes!
> 
> Note that the first mention of eth0 in /var/log/syslog is: 
> ...avahi-daemon[1202]: Joining mDNS multicast group on interface
> eth0.IPv4 with address w.x.y.z. avahi-daemon[1202]: New relevant
> interface eth0.IPv4 for mDNS. avahi-daemon[1202]: Registering new
> address record for w.x.y.z on eth0.IPv4.
> 
> Does avahi store stuff elsewhere than in /etc?  If so, why?
...
Try:

$ cat /etc/hosts

Mine shows:
$ cat /etc/hosts
192.168.1.100	gl	# Added by NetworkManager <==
127.0.0.1	localhost.localdomain	localhost
::1	gl	localhost6.localdomain6	localhost6
127.0.1.1 gl

Nameservers go in /etc/resolv.conf
nameserver <nameserverIP>

Pre-Maverick I had interfaces configured for the IP, but finally
commented it out & went with NM as NM seems to ignore those settings.

I do use the config on my other machine that uses Wicd instead of NM.
Note I add the mtu to tune my DSL - you may not need it. You may also
want to add 'broadcast' & 'network' information as well. See 'man
interfaces' for more information.

> $ cat /etc/network/interfaces
> # This file describes the network interfaces available on your system
> # and how to activate them. For more information, see interfaces(5).
> 
> # The loopback network interface
> auto lo
> iface lo inet loopback
> 
> # The primary network interface
> 
> 
> 
> iface eth0 inet static
> address 192.168.1.101
> netmask 255.255.255.0
> gateway 192.168.1.1
> mtu 1492
> 
> auto eth0


You might find this helpful as well:
https://help.ubuntu.com/10.10/serverguide/C/network-configuration.html
http://manpages.ubuntu.com/manpages/maverick/en/man5/interfaces.5.html





More information about the ubuntu-users mailing list