• RSS
  • Twitter
  • FaceBook

Security Forums

Log in

FAQ | Search | Usergroups | Profile | Register | RSS | Posting Guidelines | Recent Posts

Couple Questions

Users browsing this topic:0 Security Fans, 0 Stealth Security Fans
Registered Security Fans: None
Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Networking

View previous topic :: View next topic  
Author Message
DUI
Just Arrived
Just Arrived


Joined: 23 Jan 2005
Posts: 0


Offline

PostPosted: Thu Feb 24, 2005 8:14 am    Post subject: Couple Questions Reply with quote

I running into a bit of trouble in my class, I would appreciate it if you guys guide me in the right direction.
How do I find out the default gateway in the bookworld when I'm given an IP address and subnet mask?
Here'sa question that giving me some trouble. An ISP gives a company the IP 64.87.25.14. I have NAT installed on a router and has given the IP 172.16.0.1/20 on one side. I have to split the network into 5 subnets. I also have to give the IP, Subnet mask, and default gateway for one computer on each subnet. I'll only give what I got for subnet 1. The IP can be between 172.16.8.1-172.16.15.254. I get the subnet mask 255.255.240.0 from the ip 172.16.0.1/20 but I'm not sure how I would have 5 different subnet masks. Would it be 255.255.240.8 for floor 1 and for floor 2 255.255.240.16. And would the defualt gateway 172.16.8.0. I'm hoping you guys could explain some of this if I'm wrong. I feel like some of it is right if not all, but I'm paranoid that I actually have no f-ing clue what I'm doing. Thanks in advance.

-Bob
Back to top
View user's profile Send private message
Ants
Just Arrived
Just Arrived


Joined: 07 Nov 2004
Posts: 0
Location: U.K.

Offline

PostPosted: Thu Feb 24, 2005 2:49 pm    Post subject: Reply with quote

Hi Bob.

I’ll try to help as much as I can…..

DUI wrote:

How do I find out the default gateway in the bookworld when I'm given an IP address and subnet mask?


The chose of gateway is at the discresion of the network designer. If you are given an IP and SNM in a book there is no way you can guess the gateway, but many people select the first or last IP in the range. So, as an example if you are given 172.16.0.0/24 (255.255.255.0) then ifs often a case that the GW will be either 172.16.0.1 or 172.16.0.254, but there is nothing to stop it being 172.16.0.83 or any other address in that subnet. In my company we tend to put the gateway at the top of the range along with other networking equipment such as switches, we then start the users from the bottom of the range.

DUI wrote:

Here'sa question that giving me some trouble. An ISP gives a company the IP 64.87.25.14. I have NAT installed on a router and has given the IP 172.16.0.1/20 on one side. I have to split the network into 5 subnets. I also have to give the IP, Subnet mask, and default gateway for one computer on each subnet. I'll only give what I got for subnet 1. The IP can be between 172.16.8.1-172.16.15.254. I get the subnet mask 255.255.240.0 from the ip 172.16.0.1/20 but I'm not sure how I would have 5 different subnet masks. Would it be 255.255.240.8 for floor 1 and for floor 2 255.255.240.16. And would the defualt gateway 172.16.8.0. I'm hoping you guys could explain some of this if I'm wrong.


OK, your internal IP range is 172.16.0.1/20 which, as you say is 255.255.240.0 so this means the first IP in the range is 172.16.0.1 and the last one is 172.16.15.254. You don’t state how many hosts you need per subnet so I will assume you want the maximum number of hosts.

Subnet1.
172.16.0.0/23
Example Host1:
IP: 172.16.0.1 SNM: 255.255.254.0 DG: 172.16.1.254.

Subnet2.
172.16.2.0/23
Example Host2:
IP: 172.16.2.1 SNM:255.255.254.0 DG:172.16.3.254

Subnet3.
172.16.4.0/23
Example Host3:
IP: 172.16.4.1 SNM: 255.255.254.0 DG:172.16.5.254

Subnet4:
172.16.6.0/23
Example Host4:
IP: 172.16.6.1 SNM: 255.255.254.0 DG:172.16.7.254

Subnet5:
172.16.8.0/23
Example Host5:
IP: 172.16.8.1 SNM: 255.255.254.0 DG:172.16.9.254

Of course you also have three spare subnets left for future expansion as a bonus (172.16.10.0/23, 172.16.12.0/23 and 172.16.14.0/23). Each subnet has 512 IP addresses of which you can use 510. I have selected the highest usable address in each subnet as the gateway. I am assuming the router has multiple internal interfaces to accommodate each network – that’s not too clear from your post.

So, by way of an explanation…..

Your original internal network was 172.16.0.0/20, the ‘/20’ gives you a 20 bit SNM, 255.255.240.0 which in binary is…….

11111111.11111111.11110000.00000000 = 255.255.240.0

Currently your mask means that the first two and half of the third octet define the network and the second half of the third octet and the fourth define the hosts. This gives you 16x255 potential hosts but we want to divide this into five smaller subnets. To do this we need to alter extend the number of 1’s to accommodate five new networks. The binary for five is 101 which would make the third octet 11111010. Now although some may say this is OK, its not. A SNM, when displayed in binary should not contain any 0’s and the 1’s should be continuous and so we opt for the addition of three 111’s which yields 11111110 for the third octet. This now means our SNM is…

11111111.11111111.11111110.00000000 = 255.255.254.0

As you can see, we has ‘stolen’ three bits from the hosts and given them to the network portion of the mask so each new subnet can only contain nine bits worth of hosts which is 512, but we get eight subnets which accommodates your requirements.

The first four bits of the third octet must be zero, as defined by the original IP and SNM: 172.16.0.0 255.255.240(11110000).0.

I’ll break down a couple of the new networks so you can see what’s going on.

Subnet1.
172.16.0.0/23
Example Host1:
IP: 172.16.0.1 SNM: 255.255.254.0 DG: 172.16.1.254.

Lets ignore the first two octets as they never change.

11111110.00000000

The three high lighted bits now represent the subnet so it’s logical to start with zero, 000. The last bit of the third octet is part of the hosts portion of the address so if we look at the range of hosts in binary we see….

00000000.00000000 = 0.0
00000001.11111111 = 1.255

now we cant use 0.0 or 1.255 so the actual range we have for hosts is…

00000000.00000001 = 0.1 (the first host)
00000001.11111110 = 1.254 (the gateway)


Lets look at subnet2:

Subnet2.
172.16.2.0/23
Example Host2:
IP: 172.16.2.1 SNM:255.255.254.0 DG:172.16.3.254

11111110.00000000

Again, the subnet is defined by the highlighted bits and so this is the next subnet so its logical to choose one (001) so we can now see that the third octet is 00000010. this means that when we look at the range of the subnet we get….

00000010.00000000 = 2.0
00000011.11111111 = 3.255

and like the previous subnet the top and bottom addresses cant be used for hosts so this gives a useable range of 2.1 to 3.254.

each subnet continues in the same way…….

Subnet1:
00000000.00000000 = 0.0
00000001.11111111 = 1.255

Subnet2:
00000010.00000000 = 2.0
00000011.11111111 = 3.255

Subnet3:
00000100.00000000 = 4.0
00000101.11111111 = 5.255

Subnet4:
00000110.00000000 = 6.0
00000111.11111111 = 7.255

Subnet5:
00001000.00000000 = 8.0
00001001.11111111 = 9.255

As previously stated you have three extra subnets which are not used.

I hope that helps – it’s a bit long winded, but hell, its snowing outside and I am bored!! Very Happy

Just spotted mpkn3rd’s reply, we may have interpreted the question differently, but I guess its always good to have multiple options.

Cheers, Ants.
Back to top
View user's profile Send private message
Ants
Just Arrived
Just Arrived


Joined: 07 Nov 2004
Posts: 0
Location: U.K.

Offline

PostPosted: Thu Feb 24, 2005 3:56 pm    Post subject: Reply with quote

Yes, I am really basing my post on the assumption that if the original network is 172.16.0.0/20 then it’s that range which should be subneted down which means the new subnets can’t have an address beyond 172.16.15.255. Any address above this would lie outside of the original range, as defined by the 20bit SNM.

The rest of the UK appears to be in turmoil due to the snow, but its hardly affecting my area. Luckily I am on holiday for two weeks so it means I get to stay in bed whilst the rest of the country crawls to work!! Hehe!! Very Happy
Back to top
View user's profile Send private message
DUI
Just Arrived
Just Arrived


Joined: 23 Jan 2005
Posts: 0


Offline

PostPosted: Thu Feb 24, 2005 4:55 pm    Post subject: Reply with quote

Thank alot that post really helped, it answered all the questions I needed answered. Now I have to run down the street to catch my bus. Thanks again.

-bob
Back to top
View user's profile Send private message
Ants
Just Arrived
Just Arrived


Joined: 07 Nov 2004
Posts: 0
Location: U.K.

Offline

PostPosted: Thu Feb 24, 2005 6:47 pm    Post subject: Reply with quote

Hi, mpkn3rd.

AS I understand it, the original network looks something like this…

Code:

     |Internet Faceing
     |Interface, 64.87.25.14
  -------
  |     |Router
  |     |
  -------
     |Internal Interface, 172.16.0.1/20
     |
  ------------------------------
         Internal Network 172.16.0.0/20


Bob wants to subnet the 172.16.0.0/20 network into 5 smaller subnets, the topology could vary, but it could possibly look like this.

Code:

     |Internet Faceing
     |Interface, 64.87.25.14
  -------
  |     |Router1
  |     | ip route 172.16.0.0 255.255.240.0 172.16.1.253
  -------
     |172.16.1.254/23
     |
     |Subnet1, 172.16.0.0/23
     |------------------------------
     |172.16.1.253/23
  -------
  |     |Router2
  |     |
  -------
     |172.16.3.254/23
     |
     |Subnet2, 172.16.2.0/23
     |------------------------------
     |172.16.3.253/23
  -------
  |     |Router3
  |     |
  -------
     |172.16.5.254/23
     |
     |Subnet3, 172.16.4.0/23
     |------------------------------
     |172.16.5.253/23
  -------
  |     |Router4
  |     |
  -------
     |172.16.7.254/23
     |
     |Subnet4, 172.16.6.0/23
     |-----------------------------
     |172.16.7.253/23
  -------
  |     |Router5
  |     |
  -------
     |172.16.9.254/23
     |
     |Subnet5, 172.16.8.0/23


In my original post I said that the gateways would be the highest usable address in the new subnets, so I have stuck with that here and so the interface that connects to the original interface not only changes its mask but also its address, but there is nothing stopping us using the 172.16.0.1/23 as its address.

You have to change the first subnet other wise it would over lap the new subnets and cause routing problems. If we are using a routing protocol then the routers would learn the routes, but if not then we would have to enter the static routes. If we take router1 and imagine it’s a Cisco router then clearly we need to tell it the route to the four other subnets..

ip route 172.16.2.0 255.255.254.0 172.16.1.253 //route to Subnet2
ip route 172.16.4.0 255.255.254.0 172.16.1.253 //route to Subnet3
ip route 172.16.6.0 255.255.254.0 172.16.1.253 //route to Subnet4
ip route 172.16.8.0 255.255.254.0 172.16.1.253 //route to Subnet5
ip route 0.0.0.0 0.0.0.0 64.87.25.14 // route to the Internet for remaining traffic.

It’s a bit long winded so you could use route summarisation to combine the four routes into one….

ip route 172.16.2.0 255.255.240.0 172.16.1.253 //route to all 172.16.x.x subnets

Of course this only applies if the route to all the 172.16 subnets is via the same next hop.

Not sure is that quite answers your question as I am still working with some assumptions.

Cheers, Ants.
Back to top
View user's profile Send private message
Ants
Just Arrived
Just Arrived


Joined: 07 Nov 2004
Posts: 0
Location: U.K.

Offline

PostPosted: Thu Feb 24, 2005 8:36 pm    Post subject: Reply with quote

Hi.

I am more than happy to chat.

Yes, I changed that address to 172.16.1.254/23 but it could have remained 172.16.0.1 although the SNM is altered to /23 and so the SNM of all the hosts on that network would have to change too. If the SNM of the internal route interface did not change then any traffic destined for the newly created subnets would not be routed to the next router as router1 would consider these addresses to be contained on the subnet connected to its interface.

mpkn3rd wrote:
And that he was to publish default gateways for each subnet. I feel that your approach is correct, but is it using routing tables and not default gateways?


Any host with in the newly created subnets would have to be given IP/SNM with in that subnet and they would use the local router as their gateway, for instance a host in subnet2 would use the IP address of Router2 as its default gateway, so host 172.16.2.30 would have a SNM of 255.255.254.0 and a DG of 172.16.3.254. Router2 would have a default route of 172.16.1.254 (Router1) and also static routes to Subnets3,4 and 5 via 172.16.5.253 (Router3). If we look at Router5, it only needs one route, a default route which would be via Router4, 172.16.7.254.

In short, each router has both static routes to 172.16.x.x subnets (except router 5 which doesn’t need one) and also default routes of the next router down the line, so Router4 has a default route of Router3. We do this because we assume that if an IP address is not known to our the internal routers then it must be an Internet IP address and so we want it to find its way out onto the Internet rather than getting lost or dropped inside our network. This is why each router passes unknown IP’s down the line to the Internet facing router.

This would also hold true if we employed a routing protocol – each router would know the route to all the other internal routers, but would not know the way to an external network and so Router2 could be given a default route to 0.0.0.0 (any) via Router1, and then told to redistribute that route via the chosen routing protocol which would mean that all the other routers would know to pass data to Router1 if they didn’t know the router to a particular address.

Hope that help Very Happy

Cheers, Ants.
Back to top
View user's profile Send private message
DUI
Just Arrived
Just Arrived


Joined: 23 Jan 2005
Posts: 0


Offline

PostPosted: Fri Feb 25, 2005 6:46 am    Post subject: Reply with quote

Ok , I have read all of the posts, I briefly read through them this morning. What I noticed is that mpkn3rd's post seemed more familiar, as far as the subnetting. For instance the subnets being 172.16.16.0, 172.16.32.0 and so on. Its true that I'm usuing only one router. I looked at Ants response and I recall learning nothing about borrowing 3 bits from the host making it /23. Maybe you can explain why I have to do this. MAybe I am misunderstanding Network ID and Host/network ID. Wouldn't I have 14 subnets with 172.16.0.1/20, or am I confusing that with network ID's I was thinking they were the same. And as far as not being able to go over the 16 in 172.16.0.1 I'm not too clear on. Sorry if these questions are a bit basic I just finished learning this and I want to make sure I have no more questions when I'm done this course.


-Bob
Back to top
View user's profile Send private message
Ants
Just Arrived
Just Arrived


Joined: 07 Nov 2004
Posts: 0
Location: U.K.

Offline

PostPosted: Fri Feb 25, 2005 1:28 pm    Post subject: Reply with quote

Good morning gents,

Bob, your original post stated that you have a router that connects to the Internet, it has an internal interface 172.16.0.1/20 (SNM 255.255.240.0). This means that the network portion of the IP addresses is 20 bits long and the host portion is 12 bits.

Code:

11111111.11111111.11110000.00000000
NNNNNNNN.NNNNNNNN.NNNNHHHH.HHHHHHHH
255     .255     .240     .0

N=Network bit
H=Host Bit


Having read the initial post I picked up the key phrase ‘I have to split the network into 5 subnets’. From this I concluded that the initial subnet, 172.16.0.0/20 had to be split. If one simply creates new subnets, using the same mask then this is not splitting the original mask, its creating new subnets.

For instance 172.16.16.0/20 or 172.16.64.0/20 are new subnets that lie outside the original subnet rather than new subnets that have been created by splitting the original subnet.

I guess like so much in networking and I.T. its vital to have all the nessacery information about the problem one is actually trying to solve, other wise, as we have seen its very easy to have several solutions, some or all of which may be right or wrong.

If you are using only one router then I assume you have multiple interfaces to accommodate each new subnet? From your posts it looks like you are studying this at tech, maybe you could post the exact question that you are trying to solve?

Cheers, Ants.
Back to top
View user's profile Send private message
DUI
Just Arrived
Just Arrived


Joined: 23 Jan 2005
Posts: 0


Offline

PostPosted: Wed Mar 02, 2005 1:14 am    Post subject: Reply with quote

Ok, I answered that question based on what I learned in class which was what mnpk first submitted. I realize I used the word "split" but what I meant is just to create 5 different subnets. Anyway it all finally came to me when I was in class answering that question and I got a 100 for it. Sorry if I was a bit vague, I typed this topic very late at night. Thanks for all the responses it helped me grasp how subnetting exactly works.

-Bob
Back to top
View user's profile Send private message
Ants
Just Arrived
Just Arrived


Joined: 07 Nov 2004
Posts: 0
Location: U.K.

Offline

PostPosted: Wed Mar 02, 2005 1:22 am    Post subject: Reply with quote

Great to hear you scored 100!!! Excellent! Nice job there Very Happy

Don’t worry about being vague, it was fun to reply to the original post – I enjoyed it Very Happy

Cheers, Ants.
Back to top
View user's profile Send private message
Display posts from previous:   

Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Networking All times are GMT + 2 Hours
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Community Area

Log in | Register