2 default routes in global zones
Posted: Mon Sep 22, 2008 1:12 pm
I was setting up Solaris 10 with zones hoping to take advantage of the multiple public static IP addresses from the ISP.
I had been suffering from get the newly assigned public static IP address to work for the past couple of weeks.
I tried to contact the ADSL modem manufacturer - 2wire but they are useless.
I called AT&T, my ISP, last Saturday and they were useless too.
I then realized that there's no default route for zones.
That might be the reason why I was unable to reach the network interface.
I tried to set up a new default route from global zone but it kept saying bad address.
I then sent the infrastructure diagram and described what I want to achieve at home to the SUN instructor I met in SF to see if he has insights on this.
Pete replied with a possible solution:
The new routing table from global zone:
Old routing table from global zone:
New routing table from testzone:
Old routing table from testzone:
After the default route for 99.1.11.224/29 is added, testzone is accessible from the internet and it can visit other internet sites.
I had been suffering from get the newly assigned public static IP address to work for the past couple of weeks.
I tried to contact the ADSL modem manufacturer - 2wire but they are useless.
I called AT&T, my ISP, last Saturday and they were useless too.
I then realized that there's no default route for zones.
That might be the reason why I was unable to reach the network interface.
I tried to set up a new default route from global zone but it kept saying bad address.
I then sent the infrastructure diagram and described what I want to achieve at home to the SUN instructor I met in SF to see if he has insights on this.
Pete replied with a possible solution:
Pete Durst wrote:Thanks Chang-An, that helps a lot.
Ok, so here's what I know. The problem is a common one, so you aren't alone. Unfortunately, there isn't any "elegant" fix for this. The official line is to add a new line to your /etc/defaultrouter in the GZ and that should do the trick:
/etc/defaultrouter
==================
1.0.0.1
99.1.11.225
That should be it. If you are running Solaris 10u3 or older, this will likely just work and you are ok. The bad news is that it appears that in Solaris 10u4 or newer, that this may be a problem. I have tried it over and over and although I can manually add the route,the system is refusing to use the /etc/defaultrouter to establish the route for me. I tried to use a /etc/rc3.d/S99defaultrouter script and just restart the service, no go... added a line to that script to add the route, no go (error message says "network is unreachable). I then change the script to run as an at job 1 minute after being executed on boot up. This last one seemed to have worked. Here's how I did it:
/etc/rc3.d/S99defaultrouter
===========================
#!/bin/sh
at now +1min << EOF
/usr/sbin/svcadm restart network/physical
/usr/sbin/route add default 99.1.11.225
EOF
I am still working on this and will let you know if I see anything better for you to use.
Pete
I don't know why an at command is needed to add the default route but it seems to work.Pete Durst wrote: For the reason, I'm not able to say for sure. In Solaris 10 update 4, Sun introduced the "exclusive-ip" type network resource and I think that it's part of that change that is causing the problem. Certainly all the notes on the forums are pointing that way. For information, update 5 has the same issues.
The new routing table from global zone:
Code: Select all
%netstat -rn
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ---------- ---------
default 1.0.0.1 UG 1 755
default 99.1.11.230 UG 1 74
1.0.0.0 1.0.0.238 U 1 30 rtls0
224.0.0.0 1.0.0.238 U 1 0 rtls0
127.0.0.1 127.0.0.1 UH 1 104 lo0
Code: Select all
%netstat -rn
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ---------- ---------
default 1.0.0.1 UG 1 124
1.0.0.0 1.0.0.238 U 1 2 rtls0
224.0.0.0 1.0.0.238 U 1 0 rtls0
127.0.0.1 127.0.0.1 UH 4 140 lo0
Code: Select all
$ netstat -rn
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ---------- ---------
default 99.1.11.230 UG 1 75
99.1.11.224 99.1.11.226 U 1 23 vfe0:1
224.0.0.0 99.1.11.226 U 1 0 vfe0:1
127.0.0.1 127.0.0.1 UH 1 0 lo0:1
Code: Select all
# netstat -rn
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ---------- ---------
99.1.11.224 99.1.11.226 U 1 21 vfe0:1
224.0.0.0 99.1.11.226 U 1 0 vfe0:1
127.0.0.1 127.0.0.1 UH 4 117 lo0:1