[conspire] Routing question

Edmund J. Biow biow at sbcglobal.net
Thu May 29 08:36:27 PDT 2008


Ryan Russell wrote:
> Edmund J. Biow wrote:
>> # route add  -net 192.168.1.0/24 gw 192.168.2.1
>
> Isn't 192.168.2.1 your default route? Can this machine access the
> Internet before adding this route? 
Here is the output of route:
# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
192.168.2.0    *               255.255.255.0   U     0      0        0 ath0
192.168.1.0   *               255.255.255.0   U     0      0        0 eth0
default         192.168.2.1   0.0.0.0         UG    0      0        0 ath0
default         router          0.0.0.0         UG    0      0        0 eth0

> Could we see the output of an ifconfig -a and a netstat -rn ?
# ifconfig -a
ath0      Link encap:Ethernet  HWaddr 00:13:46:B5:AE:90 
          inet addr:192.168.2.102  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::213:46ff:feb5:ae90/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1395 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1114 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1009725 (986.0 KiB)  TX bytes:93931 (91.7 KiB)

eth0      Link encap:Ethernet  HWaddr 00:0F:B0:10:02:38 
          inet addr:192.168.1.126  Bcast:192.168.223.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:185 Base address:0x4000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:13 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1144 (1.1 KiB)  TX bytes:1144 (1.1 KiB)

sit0      Link encap:IPv6-in-IPv4 
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

wifi0     Link encap:UNSPEC  HWaddr
00-13-46-B5-AE-90-00-00-00-00-00-00-00-00-00-00 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6056 errors:0 dropped:0 overruns:0 frame:1804
          TX packets:1168 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:199
          RX bytes:1438849 (1.3 MiB)  TX bytes:121047 (118.2 KiB)
          Interrupt:177 Memory:f0ba0000-f0bb0000

The ethernet is set with a static IP address, otherwise I suspect it
wouldn't have any address at all. wifi0 is a built-in Broadcom wifi card
that doesn't even work properly with Windoze.

# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt
Iface
192.168.2.0    0.0.0.0         255.255.255.0   U         0 0          0 ath0
192.168.1.0   0.0.0.0         255.255.255.0   U         0 0          0 eth0
0.0.0.0         192.168.2.1   0.0.0.0         UG        0 0          0 ath0
0.0.0.0         192.168.1.1 0.0.0.0         UG        0 0          0 eth0

But attempts to mount my samba shares give me:

mount error 113 = No route to host
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

I can't view my local server's web page, even.

But I do the magic command and all is good, I can mount my shares and
see my local web page.

# route add  -net 192.168.1.0/24 gw 192.168.2.1

I just added an alias to my .bashrc that will hopefully issue the
command and mount my network shares at one short command, but still, I
don't need to do this with opensuse or Windoze and my shares are mounted
as soon as I boot up.

Ed













More information about the conspire mailing list