How to save routing entries permanently after route add

Hi guys,
I have added routing entries through route add command. I know i can add routing entries permanently thru -p option in route add command but didin't use that option. How to save those routing entries now?
Thanks...

The filename you are looking for is /etc/inet/static_routes which is available only on Solaris 10 update 3 or later:
root_sol10u3# route -p add -net 192.168.138.0/24 192.168.136.1
root_sol10u3# cat /etc/inet/static_routes
# File generated by route(1M) - do not edit.
-net 192.168.128.0/22 192.168.136.1
-net 192.168.138.0/24 192.168.136.1
-net 172.31.68.0/24 192.168.149.253
-net 172.31.69.0/24 192.168.149.253
root_sol10u3#For Solaris 10 update 2 or earlier, persistent static routes are not implemented. Additionally, the old RC script method suggested above also will not work for Solaris 10 given the host isn't always guaranteed to reach the "multiuser" milestone and subsequently run the legacy /etc/rc*/S* scripts (say if a filesystem fails to mount). For those releases, you should create a new manifest file as follows:
root_sol10u2# cat /var/svc/manifest/network/RKstatic-routes.xml
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<!--
        Static Route SMF Manefest
        To be replaced by official Sun mechanism in next solaris release
-->
<service_bundle type='manifest' name='RKstatic-routes'>
<service
  name='network/RKstatic-routes'
  type='service'
  version='1'>
    <create_default_instance enabled='true' />
    <single_instance/>
    <dependency name='network'
        grouping='require_any'
        restart_on='error'
        type='service'>
            <service_fmri value='svc:/network/service' />
    </dependency>
  <exec_method
    type='method'
    name='start'
    exec='/lib/svc/method/RKstatic-routes start'
    timeout_seconds='60' />
  <exec_method
    type='method'
    name='stop'
    exec='/lib/svc/method/RKstatic-routes stop'
    timeout_seconds='60' />
  <property_group name='startd' type='framework'>
    <propval name='duration' type='astring' value='transient' />
  </property_group>
  <stability value='Unstable' />
</service>
</service_bundle>
root_sol10u2#Then create the method script:
root_sol10u2# cat /lib/svc/method/RKstatic-routes
#!/bin/sh
# RKstatic-routes
# To be called by the network/RKstatic-route SMF service
ACTION=${ACTION:-add}
setup_routes () {
#Route to networks.
/usr/sbin/route $ACTION net 172.1.0.0 -netmask 255.255.0.0 10.1.0.0
/usr/sbin/route $ACTION net 172.2.0.0 -netmask 255.255.0.0 10.2.0.0
case "$1" in
    start)
        echo "${ACTION}ing static routes"
        setup_routes
    stop)
        ACTION=delete
        echo "${ACTION}ing static routes"
        setup_routes
        echo "Usage: $0 {start|stop}"
        exit 1
esac
root_sol10u2#Then, import and enable/start the service:
root_sol10u2# svccfg -v import /var/svc/manifest/network/RKstatic-routes.xml
root_sol10u2# svcadm enable network/RKstatic-routes
root_sol10u2# To stop:
root_sol10u2# svcadm disable network/RKstatic-routes
root_sol10u2# For posterity, here is a pre-Solaris 10 version:
root_sol9# cat /etc/init.d/staticRoutes.sh
#!/bin/sh
case "$1" in
        start)
                test -f /etc/routes.conf || exit 0
                while read type route gateway
                do
                        /usr/sbin/route add $type $route $gateway
                done < /etc/routes.conf
        stop)
                test -f /etc/routes.conf || exit 0
                while read type route gateway
                do
                        /usr/sbin/route delete $type $route $gateway
                done < /etc/routes.conf
                echo "Usage: /etc/init.d/routes { start | stop }"
esac
root_sol9# cat /etc/routes.conf
172.1.2.0/24 172.1.2.4
172.1.3.0/24 172.1.3.4
root_sol9# ln -s /etc/rc2.d/S70staticRoutes /etc/init.d/staticRoutes.sh
root_sol9#Best Regards,
Bryan Wood

Similar Messages

  • How to save report in PersonalCategory  after creating it using java panel?

    Hi,
    Anybody knows How to save report in PersonalCategory  after creating it using java panel?
    I dont want to save it in public folder. I want to save report (webi) in user's personal category.
    can anybody send me source code?
    It will help me a lot.
    Thanks in advance
    Amol Mali

    Hi teda,
    i'm assuming that you have seen my post that i did successfuly save report in user's personal category.
    Actually the report is created in webi java panel using RE SDK and  is saved in Report Sample Folder then i'm saving it in user's personal category by following code
    string query = "Select SI_PERSONAL_CATEGORIES From CI_INFOOBJECTS Where "
                         + "SI_INSTANCE=0 And SI_ID=" + reportID;
                    InfoObjects infoObjects = infoStore.Query(query);
                    InfoObject infoObject = infoObjects[1];
                    Webi wreport = (Webi)infoObject;
                    ObjectRelativeIDs personalIDs = wreport.PersonalCategories;
                /personalIDs.Add(Convert.ToInt32(categoryID));
                   infoStore.Commit(infoObjects);
    But the report is presents in the Folder also and in user's personal category also.
    I dont want the report to be in the folder (Report Sample) if i saved it in user's personal category.
    How can i do that?
    any idea.
    Please help me.
    Thanks in advance
    Amol Mali
    Edited by: amol mali on Jan 9, 2009 7:55 PM

  • How to save data in ztable after editing in alv report

    how to save data in ztable after editing in alv report?

    Hi,
        Please find the attachment below.This may be usefull to you.
         [http://wiki.sdn.sap.com/wiki/display/Snippets/ALV-Editingandsavingtheeditedvaluesin+Database%28OOPS%29]
    Regards,
    Ramakrishna Yella.

  • Having trouble figuring out how to save the original photo after I've cropped it - i.e. I want to create a headshot of my husband from a photo of the two of us, but I also want to keep the original. Seems very basic, but can't seem to figure it out. Any h

    Having trouble figuring out how to save the original photo after I've cropped it - i.e. I want to create a headshot of my husband from a photo of the two of us, but I also want to keep the original. Seems very basic, but can't seem to figure it out. Any help would be great!

    Use File >> Save As
    Choose a different file name so as not to overwrite the original and don't save any changes when closing the original.

  • URGENT : How to save multiple entries in a T list at one go

    If I have a T list that contains the colours availiable at a paint shop (just an example), e.g. white, green, red. I want to save the multiple entries in the t-list at any moment to the database column at one go. how can i do it.
    Also the table doesn't contain a column for the colour_code, but instead it has the shop_id and the colour_id corresponding to that shop_id. So i need to insert into the database the colour_id for a particular colour_code as the t-list is just a control item in the data block.
    Please help.
    Abhishek.

    if you use multi-selection Tlist item or create your own Tlist looking form, then you may loop thru these multi-selections and add your logic into this loop.

  • How to save music on nano after HD crash?

    My wife's Mac Mini crashed recently and we replaced the hard drive with a new one.  Her iTunes Library was unfortunately not on the Time Machine backup when I restored it to the new HD.  This means all the music she has left is what was on her early 2nd-gen iPod nano at the time of the crash. 
    Since the nano was synced to a different library which no longer exists, how can we save the music that's on the nano?  Thanks!

    Click here for information.
    (61794)

  • Time Machine - how to save work and mail after 'restore to' date

    OK, things have gone seriously wrong on my girlfiends almost new 21" iMac.
    First Excel wouldn't open a week ago, and now Quark won't launch and Word seems to be corrupted.
    Time to go back in time.... (cue wibbly wobbly special effect)
    We reckon it was definitely ok about a month ago. She backed up regularly.
    1- Is there a way to just go back with the apps and OS and leave everything else alone?
    2 - Failing that, she can back up all her recent work, but how to keep the mails in the Outlook mailbox that have been recieved since the 'go back' time?
    Many thanks.

    Install [https://addons.mozilla.org/en-us/thunderbird/addon/importexporttools/ ImportExportTools] and adjust the Options (see picture).
    http://chrisramsden.vfast.co.uk/3_How_to_install_Add-ons_in_Thunderbird.html

  • How i can check new storage after i add it, specially LDAP storage

    Hi
    Thank you for reading my post.
    is there any way that i can check whether new storages are configured correcyly inside sun access manager 7 or not?
    for example I have an LDAP storage and i want to check whether i have add it correctly or not.
    thanks

    Ah I see what it is you are doing!
    You are reintroducing unformatted text from the Sections.
    Sections in a Word Processing document are "Captured" templates of individual page layouts, which includes the formatting of those pages when they were captured. When you Save As Template you have to make sure that the Sections have been fixed and captured, not just the visible pages. It is all Pages' weird way of doing Master Pages.
    You will need to recapture the sections after you have changed the language to British English.
    See the following link which explains how capturing Sections works:
    http://www.freeforum101.com/iworktipsntrick/viewtopic.php?t=182&highlight=letter head&mforum=iworktipsntrick
    Peter

  • How do I delete an app after using "Add to Home Screen"?

    I used the "Add to Home Screen" option from Safari. Then it added the app on my home screen. How do I delete it? It does not have an 'X' symbol when I make my icons wiggle. So, does anybody know how to actually delete this app from my iPhone?
    I've heard about dragging it to the tenth page...BUT, I am not interested in leaving it on my phone taking up space. I want it off. I was just testing out its functionality.
    Thanks

    If you plug in your device to the computer, the iTunes page will appear.  Click onto your device on the lefthand side, then select "Apps" at the top of the ensuing page.  You will see all your applications you have on the device.  Right click onto the app you wish to delete, and follow the directions.  That should remove it from your device.
    Hope it works.

  • How to save macros in excel for all workbooks permanently?

    HI all,
    I have created macros in the Excel 2007 and have saved it. And its working fine. But i open the same excel sheet again, I cant see any macros in the excel sheet?
    Can anyone pls let me know how to save the macros permanently in the Excel Sheet ?
    Thanks
    Pooja

    Hi ,
    I have saved as .xslx format but still the same unable to see the macros in the same excel sheet.
    My intention is that when ever i open any excel sheet in the my computer those macros should be available for me!!
    Thanks
    Pooja

  • How do I save files to keep after I factory reset my laptop.

    Hello, I need help on how to save files to keep after I factory reset my HP 2000-2b20NR laptop without any external drive. I need to save files to keep after I factory reset because I have malware on my laptop.  Any information will help Thank you. 

    Chris257 wrote:
    Hello, I need help on how to save files to keep after I factory reset my HP 2000-2b20NR laptop without any external drive. I need to save files to keep after I factory reset because I have malware on my laptop.  Any information will help Thank you. Hi, Burn files to CD or DVD or to a large (capacity) USB sticks. You can buy a 1TB external, portable HDD now for under 80 dollars. Regards.

  • How do I save a video permanently ?

    Now that I know how to save a photo permanently : In the continuous series of saving things (save money, save energy, save water, save gasoline--neh...more important :
    How do I save a video (from YouTube for example ) and keeping full motion ?
    I downloaded Jing (www.jingproject.com)
    and it works but there's a problem (see below the email conversation I had with them)
    Does anyone know another device ? there are a few but not for Mac.
    -----------email exchange with technical support--------
    When I play a video that I recorded from YouTube, the image is jerky. The original is fine when I just watch it, but the recorded version shows an still image for 10 seconds then go to the next image. It doesn't show what's in between.
    I can see the time (elapsed/remain) on the YouTube screen and It goes from elapsed time: 10 seconds, immediately to elapsed time: 20 seconds. Again the original is fine. It has zoom scenes and the Jing version just show the image from far then from close but not the actual movement of zooming in.
    Thank you for contacting Techsmith with your concerns.
    Jing is a simple tool created for screen recording. It typically does not handle full-motion video very well, and videos captured from the web, such as youTube videos, will most likely become considerably large compared to screen videos, and will potentially drop frames, especially if you are on a PPC G4 or G5.
    Please let me know if you have any further questions.
    Regards,
    Casey
    Techsmith Support
    ---------

    This works with Firefox.
    https://addons.mozilla.org/en-US/firefox/addon/3006
    VLC can play downloaded Youtube video, and many other formats.
    http://www.videolan.org/vlc/download-macosx.html

  • How to save a pdf form with a button on Android?

    Hello can anyone inform me with the knowledge of how to save a pdf form after filling with button on an Android device?
    What code behind the button is necessary to make this work.

    It happens automatically. You don't need any code to trigger it.

  • How to manage route entries on user Mac laptop?

    Hi,
    I have several Mac's in a small office and one has route entries no other Mac show. How can I permanently rid these entries. I have restarted the router and then the Macs and this has not worked. My route table from a netstat has some of the following entries:
    Routing tables
    Internet:
    Destination Gateway Flags Refs Use Netif Expire
    default 192.168.1.1 UGSc 321 0 en0
    default 192.168.1.1 UGScI 1 0 en1
    127 localhost UCS 0 0 lo0
    localhost localhost UH 2 409 lo0
    169.254 link#4 UCS 0 0 en0
    172.16.97/24 link#9 UC 1 0 vmnet8
    172.16.97.255 link#9 UHLWbI 3 464 vmnet8
    172.16.227/24 link#8 UC 2 0 vmnet1
    172.16.227.1 0:50:56:c0:0:1 UHLWI 0 10 lo0
    172.16.227.255 link#8 UHLWbI 2 666 vmnet1
    192.168.1 link#4 UCS 6 0 en0
    192.168.1 link#5 UCSI 2 0 en1
    192.168.1.1 0:26:bb:71:8a:d5 UHLWI 344 638 en0 316
    192.168.1.1 link#5 UHLWI 1 0 en1
    192.168.1.10 link#4 UHRLWI 0 32 en0
    192.168.1.40 localhost UHS 4 312 lo0
    I want to delete the routes starting 172.16.n.n and wonder how they got into the route table; what type of device they are; and how to remove them.
    I am just a standard user with some limited UNIX experience. I cannot switch user to root in a Mac Terminal screen, as I do not know what the 'root' SU password is. But I have administrative user rights on the Mac and the Router.
    Thanks,
    Don

    Yes.
    VMWare (and Parallels as well, for that matter) offer networking services in a variety of modes: Bridging, NAT and Host-only. To be able to connect VM's "internally" for NAT and Host-only networking, VMWare itself needs to provide something like a "virtual router" for each of those services.
    There are three private address spaces defined by RFC1918. 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. In your case, your standard internal IP addresses used on your network are in the 192.168.0.0/16 class and VMWare has chosen two addresses in the 172.16.0.0/12 range for vmnet1 and vmnet8.
    eliminating them will kill network connectivity for your VM's. Plus, the next time you reboot, VMWare will just recreate them anyway - you can see the kernel messages in the Console.

  • How to get the only the changed or newly added entries in AFTER SAVE.

    I have created table maintenance generated for a table,I want to get the newly added or changed entries while saving thats why im using AFTER SAVE event for the same,can anyone please tell me how to get the only the changed or newly added entries in AFTER SAVE.

    Hi,
    Welcome you post on the forum.
    I have moved your thread here because it is in English and should not in the language specific forum. What is your system version?
    Thanks,
    Gordon

Maybe you are looking for

  • How to know when loaded ??

    Hi all, I'm using the attached code in frame 1 to load the first picture picture of a series. VERY similar code on the "next and previous" buttons to load more pictures one by one from an array called "photos". Images are held locally on the server a

  • Auto-Increment

    I'm writing a FTP client application. Every time files are downloaded I need to update the issue number of the file. i.e. if the original file name was filename-a.txt, then the new name would be filename-b.txt. When i get to z, the next value needs t

  • How to calculate Number of trues

    Hi SDN, I had an info object characteristic which has values as True or False. i want to calculate total number of true's ...................how we can do this?? Thanks Tulsi

  • Skype says my webcam is in use

    Hi, It started occuring like a week ago. Skype (for desktop) is trying to load the video feed from my webcam (logitech C930e), but says after a while "Can't start video. Try closing other programs that might be using your webcam.".No other program is

  • HT204135 Error adding printer to airport express.

    I am trying to add an Epson SX425W to my Mac mini via an Airport express.  My Mac finds it but then says.. "Can't install the software because it is not currently available from the Software Update server" Im new to Macs, what does this meen please ?