All home networking related discussions.
harman_6
New Member
Posts:
3
Joined:
Wed Mar 29, 2006 1:26 pm

networking basics...ip addresses and classes

Wed Mar 29, 2006 1:37 pm

hi ,

could ne1 tell me what is the purpose of having ip addresses on a private network? since mac addresses suffice for the internal network...the switch works on mac ...where is the need for ip addresses ( reserved classes and all..) if the nodes on the private network never communicate with the outside.

the second thing is how does the router use subnetting on different classes ..? since different classes have different subnets ..i.e 255.0.0.0 for class A , 255.255.0.0 for B... and so on.. how does the router discern on which subnet to apply on the packet for determining whether the paket stays on the network or not?

thanks ppl..

TravisT
Senior Member
Posts:
496
Joined:
Tue May 31, 2005 10:33 pm
Certs:
CCNA, Sec+

Fri Mar 31, 2006 4:57 am

I'll try my hand at this one...

Switches are not the only part of a private network. A router is required to join two different networks. You must have IP's to distinguish the network. Also, if you have more than one router port with a switch connected to each, the router is going to use IP addresses to know which switch to send the data to.

RoryRed
New Member
Posts:
20
Joined:
Thu Mar 30, 2006 11:38 am

Re: networking basics...ip addresses and classes

Fri Mar 31, 2006 7:03 am

harman_6 wrote:the second thing is how does the router use subnetting on different classes ..? since different classes have different subnets ..i.e 255.0.0.0 for class A , 255.255.0.0 for B... and so on.. how does the router discern on which subnet to apply on the packet for determining whether the paket stays on the network or not?

The subnet mask tells the router how large the IP adddress range of a network is. Using the subnet mask, you can tell if two IP addresses are on the same network.

Phone numbers...
I grew up in a small town. Everyone's phone number began with 206-249-
I knew someone had a local number if the phone number began with 206-249-. I also knew it was the neghboring town if it began with 206-532-. You could say that in my area, my local (phone number) network could be identified by the area code and exchange (the first two groups of numbers). My "phone mask" was those first two groups. My half of the state was identified by the area code.

So, back to IP Addresses
If you have a class C network (mask: 255.255.255.0) and an interface with an address 192.168.5.23, any address that begins with 192.168.5 is on the same network. If an address is the same other than where the subnet mask is 0, it is on the same network.

If it is not on the same network, the routing table identifies other networks and the direction (IP & interface) to send a packet to get there.

The methods of figuring out which route is best, exchanging route information, managing traffic flow, using nonstandard (classless) IP addressing.... that's what makes this field interesting :)

RoryRed
New Member
Posts:
20
Joined:
Thu Mar 30, 2006 11:38 am

Re: networking basics...ip addresses and classes

Fri Mar 31, 2006 7:17 am

harman_6 wrote:could ne1 tell me what is the purpose of having ip addresses on a private network? since mac addresses suffice for the internal network...the switch works on mac ...where is the need for ip addresses ( reserved classes and all..) if the nodes on the private network never communicate with the outside.

Simply.. The IP layer is a part of the TCP/IP stack. Each layer is only smart enough to pass the information up or down one layer. You cannot remove a layer without seriously modifying how the guts work. Yes, you may not need to use all the functionality, but you still have to provide the information it is expecting if you want it to work.

There are other protocols that do not have the complexity of TCP/IP... but they are not routable (you cannot deliver something without a delivery address). NetBUI is fast.. if it works for you that is great.

harman_6
New Member
Posts:
3
Joined:
Wed Mar 29, 2006 1:26 pm

one more thing

Fri Mar 31, 2006 11:35 am

thanks for the reply ppl ...but one part i wanna no bout is that does the router 1st check the ip and then apply the appropriate subnet or same subnet ...what happens if the subnet 255.255.255.0 is applied to the class A..?

hope the question makes sense....

User avatar
eaadams
Post Whore
Posts:
2619
Joined:
Fri Mar 11, 2005 10:26 pm

Re: one more thing

Sat Apr 01, 2006 3:24 am

harman_6 wrote:thanks for the reply ppl ...but one part i wanna no bout is that does the router 1st check the ip and then apply the appropriate subnet or same subnet ...what happens if the subnet 255.255.255.0 is applied to the class A..?

hope the question makes sense....


The router applies whatever subnet mask it is configured with. The router uses the mask to calculate the network or subnetwork address of the destination IP address of the packet it is processing so it can select an interface to send the packet out.

Remember an IP address is really 32 binary digits (bits); i.e, thirty-two 1s and 0s. The router performs what's called a "Logical And" on the IP address using the subnet mask (which is also thirty-two 1s and 0s, except they are't mixed up; first, from the left, there are only 1's then there are only 0s).

In your example that mask (255.255.255.0) will create 65,536 subnets each with a host address range of 0 to 255, where .0 is the subnet address and 255 is the subnet broadcast address.
The first subnet range is 10.0.0.0 to 10.0.0.255
One in the middle somewhere is 10.33.151.0 to 10.33.151.255
And the last subnet range is 10.255.255.0 to 10.255.255.255

A router has no concept of network "class".
What you are looking out at in this early stage of IP addressing is known as "IPv4 CLASSFUL" addressing. Things will move on from here, but get yourself comfortable at this level first.

Also while people on this forum can post short responses to your questions I would recommend that you also check out these online resources. First start off with one of my favourite sites (while getting this link for you I found out how an animated tattoo works - cool! 8) )

http://computer.howstuffworks.com/inter ... cture5.htm

After you've looked at those brief simplified explanations try these:
http://www.learntosubnet.com/
http://www.tcpipguide.com/free/
http://www.cisco.com/univercd/cc/td/doc ... troint.htm
http://www.cisco.com/univercd/cc/td/doc ... nd2002.htm

Enjoy :D

Aubrey

Seb74
Member
Posts:
103
Joined:
Tue May 02, 2006 2:56 pm

Tue May 02, 2006 3:19 pm

Yeah, the classful addressing aren't used anymore. Only old routingprotocols like RIPv1 are classful and cant look beside the A, B, C classes.

CIDR is the new thing, Classless Inter Domain Routing (I think it stands for).
The addresses are sent together with a subnetmask, removing the need for the predefined classes to decide what the netmask is.

As far as I know, unless you are running RIPv1 (or a newer routing protocoll in classful mode) there is no need at all to look at those old classes or addresses cause they say nothing (correct me if I'm wrong).

User avatar
eaadams
Post Whore
Posts:
2619
Joined:
Fri Mar 11, 2005 10:26 pm

Thu May 04, 2006 10:29 am

Seb74 wrote:Yeah, the classful addressing aren't used anymore. Only old routingprotocols like RIPv1 are classful and cant look beside the A, B, C classes.

CIDR is the new thing, Classless Inter Domain Routing (I think it stands for).
The addresses are sent together with a subnetmask, removing the need for the predefined classes to decide what the netmask is.

As far as I know, unless you are running RIPv1 (or a newer routing protocoll in classful mode) there is no need at all to look at those old classes or addresses cause they say nothing (correct me if I'm wrong).


Hmm, perhaps a look at http://www.cisco.com/univercd/cc/td/doc ... /nd20a.htm
would be worthwhile.

Classful addressing is used where classless is not required.
Our large multi-campus college has many classful subnets in the 10.x.x.x range.

As I said in my post, a thorough understanding of classful addressing makes the move to learning classless less painful.

I'm not sure that CIDR is *that* "new" either.

I think it would better to say that when designing the IPv4 addressing scheme for larger systems and complex internetworks the issue of classful boundaries need no longer be a constraint if the scarity of public IP addresses is an issue.

Aubrey

geko29
Ultimate Member
Posts:
952
Joined:
Mon Feb 06, 2006 5:11 pm

Thu May 04, 2006 11:27 am

eaadams wrote:Classful addressing is used where classless is not required.
Our large multi-campus college has many classful subnets in the 10.x.x.x range.


Perhaps I'm misinterpreting you, but that's a direct contradiction. If you have subnets, you're by very definition not using classful addressing. If you choose to use the 10.x.x.x private addressing scheme, that means you have ONE subnet with 16.7 million possible hosts. If you have a bunch of /16s or /24s in the 10.x.x.x range, you may in fact be using the natural mask from a class B or C, but your address is a class A, ergo not classful.

Perhaps you mean you're using FLSM instead of VLSM? This would allow a classful routing protocol (one that does not support VLSM/CIDR) to operate in a classless environment, because it operates under the assumption that every network has the same mask it does. Which is fine as long as they actually do.

Again, maybe I misread you, but that's how it came across.


Return to Home Networking

Who is online

Users browsing this forum: No registered users and 76 guests