What is causing the following line on Static Route

Hi,
I’m playing around with Static Route, and when running the command:
show ip route
I get the following results:

S>* 0.0.0.0/0 [210/0] via 10.150.149.1, eth0
C>* 10.150.149.0/24 is directly connected, eth0
C>* 127.0.0.0/8 is directly connected, lo
C>* 192.168.1.0/24 is directly connected, eth1

The 3 bottom lines i get, but i’m trying to understand what causes the first line to be. Currently i have no Static Route, and as far as i understand, the 0.0.0.0./0 means that i can basically go to outside networks and do pings and such. But… if i want to use Static Route, I don’t think I would like that raw to appear (because i want to control the possible routes), so i’m trying to understand: 1. What created her?. 2. how do i delete it?.

Small update: Is it possible that because my eth0 gets DHCP, then the route to all outside network came from the DHCP server?.

Thanks.

Hi
that is default route

Hi Syncer,
First, thanks for your reply.

I just had a thought… => Can this line be generated because the eth0 gets DHCP address? (and then the default route is determined by dhcp server?).
One more question: In case I set up static route (as said, currently i don’t have one) => will the “default route” be gone? (and until i do, it will always stay?)

Thanks again!.

Yes, it is caused by your ETH0 getting a DHCP address. Your ETH0 was handed a GATEWAY IP along with a SUBNET. So it knows that any traffic coming from that IP goes to it’s gateway.

static routes are for deciding you want a particular client or range of clients (subnet) to route through a different connection or gateway.

If you set up a static route, it does not overwrite the default route.

First, thanks for clerifaying it up for me. but now i’m confused:

How do you achive what you just said? (“you want a particular client or range of clients (subnet) to route through a different connection or gateway”).
Based on the command i saw, which is this one: “set protocols static route 11.0.0.0/8 next-hop 172.16.0.26” => I don’t see in it any where you can say: “i want only hosts to go throw this or that”. can you please supply few examples of achieving that?.

In addition: you said that it does not overwrite the default route. what if you want that route to be gone? (assuming you want to control all the packets and who goes where) => how do you disable / remove it? (even thou it comes from the DHCP) ?

Thanks again!.

by stating “set protocols static route 11.0.0.0/8 next-hop 172.16.0.26” you are saying "anything in this subnet needs to hit 172.16.0.26 as it’s next hop. If you wanted ONE host to use a different gateway, you just say 11.0.0.26 next-hop 172.16.0.26 or something similar

Deleting the default route will require setting the SYSTEM gateway manually.

It seems like you have a lot of basic networking questions and are trying to learn on VyOS. Perhaps you should check out some networking basics books and labs to perform in your network.

you are right :slight_smile: so far, while learning the vyos subject, i’m learning “on the fly” the entire networking part.
It takes some time, but i’m getting there :slight_smile: thanks for the explenation!. you’ve helped alot!.