Networking, subnetting and router IP

In summary, the conversation discusses subnetting a network with a subnet mask of 255.255.255.0 and creating 4 subnets with a subnet mask of 255.255.255.192. The individuals are confused about the IP addresses of the router and other devices in the network. The conversation also mentions using a router to subnet and asks for an example of how to subnet a college network with 2 boys hostels and 2 girls hostels. The expert suggests considering the purpose of subnetting and using the appropriate devices at the corresponding level of the TCP/IP stack and subnet mask. They also mention the role of a router in forwarding data packets between networks and suggest letting the DHCP server in the router handle the subnetting
  • #1
fireflies
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..
 
Technology news on Phys.org
  • #3
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.
 
  • #4
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 :)
 
  • #5
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.

:)
 
  • #6
fireflies said:
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.
 
  • #7
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?
 
  • #8
fireflies said:
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.

fireflies said:
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.
 
  • #9
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
 
  • #10
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?
 
  • #11
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.
 
  • #12
hmm... so I give the routers one of those IP's, I see
 
  • #13
what is the default gateway IP? same for both the routers??
 
  • #14
fireflies said:
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.
 
  • #15
fireflies said:
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?

fireflies said:
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.
 
  • #16
Svein said:
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?
 
  • #17
QuantumQuest said:
Do you know the basics of networking?

I am still learning. The latest basic thing I learned 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.
 
  • #18
fireflies said:
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.
 
  • Like
Likes fireflies
  • #19
You mean the interface by inside? like fastEthernet 0/0?

What is the outside?
 
  • #20
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

  • 2012-11-24-text8914.png
    2012-11-24-text8914.png
    17.5 KB · Views: 1,446
  • #21
fireflies said:
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/
 

Q: What is networking?

Networking is the process of connecting multiple devices or computers together to share data and resources. This can be done through physical cables or wireless connections.

Q: What is subnetting?

Subnetting is the process of dividing a larger network into smaller subnetworks, or subnets. This allows for more efficient use of IP addresses and better management of network traffic.

Q: What is a router IP?

A router IP, or Internet Protocol, is a numerical address assigned to a router on a network. It is used to identify and route data between different networks.

Q: How do I find my router's IP address?

The easiest way to find your router's IP address is to open the command prompt on a Windows computer and type "ipconfig". The Default Gateway listed will be your router's IP address.

Q: Why is subnetting important?

Subnetting is important because it allows for better organization and management of a network. It also helps to improve network performance and security by limiting the amount of network traffic and providing more efficient use of IP addresses.

Similar threads

  • Programming and Computer Science
Replies
1
Views
767
Replies
2
Views
773
  • Programming and Computer Science
Replies
1
Views
741
  • Engineering and Comp Sci Homework Help
Replies
3
Views
3K
Replies
13
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
619
Replies
3
Views
2K
Replies
16
Views
4K
  • Computing and Technology
Replies
4
Views
1K
  • Computing and Technology
Replies
27
Views
2K
Back
Top