how to set the default gateway (/etc/network/interfaces ?)
Thufir Hawat
hawat.thufir at gmail.com
Thu Mar 7 13:43:30 UTC 2013
Is the default gateway *only* in /etc/network/interfaces or can that be
set elsewhere? By set I mean stored to a file, persisting.
In trying to use an IOGear wireless bridge, the settings showed a bit
odd. In the Access Point status section, when connecting to the bridge
at 192.168.1,252, ie the gateway, there was:
Channel Number 11
Encryption WPA2
BSSID 70:54:d2:36:b7:05
Status Connected
TCP/IP Configuration
Attain IP Protocol Fixed IP
IP Address 192.168.1.252
Subnet Mask 255.255.255.0
Default Gateway 0.0.0.0
DHCP Server Disabled
MAC Address 00:21:79:c6:5a:de
http://askubuntu.com/a/265056/45156
and I found that default gateway setting confusing because I had set the
gateway as so:
thufir at dur:~$
thufir at dur:~$ cat /etc/network/interfaces.static
# 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
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.252
# The secondary network interface
auto eth1
iface eth1 inet dhcp
thufir at dur:~$
and so I don't see why the default gateway should be 0.0.0.0, this makes
no sense. Particularly given that simply switching the wires over to
connect the bridge to a router, rather then the computer, works fine.
(And, the router is even set to DHCP -- or maybe that's the solution??)
thanks,
Thufir
More information about the ubuntu-users
mailing list