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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-26-2007, 05:21 AM
|
#1
|
Member
Registered: Nov 2004
Location: Turkey
Distribution: Slackware
Posts: 145
Rep:
|
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?
|
|
|
11-27-2007, 04:36 PM
|
#2
|
Member
Registered: May 2007
Location: CO
Distribution: Solaris , Redhat , Debian
Posts: 152
Rep:
|
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.
|
|
|
11-28-2007, 01:31 AM
|
#3
|
Member
Registered: Nov 2004
Location: Turkey
Distribution: Slackware
Posts: 145
Original Poster
Rep:
|
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...
|
|
|
11-28-2007, 01:55 AM
|
#4
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795
|
Can you post all of the actual commands you run and their output ?
|
|
|
11-28-2007, 03:00 AM
|
#5
|
Member
Registered: Nov 2004
Location: Turkey
Distribution: Slackware
Posts: 145
Original Poster
Rep:
|
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
|
|
|
11-28-2007, 03:28 AM
|
#6
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795
|
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 ?
|
|
|
11-28-2007, 03:52 AM
|
#7
|
Member
Registered: Nov 2004
Location: Turkey
Distribution: Slackware
Posts: 145
Original Poster
Rep:
|
I added it accidentally, my connection was working through default route.
|
|
|
11-28-2007, 04:54 AM
|
#8
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795
|
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 ?
|
|
|
11-28-2007, 05:18 AM
|
#9
|
Member
Registered: Nov 2004
Location: Turkey
Distribution: Slackware
Posts: 145
Original Poster
Rep:
|
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?
|
|
|
11-28-2007, 05:43 AM
|
#10
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795
|
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.
|
|
|
11-28-2007, 05:59 AM
|
#11
|
Member
Registered: Nov 2004
Location: Turkey
Distribution: Slackware
Posts: 145
Original Poster
Rep:
|
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
|
|
|
11-28-2007, 08:12 AM
|
#12
|
LQ Newbie
Registered: Nov 2007
Distribution: SXCE
Posts: 3
Rep:
|
Use the routeadm command from the global zone . Not sure of the exact switch though
man routeadm
Rgds
PK
|
|
|
11-28-2007, 05:32 PM
|
#13
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795
|
Quote:
Originally Posted by scoban
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.
|
|
|
11-29-2007, 02:21 AM
|
#14
|
Member
Registered: Nov 2004
Location: Turkey
Distribution: Slackware
Posts: 145
Original Poster
Rep:
|
Thanks for replays, I did not manage to remove this route entry, I am giving up for now 
|
|
|
11-29-2007, 04:12 AM
|
#15
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795
|
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.
|
|
|
All times are GMT -5. The time now is 05:52 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|