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.
-
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.
Zia ur Rahman : does router will convert the class A addresses into class B addresses and vice versaZia ur Rahman : 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?topdog : The router will use the address on what ever network to talk to that network no conversion takes placeZia ur Rahman : 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.topdog : To connect the two networks the router has to have interfaces with addresses on each network.Zia ur Rahman : either its not correct english, that is why its confusing me, or its very complex english.Brian Knoblauch : @ Zia ur Rahman, see @Jason Berg's reply. Classful addressing is dead and gone. Even back when it was in use there was no "conversion". The router simply routed as appropriate. It appears that you have some fundamental misconception about IP that I don't even know how to begin to correct. You might want to try some basic IP networking manual to get up to speed.Zia ur Rahman : my dear sir ok classful addressing is dead and gone now , but i want to understand it, so please answer my question if you can.Zia ur Rahman : To connect the two networks the router has to have interfaces with addresses on each network (interfaces with addresses on each network ) not understandableFrom topdog -
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)
Zia ur Rahman : ooo sir , this is not my question.Jason Berg : 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"Zia ur Rahman : 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.Jason Berg : 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.Zia ur Rahman : again i will say, you need to answer what i am asking, if you can't then please don't post unrelated answers and comments,its my request to you. i will appriciate a comprehensive and understandable answer.Chris S : 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.From Jason Berg -
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.
From Jason Berg -
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.
From MikeyB
0 comments:
Post a Comment