| Author |
Subnet masks on serial ports
|
|
| sauser 2001-06-12, 1:12 pm |
| why does serial0 and serial 1 ports need a subnet mask?
I thought that you need subnetmask only for the ports that have networks connected to them. | |
|
| They don't need subnet masks if you don't connect them to a network.
But serial ports (or any other interfaces) are most usefull when connected to a network... 
Terje | |
| sauser 2001-06-12, 4:47 pm |
| I actually thougth so
but when you configure an interface you still have to specify subnet nask or otherwise it will not accept it you know ip address command you need to specify ip address and subnet mask
so i was just checking
so basicaly it doe snot care about subnet mask if let's say serial1 is connected to other router? | |
| The Reamer 2001-06-12, 5:37 pm |
| The subnet mask is needed so the router(s) can determine if the subnet is local or remote. In the example you give of two routers being connected via the serial ports, the subnet mask is needed to determine what subnet and which host on that subnet.
If a router has two interfaces configured with ip addresses, like 172.16.16.1 255.255.240.0 and the other is 172.16.32.1 255.255.240.0. The router has to determine which portion of the address is network and which portion is host. Without the subnet masks in this example, they both appear to be on the same subnet.
HTH,
Reamer | |
| sauser 2001-06-12, 7:23 pm |
| i still don't wuite get it!
i thought that it goes like this!!
Let's say device on Ethernet0 port sends data to computer that is on another router but routers are connected through serial port!
Now i thought it goes like this
sending host makes anding process and determines that data has to be sent to router!
Then router picks up data makes anding process again and if everything is ok it checks its routing table to determine through which interface it can send out the data to the network of destination.
Why would router needs a subnetmask on it is serial port which is ocnnected to router?
I don't get it
tell me may be somehting is wrong with my scenario
thanks | |
| The Reamer 2001-06-12, 8:35 pm |
| Looking at your scenario, how is the router going to make its determination on which interface to send the packet? Without the subnet mask to help in knowing what part of the ip address is the network and which part is host, the router may think that the subnet is not local, but remote to it. Therefore sending the packet in a direction that you don't want it to go.
How about a similar scenario. This is not completely legal, but it's just an example. Let's say that you have a host with an ip address of 172.16.32.5 255.255.240.0. This host is connected to the e0 port on routerA. E0 had an ip address of 172.16.32.1 255.255.240.0. RouterA also has two other interfaces. E1 and s0. E1 has an ip address of 172.32.16.1 and s0 has an ip address of 172.32.32.1. If your host off of e0 is trying to send a packet to 172.32.33.1, which interface is this host sitting on. Is it connected to the router via e1 or s0? The subnet mask helps to identify which subnet the destination host belongs to.
HTH.
Reamer | |
| sauser 2001-06-12, 11:25 pm |
| I htink i get it now
thank you | |
| strikeattack 2001-06-13, 6:45 am |
| I think what sauser was asking is, if you have a point-to-point link (serial) to another router, and there are only two nodes within that subnet, why would you need a subnet mask since it is only going to be received by one host when transmitted out that interface anyway? When transmitted out the interface, we already know it is going to be local.
The answer is because IP needs a subnet mask. Period. Because IP was designed to interoperate with an assortment of technologies, it needs to be able to interoperate with all of them, even if you are only talking about two nodes in a point-to-point link. Quite simply, its just a rule. In order to speak IP, you need a 32-bit IP address and a 32-bit subnet mask at the BARE minimum.
The reason the subnet mask is still required is because lets say the serial link was 192.168.1.0/24 (24-bit mask). Let's also say that the router knew that the next hop was 192.168.1.100 for a packet. After looking up the routing table for the destined packet, the router will then look at its interfaces to determine which interface services a subnet that is within the ip boundary range of the next-hop. Without the subnet mask, it would have to guess as to which interface to use.
I hope that helps. |
|
|
|