1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Adding route on Solaris

Discussion in 'Shell Script' started by csmgsarma, Aug 28, 2010.

  1. csmgsarma

    csmgsarma New Member

    Joined:
    Aug 28, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi all,
    I want to add a route on Solaris machine for each IP I am pinging. I am added static route for each IP as here:

    route add -net 10.116.80.21 -netmask 255.255.255.255 10.116.80.18[interface id 10.116.80.21, gateway = 10.116.80.18]
    route add -net 10.116.80.23 -netmask 255.255.255.255 10.116.80.18
    route add -net 10.116.80.25 -netmask 255.255.255.255 10.116.80.18
    route add -net 10.116.80.27 -netmask 255.255.255.255 10.116.80.18
    route add -net 10.116.80.29 -netmask 255.255.255.255 10.116.80.18


    Actually I know that any interface ip in the network 10.116.80.0 needs to be routed to the gateway 10.116.80.18. so I tried this

    route add net 10.116.80.0 10.116.80.18

    But the former works and the later doesn't. I want to know what is going wrong here?
    The address scheme I am following is Class C[mask = 255.255.255.0]

    Any suggestions would be greatly appreciated.
    Cheers
    Sarma
     

Share This Page