leumas
asked on
What's netmask ?
1. I run "netstat -rn" command , but cannot see which netmask it is ? How to see the netmask ?or which command can tell me ?
2. Suppose,When I use "route add -net 10.1.0.0 -gateway 203.155.0.1". What is the netmask of 10.1.0.0 in this case ?
2. Suppose,When I use "route add -net 10.1.0.0 -gateway 203.155.0.1". What is the netmask of 10.1.0.0 in this case ?
ASKER
Sorry that I don't say it clear. I mean the netmask of additional net added by "route add -net 10.1.0.0 -gateway 203.155.0.1 So I cannot see it by "ifconfig -a" command.
Still the same, your system doesnt care.
If your /etc/netmasks file doesnt have an entry
setting a mask on the 10. net it will be treated as a class A network with a mask of ff000000 (255.0.0.0)
But the mask isnt included in the packages you send so your system really doesnt care.
Everything you send that has an IP-addr of 10.xx.xx.xx will be sent to the gateway you have specified.
On the gateway (router) 203.155.0.1 there is either another pointer where to send it or an attached interface with this network number.
So determining what part is the net and what part is the host is done at the reciving end.
If your /etc/netmasks file doesnt have an entry
setting a mask on the 10. net it will be treated as a class A network with a mask of ff000000 (255.0.0.0)
But the mask isnt included in the packages you send so your system really doesnt care.
Everything you send that has an IP-addr of 10.xx.xx.xx will be sent to the gateway you have specified.
On the gateway (router) 203.155.0.1 there is either another pointer where to send it or an attached interface with this network number.
So determining what part is the net and what part is the host is done at the reciving end.
ASKER
That's mean.It depends on /etc/netmasks file. And I cannot use any command to show what netmask it is( except the the netmask of the real interface's ip address ), is that right ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks besky
RIP v1 has no idea about netmasks. The only vaild thing here is the mask on your net.
From your prospective the 10.xx net is a class A network.
When the package arrive to the 10.xxx net rotuing there will be based on the netmask on that net.
HTH