infoLinux

route Command in Linux

The Unix or Linux route command displays and manipulate IP routing table for your system.

Linux router is a device which is basically used to determine the best way to route packets to a destination.

Sample syntax of route :

$ route

After running the command and see your command, it displays all existing routing table entries on our system.

It shows that if the destination is within the network range of 000.000.000.000 to 000.000.000.000, then the gateway is *, which is 000.000.000.000.

It is a special address which represents an invalid or non-existent destination.

Which are not within this IP range packets and it will be forwarded to default gateway, which further routes the packet

Displaying numerical IP address

So this command displays output in full numerical form.

Like syntax of numerical IP address :

# route -n

See your terminal after running the command, the numerical IP address is display.

Adding a default gateway

The network packets that are not within the network range are forward to the gateway. Now we can specify the gateway with the following command.

Sample syntax of default gateway :

# route add default gw <IP address>

Routing cache information

The Unix and Linux kernel maintains a routing cache table to route the packets faster. To list this information, use the following command.

Like syntax of cache information :

# route -Cn

14 thoughts on “route Command in Linux

  1. Your writing has a way of resonating with me on a deep level. I appreciate the honesty and authenticity you bring to every post. Thank you for sharing your journey with us.

  2. Attractive section of content I just stumbled upon your blog and in accession capital to assert that I get actually enjoyed account your blog posts Anyway I will be subscribing to your augment and even I achievement you access consistently fast

  3. Somebody essentially lend a hand to make significantly posts I might state That is the very first time I frequented your web page and up to now I surprised with the research you made to create this particular put up amazing Excellent job

  4. I just could not depart your web site prior to suggesting that I really loved the usual info an individual supply in your visitors Is gonna be back regularly to check up on new posts

  5. Your blog is a constant source of inspiration for me. Your passion for your subject matter is palpable, and it’s clear that you pour your heart and soul into every post. Keep up the incredible work!

  6. Your writing is like a breath of fresh air in the often stale world of online content. Your unique perspective and engaging style set you apart from the crowd. Thank you for sharing your talents with us.

  7. Merci pour cet excellent article. C’était vraiment un compte de divertissement. Il a l’air bien plus agréable de votre part. Mais comment pouvons-nous communiquer ?

  8. Thanks I have recently been looking for info about this subject for a while and yours is the greatest I have discovered so far However what in regards to the bottom line Are you certain in regards to the supply

  9. Your blog is a testament to your passion for your subject matter. Your enthusiasm is infectious, and it’s clear that you put your heart and soul into every post. Keep up the fantastic work!

  10. What i do not understood is in truth how you are not actually a lot more smartlyliked than you may be now You are very intelligent You realize therefore significantly in the case of this topic produced me individually imagine it from numerous numerous angles Its like men and women dont seem to be fascinated until it is one thing to do with Woman gaga Your own stuffs nice All the time care for it up

Leave a Reply

Your email address will not be published. Required fields are marked *