Cisco
ip route
ip route local exit interface => admin distance of 0 like connected interface
e.g. on R1 router
ip route 10.10.30.0 255.255.255.0 10.10.20.2 or
ip route 10.10.30.0 255.255.255.0 s0
** Adding the permanent keyword to a static route statement will keep the static routes in the routing table even if the interface goes down
floating static route (Backup route)
ip route 10.10.30.0 255.255.255.0 s0
ip route 10.10.30.0 255.255.255.0 s0 91
when running eigrp which has a default AD of 90, eigrp route will appear in routing table and only when that route goes down will the floating static route appear. Serves as a backup route.
Juniper
set routing-options static route 10.10.30.0/24 next-hop 10.10.20.2
IPv6
Cisco - ipv6 route 2001:db8::/32 s0 fe80::1/64
Juniper - set routing-options rib inet6.0 static route 2001:200:20:1::1/128 next-hop 2001:200:30:2::2
Juniper
set routing-options static route 10.10.30.0/24 next-hop 10.10.20.2
IPv6
Cisco - ipv6 route 2001:db8::/32 s0 fe80::1/64
Juniper - set routing-options rib inet6.0 static route 2001:200:20:1::1/128 next-hop 2001:200:30:2::2