Networking, subnetting and router IP

210
12
So, I understand how to subnet a network and how IP address is calculated. But I am having problems with the router IP. Can anyone help me with the total scenario. Like I have an IP, suppose with subnet mask 255.255.255.0..... Now I'm going to make subnet mask upto 26 bit. Now help me with the IP addresses. Is the router address is a host address within the network or what? I am a lot confused after this part. (I understand the concept that 4 subnets are created here... But what and how the addresses of router/switch/other devices that helps in subnetting changes?)

N.B. Any link will be highly appreciated too..
 
32,561
8,450
255.255.255.0 in binary is just 11111111.11111111.11111111.00000000. With 26 bits instead of 24 you would get 11111111.11111111.11111111.11000000 or 255.255.255.192
That gives you 4 blocks within the given 24 bit prefix: From 0 to 63, from 64 to 127, from 128 to 191 and from 192 to 255.
 
210
12
yes I understand the calculation. My question is, if I use 1 router for the subnetting then should the default gateway be the network address or first host address?
What about the IP of the interfaces??

I haven't yet watched the video. Watching it now. Maybe it will answer the question :)
 
210
12
You can help me with an example like:

Suppose the network given to an institution has an IP address like 168.192.10.0 (Am I going correct? Is it given this way?)
The subnet mask is 255.255.255.0

So the Network address is 168.192.10.0 and host can be 256-2=254 devices. Now if I want to divide it into 2 different blocks with a subnet mask 255.255.255.128
then we can give 0-127 network to 126 devices and 128-255 to 126 devices.

Then how to distribute this? I mean, no calculation, the real scenario? Like you are a network engineer.. what intermediary devices will you use and what are the default gateway IP and interface IPs?

It is better if you help me with the scenario for 2/4/8 blocks that is subnetted /25, /26 and /27. Cause there seems to be more router to be used here.

:)
 

QuantumQuest

Science Advisor
Insights Author
Gold Member
830
429
Then how to distribute this? I mean, no calculation, the real scenario? Like you are a network engineer.. what intermediary devices will you use and what are the default gateway IP and interface IPs?
This amounts to the question: why are you doing subnetting? So begin from there. Is subnetting done for structuring the network, for using different technologies (e.g. Ethernet, WAN etc.), retaining a space of addresses or most commonly controlling network traffic? Then, by using the appropriate devices at the corresponding level of the TCP/IP stack and the appropriate subnet mask(s) you'll achieve the desired configuration.

For subnet masking, you apply a mask in order to be able to recognize the network and node parts of an IP address, with network bits represented by 1's in the mask and node bits represented by 0's. Applying a bitwise logical AND between IP and subnet mask you get the network address. You may already know all this but I mention it just in case you miss something. Now, adding more bits to the default subnet mask (i.e. to 255.0.0.0 for Class A, 255.255.0.0 for Class B and
255.255.255.0 for Class C) you do further subnetting, with the constraints of node addresses all 0's and all 1's occupied for the local network and broadcast address respectively - although these can be used in newer standards. The number of subnets is calculated using the formula ##2^n - 2## where ##n## is the number of bits that you have additionally used. Now, if you multiply the number of subnets with the number of nodes that are available per subnet you get the total number of nodes available for the combination of Class and subnet mask.
 
210
12
My question was what would be the IP of the router if I want to subnet with a router? Or is it done by a router? I mean, how to subnet?? Not calculations. For example suppose in a college there are 2 boys hostel and 2 girls hostel. So a network is divided into 4 blocks to distribute accordingly. Now what would be the scenario. What IP number should I configure to the routers and the interfaces?
 

QuantumQuest

Science Advisor
Insights Author
Gold Member
830
429
My question was what would be the IP of the router if I want to subnet with a router? Or is it done by a router? I mean, how to subnet??
In order to give a helpful answer I have to ask you: do you know what is the role of a router and the functions it performs? It basically forwards data packets between networks. I recommend taking a look at Wikipedia for more. Now, the IP address that router has depends on the brand of the router. You can see the IP address of a router using any computer connected to it, by a simple command (e.g. on a Windows machine run command line and type: ipconfig). Configuring a router is a more involved process, for example take a look at this Cisco page.

For example suppose in a college there are 2 boys hostel and 2 girls hostel. So a network is divided into 4 blocks to distribute accordingly. Now what would be the scenario. What IP number should I configure to the routers and the interfaces?
Additionally, the answer to this depends on how you'll do the subnetting.
 
210
12
Not asking how the IP of a router is found out. Asking what IP would you configure to it as a network enggineer? Suppose like packet tracer. I'm not sure if you are really understanding my question. :s
 
210
12
My specific question says: In the given scenario I told before, how would you subnet them using a router and what default gateway and interface IP you can give?
 

Svein

Science Advisor
Insights Author
1,923
579
I am not quite sure what you are asking, but my answer would be: Let the DHCP server in the router take care of it.

To be precise: You should never have to worry about subnets, except when you have two physically separated networks*. Then you need a router for each subnet. Assign a different address pool to each router and you are (almost) done. In order enable data transmission between the subnets, the "outside" of the two routers must be connected in a separate network.

*Yes, I know that IEEE 802.1D allows virtual subnets, but let us stay away from that issue for now.
 
210
12
hmm... so I give the routers one of those IP's, I see
 
210
12
what is the default gateway IP? same for both the routers??
 

Svein

Science Advisor
Insights Author
1,923
579
what is the default gateway IP? same for both the routers??
That depends. Usually the answer is "No!", but modern routers do something called NAT (Network Address Translation) which means that they present just one network address to the external world. Leaving that trick aside, the whole reason for subnetting is to keep local traffic local and (hopefully) reduce the amount of traffic between the subnets. Thus:

Assume that you want to divide your network into two distinct subnets. The easiest way is to assign 256 IP addresses to each subnet, which means that you use a network mask of 255.255.255.000. Then you start by assigning one address block to each subnet (say 192.168.11.xxx to one subnet and 192.168.12.xxx to the other). Then you usually assign the lowest allowable address in the block to the "inside" of the router (which is 001, not 000) and assign most of the remaining addresses in the block to the DHCP server in the router (for example 192.168.11.16 to 192.168.11.126). This leaves a small block of IP addresses to be manually assigned to servers and printers.

Remember: You never assign 192.168.11.000 or 192.168.11.255 to anything! 192.168.11.00 is the address of the subnet, and 192.168.11.255 is a local broadcast address.

After you have done this, you have created two subnets, but they cannot talk to each other (and they are not allowed on the internet, since 192.168.XXX.YYY is only allowed on local networks). So, taking the classic example further, you define a new network (192.168.99.xxx) and connect both routers to that net. Assign IP addresses to the routers (for example 192.168.99.001 and 192.168.99.002) and you have a connection between the subnets - but you still are not allowed to connect to the Internet. In order to do this, you need two things: A NAT-capable router on one of the networks and an internet connection. The internet connection assigns one legal IP address to your complete network setup and handles the internal addressing.
 

QuantumQuest

Science Advisor
Insights Author
Gold Member
830
429
Not asking how the IP of a router is found out. Asking what IP would you configure to it as a network enggineer? Suppose like packet tracer. I'm not sure if you are really understanding my question. :s
Although I have formal education on computer networks, I don't understand it. Configure as a network engineer what and what for? Do you know the basics of networking? Did you read my posts?

My specific question says: In the given scenario I told before, how would you subnet them using a router and what default gateway and interface IP you can give?
As I previously told you, router has a default IP address (of the form 192.168.x.x). Now, if you want to configure the router itself, I also provided you a Cisco link to get the gist of it. Then it is a matter of how many routers you need and what kind of subnets you want to create.

I think that you rather don't understand what I wrote in my previous posts in the thread.
 
210
12
Assume that you want to divide your network into two distinct subnets. The easiest way is to assign 256 IP addresses to each subnet, which means that you use a network mask of 255.255.255.000. Then you start by assigning one address block to each subnet (say 192.168.11.xxx to one subnet and 192.168.12.xxx to the other). Then you usually assign the lowest allowable address in the block to the "inside" of the router (which is 001, not 000) and assign most of the remaining addresses in the block to the DHCP server in the router (for example 192.168.11.16 to 192.168.11.126). This leaves a small block of IP addresses to be manually assigned to servers and printers.
That kinda answers my question. But I'm confused at one part... I divided it to 2 distinct subnets, So, the original subnet mask was /23 right? When I created two distinct subnets, the local subnet mask becomes /24, though externally to the world it is /23. And in NAT system the routers default gateway is the same. And what do you mean by "inside" of router? Is it the router address? Isn't the default gateway and router address same?
 
210
12
Do you know the basics of networking?
I am still learning. The latest basic thing I learnt is how to subnet, and how to configure a router. I tried configuring router IP on a network in packet tracer, and it did not go well, so I asked the question, cause I am confused what IP addresses should I give to a router from my set of IP addresses.
 

Svein

Science Advisor
Insights Author
1,923
579
That kinda answers my question. But I'm confused at one part... I divided it to 2 distinct subnets, So, the original subnet mask was /23 right? When I created two distinct subnets, the local subnet mask becomes /24, though externally to the world it is /23. And in NAT system the routers default gateway is the same. And what do you mean by "inside" of router? Is it the router address? Isn't the default gateway and router address same?
The "inside" of the router is the side that is connected to the subnet.
Do not bother about the subnet mask. If you have less than 250 hosts on the subnet, let it stay at 255.255.255.0
If you create a third subnet consisting of the "outside" of the two subnet routers and the "inside" of a NAT-capable router (withe the "outside" connected to the internet), your network system should work and the hosts should be capable of reaching the Internet.
 
210
12
You mean the interface by inside? like fastEthernet 0/0?

What is the outside?
 

Svein

Science Advisor
Insights Author
1,923
579
Take a look at this figure.
2012-11-24-text8914.png

The network setup in the figure is different from the setup I described, but it will work. Looking at the figure, you see that the routers have a "WAN" port and several "LAN" ports. The "LAN" ports are on the "inside" and the "WAN" ports are the "outside". You save one router with this setup, since "Router 1" uses NAT and therefore can interface to the Internet.
 

Attachments

So, I understand how to subnet a network and how IP address is calculated. But I am having problems with the router IP. Can anyone help me with the total scenario. Like I have an IP, suppose with subnet mask 255.255.255.0..... Now I'm going to make subnet mask upto 26 bit. Now help me with the IP addresses. Is the router address is a host address within the network or what? I am a lot confused after this part. (I understand the concept that 4 subnets are created here... But what and how the addresses of router/switch/other devices that helps in subnetting changes?)

N.B. Any link will be highly appreciated too..


This is helpful and also you read articles on such topics here is a website that you can use for such perpose - https://192168ips.com/
 

Want to reply to this thread?

"Networking, subnetting and router IP" You must log in or register to reply here.

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top