On 01/28/10 10:22 AM, sowmini.varad...@sun.com wrote:
On (01/28/10 10:13), Robert Hartzell wrote:

  Routing Table: IPv4
    Destination           Gateway           Flags  Ref     Use     Interface
  -------------------- -------------------- ----- ----- ---------- ---------
  10.0.0.0             10.0.0.1             U         3          6 rge0
  24.0.0.0             10.0.0.20            UG        1          0 rge0
  127.0.0.1            127.0.0.1            UH        2         12 lo0
  192.168.0.0          192.168.0.1          U         4         24 rge1

  so I try:

  route delete 24.0.0.0 10.0.0.20
  route add default 10.0.0.20 and get network unreachable...

  How do I get my default route back?


What is your interface address (of rge0) at this point? What does
'ifconfig -a' say?

rge0: flags=1100943<UP,BROADCAST,RUNNING,PROMISC,MULTICAST,ROUTER,IPv4> mtu 1500 index 2
        inet 10.0.0.1 netmask ffffff00 broadcast 10.0.0.255
        ether 0:e0:b3:10:89:ae
rge1: flags=1100843<UP,BROADCAST,RUNNING,MULTICAST,ROUTER,IPv4> mtu 1500 index 3
        inet 192.168.0.1 netmask ffffff00 broadcast 192.168.0.255
        ether 0:22:3f:f6:59:8e



What is the output of "route monitor" when you run the above steps?
That, btw, will also give you an idea of how the 24.0.0.0 route got
added.

on the wan side my public ip is 24.249.255.180 and default route is 24.249.255.177

This time the add and delete commands work but after adding 10.0.0.20 I have to delete 24.0.0.0 again and a ping to sony.com works. After a couple of minutes 24.0.0.0 magically shows up in the routing table and then no more connection to the outside. Also default 10.0.0.20 is not persistent after a reboot.


route delete 24.0.0.0 10.0.0.20
route add default 10.0.0.20
route delete 24.0.0.0 10.0.0.20

ping sony.com
sony.com is alive

and then after a few moments

ping sony.com
no answer

and 24.0.0.0 10.0.20 is back in the routing table

r...@bastion:~# route monitor
got message of size 376
RTM_DELETE: Delete Route: len 376, pid: 376, seq 4, errno 0, flags:<DONE>
locks:  inits: <hopcount>
sockaddrs: <DST,GATEWAY,NETMASK,IFP>
 24.0.0.0 10.0.0.20 255.0.0.0
got message of size 376
RTM_ADD: Add Route: len 376, pid: 376, seq 5, errno 0, flags:<GATEWAY,DONE>
locks:  inits: <hopcount>
sockaddrs: <DST,GATEWAY,NETMASK,IFP>
 24.0.0.0 10.0.0.20 255.0.0.0
got message of size 124
RTM_DELETE: Delete Route: len 124, pid: 3526, seq 1, errno 0, flags:<GATEWAY,DONE,STATIC>
locks:  inits:
sockaddrs: <DST,GATEWAY,NETMASK>
 24.0.0.0 10.0.0.20 255.0.0.0
got message of size 376
RTM_ADD: Add Route: len 376, pid: 376, seq 6, errno 0, flags:<GATEWAY,DONE>
locks:  inits: <hopcount>
sockaddrs: <DST,GATEWAY,NETMASK,IFP>
 24.0.0.0 10.0.0.20 255.0.0.0
got message of size 376
RTM_DELETE: Delete Route: len 376, pid: 376, seq 7, errno 0, flags:<DONE>
locks:  inits: <hopcount>
sockaddrs: <DST,GATEWAY,NETMASK,IFP>
 24.0.0.0 10.0.0.20 255.0.0.0
got message of size 376
RTM_ADD: Add Route: len 376, pid: 376, seq 8, errno 0, flags:<GATEWAY,DONE>
locks:  inits: <hopcount>
sockaddrs: <DST,GATEWAY,NETMASK,IFP>
 24.0.0.0 10.0.0.20 255.0.0.0


--
  Robert W Hartzell
bear at rwhartzell.net
  RwHartzell.Net
_______________________________________________
networking-discuss mailing list
networking-discuss@opensolaris.org

Reply via email to