Adding a Default Route

Now we need to create the route itself. To do this dynamically, we can use the route command, just as we did for adding the routes between our subnets. But this time we use the “default” keyword to signify that this is the default route:

xenon# route add default 172.35.63.1 1
xenon#

Checking with netstat will show that the routes have now been created: the first to the network that the default route is connected to, and the second to the default router itself. It's always worth remembering that we must have a route to and from the default router!

 xenon# netstat -rn Routing Table: Destination Gateway Flags Ref Use Interface ---------------- ---------------- ----- ----- ------ --------- 192.168.22.0 192.168.22.50 U 3 5 ...

Get Solaris™ Operating Environment Boot Camp now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.