Some questions about routing and IP
by Jason.nix from LinuxQuestions.org on (#6D6WV)
Hello,
I have some questions:
1- How do I find the gateway of a specific NIC? For example:
Code:# ip route show
default via 10.0.2.2 dev enp0s3
10.0.2.0/24 dev enp0s3 proto kernel scope link src 10.0.2.15
10.0.3.0/24 dev enp0s8 proto kernel scope link src 10.0.3.15How to find the default gateway of enp0s8?
2- I wrote some routing tables like the below:
Code:# ip route add 127.0.0.0/8 dev lo table line1
# ip route add 10.0.2.0/24 dev enp0s3 src 10.0.2.15 table line1
# ip route add 10.0.3.0/24 dev enp0s8 src 10.0.3.15 table line1
...How to save them?
3- Consider the following IP address:
Code:INTERFACE IP ADDRESS SUBNET MASK GATEWAY
enp0s3 142.154.64.7 255.255.255.0 142.154.64.1What is 142.154.64.0/24?
Thank you.
I have some questions:
1- How do I find the gateway of a specific NIC? For example:
Code:# ip route show
default via 10.0.2.2 dev enp0s3
10.0.2.0/24 dev enp0s3 proto kernel scope link src 10.0.2.15
10.0.3.0/24 dev enp0s8 proto kernel scope link src 10.0.3.15How to find the default gateway of enp0s8?
2- I wrote some routing tables like the below:
Code:# ip route add 127.0.0.0/8 dev lo table line1
# ip route add 10.0.2.0/24 dev enp0s3 src 10.0.2.15 table line1
# ip route add 10.0.3.0/24 dev enp0s8 src 10.0.3.15 table line1
...How to save them?
3- Consider the following IP address:
Code:INTERFACE IP ADDRESS SUBNET MASK GATEWAY
enp0s3 142.154.64.7 255.255.255.0 142.154.64.1What is 142.154.64.0/24?
Thank you.