LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 11-26-2007, 05:21 AM   #1
scoban
Member
 
Registered: Nov 2004
Location: Turkey
Distribution: Slackware
Posts: 145

Rep: Reputation: 16
Can not delete route


Hi, There is a route entry in my netstat -rn output and I cannot delete it using route delete net <network> <gateway> command. I googled a bit, there is similar problems but no solutions. I also tried to delete it by deleting all routes using flush option without success. Any opinions?
 
Old 11-27-2007, 04:36 PM   #2
ADxD_7
Member
 
Registered: May 2007
Location: CO
Distribution: Solaris , Redhat , Debian
Posts: 152

Rep: Reputation: 23
What error do you get when you try to delete it ?

It could be you need to specify the netmask in the route as well.
 
Old 11-28-2007, 01:31 AM   #3
scoban
Member
 
Registered: Nov 2004
Location: Turkey
Distribution: Slackware
Posts: 145

Original Poster
Rep: Reputation: 16
Already tried every possible way to delete the route without success. I am getting "gateway not in table" error. But I see it in routing table. I also tried route -p flush but after reboot route appears in table again...
 
Old 11-28-2007, 01:55 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Can you post all of the actual commands you run and their output ?
 
Old 11-28-2007, 03:00 AM   #5
scoban
Member
 
Registered: Nov 2004
Location: Turkey
Distribution: Slackware
Posts: 145

Original Poster
Rep: Reputation: 16
Quote:
Can you post all of the actual commands you run and their output ?
Here It comes.

Code:
bash-3.00# netstat -rn

Routing Table: IPv4
  Destination           Gateway           Flags  Ref     Use     Interface 
-------------------- -------------------- ----- ----- ---------- --------- 
default              10.5.1.1             UG        1        314 bge0      
10.5.0.0             10.5.3.1             U         1         54 bge0      
127.0.0.1            127.0.0.1            UH        1        315 lo0       

Routing Table: IPv6
  Destination/Mask            Gateway                   Flags Ref   Use    If   
--------------------------- --------------------------- ----- --- ------- ----- 
::1
I want to remove second line in above table.

Code:
bash-3.00# route delete net 10.5.0.0 10.5.3.1
delete net 10.5.0.0: gateway 10.5.3.1: not in table
I also tried 255.0.0.0 and 255.255.255.0 netmasks, same result.

Code:
bash-3.00# route delete net 10.5.0.0 -netmask 255.255.0.0 10.5.3.1
delete net 10.5.0.0: gateway 10.5.3.1: not in table
Code:
bash-3.00# route delete net 10.5.0.0 -netmask 255.255.0.0 -gateway 10.5.3.1
delete net 10.5.0.0: gateway 10.5.3.1: not in table
Code:
bash-3.00# route delete host 10.5.0.0 10.5.3.1
delete host 10.5.0.0: gateway 10.5.3.1: not in table
bash-3.00# route delete host 10.5.0.0 -netmask 255.255.0.0 10.5.3.1
delete net 10.5.0.0: gateway 10.5.3.1: not in table
 
Old 11-28-2007, 03:28 AM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
This one isn't a route to a router (a.k.a gateway).
Why do you want to delete this route which is the only way for your machine to communicate with the network ?
 
Old 11-28-2007, 03:52 AM   #7
scoban
Member
 
Registered: Nov 2004
Location: Turkey
Distribution: Slackware
Posts: 145

Original Poster
Rep: Reputation: 16
I added it accidentally, my connection was working through default route.
 
Old 11-28-2007, 04:54 AM   #8
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
I don't think you added it as it is created by default.

As I wrote, removing that route would prevent your machine to reach your default router or any other device connected to your LAN.

The problem must be elsewhere, and by the way, what is the problem you are trying to fix in the first place ?
 
Old 11-28-2007, 05:18 AM   #9
scoban
Member
 
Registered: Nov 2004
Location: Turkey
Distribution: Slackware
Posts: 145

Original Poster
Rep: Reputation: 16
As I was trying to communicate to global zone (IP:10.5.3.1) from local zone (IP:192.168.0.1), I set up this entry in routing table. Then I see it is not what I wanted so I just tried to get rid of it. This is a test machine and I want to delete this route entry, I don't care if my net goes down I am confused why I cannot delete it?
 
Old 11-28-2007, 05:43 AM   #10
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
You didn't tell you used zones.

Anyway, you can't directly communicate between 10.5.3.1 to 192.168.0.1, you need IPs on the same network on each connected zones.
 
Old 11-28-2007, 05:59 AM   #11
scoban
Member
 
Registered: Nov 2004
Location: Turkey
Distribution: Slackware
Posts: 145

Original Poster
Rep: Reputation: 16
Quote:
Anyway, you can't directly communicate between 10.5.3.1 to 192.168.0.1, you need IPs on the same network on each connected zones.
Are you sure about that? I read some posts (1) about routing between local and global zones in different subnets is possible.

Anyway forget about zones, I want to get rid of that entry in routing table is this possible in any way? I am ready to reinstall the OS because of this

1-http://forum.java.sun.com/thread.jspa?threadID=5075797&messageID=9276196
 
Old 11-28-2007, 08:12 AM   #12
pkochummen
LQ Newbie
 
Registered: Nov 2007
Distribution: SXCE
Posts: 3

Rep: Reputation: 0
Use the routeadm command from the global zone . Not sure of the exact switch though

man routeadm


Rgds
PK
 
Old 11-28-2007, 05:32 PM   #13
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
Originally Posted by scoban View Post
Are you sure about that?
This is basic TCP/IP by design. Two machines can directly communicate only when they are on the same (sub)network. As far as networking is concerned, zones are considered as different machines even while they share the same TCP/IP stack (Latest Solaris Express allows separate stacks).
Quote:
I read some posts (1) about routing between local and global zones in different subnets is possible.
May be. I'm skeptical about the interest of such hacks if at all possible.
Quote:
Anyway forget about zones, I want to get rid of that entry in routing table is this possible in any way?
I doubt you can, and that would make your interface useless anyway.
Quote:
I am ready to reinstall the OS because of this
In my opinion, that wouldn't remove that route which is hardcoded.
 
Old 11-29-2007, 02:21 AM   #14
scoban
Member
 
Registered: Nov 2004
Location: Turkey
Distribution: Slackware
Posts: 145

Original Poster
Rep: Reputation: 16
Thanks for replays, I did not manage to remove this route entry, I am giving up for now
 
Old 11-29-2007, 04:12 AM   #15
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
I'm afraid you are still missing you didn't add this route and deleting it would be useless.

You can remove that route by using the correct syntax, but after that your host is isolated:
Code:
bestouan:~ $ netstat -rn

Routing Table: IPv4
  Destination           Gateway           Flags  Ref     Use     Interface 
-------------------- -------------------- ----- ----- ---------- --------- 
default              192.168.1.1          UG        1         13 iwi0      
192.168.1.0          192.168.1.5          U         1          1 iwi0      
127.0.0.1            127.0.0.1            UH        3        395 lo0       

bestouan:~ $ pfexec route delete 192.168.1.0          192.168.1.5
delete net 192.168.1.0: gateway 192.168.1.5
bestouan:~ $ netstat -rn                                       

Routing Table: IPv4
  Destination           Gateway           Flags  Ref     Use     Interface 
-------------------- -------------------- ----- ----- ---------- --------- 
default              192.168.1.1          UG        1         13 iwi0      
127.0.0.1            127.0.0.1            UH        3        395 lo0       
bestouan:~ $ ping 192.168.1.1
ICMP Host Unreachable from gateway 192.168.1.5
 for icmp from 192.168.1.5 to 192.168.1.1
bestouan:~ $ sudo route add 192.168.1.0          192.168.1.5   
add net 192.168.1.0: gateway 192.168.1.5: Network Unreachable
bestouan:~ $ ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
skge0: flags=1004842<BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index 2
        inet 0.0.0.0 netmask 0 
iwi0: flags=201004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,CoS> mtu 1500 index 3
        inet 192.168.1.5 netmask ffffff00 broadcast 192.168.1.255
bestouan:~ $ pfexec route add 192.168.1.0 192.168.1.5 0
add net 192.168.1.0: gateway 192.168.1.5
bestouan:~ $
You should focus on fixing the communication issue you are facing instead.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iproute2 (ip route), pppoe and default route lorddoskias Linux - Networking 0 05-09-2007 11:04 AM
Default route took 20s to display with 'route' command Akhran Linux - Newbie 3 11-04-2006 04:59 AM
I am not able to add a new route to my route table using route command prashanth s j Linux - Networking 2 09-03-2005 04:34 AM
unable to delete route-syntax problem? dthacker Linux - Networking 4 10-14-2004 11:23 AM
Working with 'route' and unwanted route entries pioniere Linux - Networking 6 02-05-2003 12:14 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 04:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration