Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Suppose we have two networks connected with each other by a router. One of them is using Class A prefix and the other one is using Class B prefix in IP address.
The Question is how these two network will communicate with each other as they are using different classes of IP addressing.

share|improve this question

closed as not a real question by Chris S, theotherreceive, John Gardeniers, Zypher, Mark Henderson Jul 28 '10 at 0:34

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

5  
CIDR replaced classful networking: serverfault.com/questions/135526/… –  Warner Jul 26 '10 at 17:26
    
sir, this is not my question. –  Zia ur Rahman Jul 26 '10 at 17:28
1  
/16 and /8 are the sizes of the subnet mask. A /16 network is a network with a 255.255.0.0 subnet mask. A /8 network is a network with a 255.0.0.0 subnet mask. These are equivalent of what used to be a Class B and a Class A network respectively. –  Jason Berg Jul 26 '10 at 18:00
2  
If you read through the page in the first comment, and links from there - specifically this serverfault.com/questions/49765/… you'll understand why your question doesn't really make sense. –  Whisk Jul 26 '10 at 18:01
3  
@Zia: you need to read about and understand masks and subnets in order to understand any answer to your question. –  Ward Jul 26 '10 at 18:10
show 7 more comments

4 Answers

That is why you need a router in between, the router will have interfaces on both networks and will be able to pass packets between the two networks.

share|improve this answer
    
does router will convert the class A addresses into class B addresses and vice versa –  Zia ur Rahman Jul 26 '10 at 17:25
    
for example when network using class A addressing sends a message to network using class B addresses, what will router do? router will convert the Class A address to class B address? –  Zia ur Rahman Jul 26 '10 at 17:27
1  
The router will use the address on what ever network to talk to that network no conversion takes place –  topdog Jul 26 '10 at 17:31
    
the router will use the address on what ever network to talk to taht network no conversion takes place, i could not understand this statement. –  Zia ur Rahman Jul 26 '10 at 17:34
    
To connect the two networks the router has to have interfaces with addresses on each network. –  topdog Jul 26 '10 at 17:36
show 4 more comments

Classful IP addressing is no longer being used. At all. Don't worry about it. I wish everybody would purge the terms "Class A" "Class B" and "Class C" from their memory. They are not needed at all. What's used now is Classless Inter-domain Routing. Notice it is classless in that there are no longer different classes of IP addresses (with exceptions like multicast and private IP addresses)

If you have valid subnets with a properly configured router, traffic will flow. All the router needs to know is its IP addresses on networks A and B along with the subnet masks. If it knows those, it will route data (provided you're not doing any sort of traffic filtering or NAT)

share|improve this answer
    
ooo sir , this is not my question. –  Zia ur Rahman Jul 26 '10 at 17:38
2  
This may not have been your question, but I'm saying your question is very outdated. There is no need to pull the terms "Class A" or "Class B" into a modern conversation about networking. The value of the first octet (which is what you're talking about with classful IP addressing) does not matter as long as it is not reserved for another purpose. Maybe a better question to ask would be "Will a /8 network be able to communicate with a /16 network through a router" –  Jason Berg Jul 26 '10 at 17:45
    
sir i am a student a student, our teacher taugh us about this classful addressing, now i need to understand it, Because without understanding this i can not understand that why this classful addressing is obsolete now. –  Zia ur Rahman Jul 26 '10 at 17:49
    
The reason Classful addressing is obsolete now is because it wasn't flexible enough. An organization was only able to obtain blocks of addresses that were either Class A (~16 million addresses), Class B (~65,000 addresses) or Class C (256 addresses). If an organization needed 1,000 addresses, they were given 65,000 because that's all that was allowed. This wasted many addresses. Now if an organization needs 1000 addresses, they can get a /22 network which is about 1022. There's much more flexibility. –  Jason Berg Jul 26 '10 at 18:04
3  
Teachers should not be teaching Class anymore, there's no excuse; they've been outdataed for 16 years. CIDR replaced them and there's no benefit to learning the Classes except to know the history. Also, this is not a 'Do my homework for me' site. –  Chris S Jul 26 '10 at 18:31
show 2 more comments

OK. I'll take another shot at this. Here is how a Class A (network with the first octet being 0 and 127 and also having a 255.0.0.0 subnet mask) network can communicate with a Class B (network with the first octet being between 128 and 191 and also having a 255.255.0.0 subnet mask) network.

A packet originates on a device in network A. This packet is sourced from IP address 10.0.1.2 and destined to IP address 172.16.1.2. The source device first checks the destination IP address. It compares this information to the information in its own routing table. The only entries of note in its routing table are the local subnet (10.0.0.0 with a 255.0.0.0 subnet mask) and it's default gateway (0.0.0.0 with a 0.0.0.0 subnet mask with a next hop of 10.0.1.1). Since the packet doesn't match any entry in its routing table besides the default route, it sends it to the default gateway, which is the router.

The router takes this packet and does the same thing. It examines the destination IP address and compares it to its routing table. The router has multiple local interfaces to compare to. It has a local network of 10.0.0.0 with a subnet mask of 255.0.0.0 and a local network of 172.16.0.0 with a subnet mask of 255.255.0.0. The router matches the destination address with the second routing table entry and directs it out the interface connected to that network. That interface looks up the MAC address for 172.16.1.2, creates a frame, and sends it out the proper interface.

The class of the networks don't really matter. The only thing that matters is that the router has an entry in its routing table that will match the destination IP address of the packet.

share|improve this answer
add comment

If two different hosts are on the SAME NETWORK, they can talk directly.

If two different hosts are on DIFFERENT NETWORKS, they need a router to pass packets.

Example:

  • Host A: 10.0.0.42 is on network 10.0.0.0/8 (a.k.a. a Class A network)
  • Host B: 172.16.0.42 is on network 172.16.0.0/12 (a.k.a. a Class B network)
  • Host C: 11.0.0.42 is on network 11.0.0.0/8 (a.k.a. a class A network)

Since A and B are on different networks, they need a router to talk.

Since B and C are on different networks, they need a router to talk.

Since A and C are on different networks, they need a router to talk.

The prefix length of a network (we used to call it Class) makes NO DIFFERENCE to whether two hosts can talk. The difference is in the network.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.