user9624803
user9624803

Reputation: 21

Routing with Mininet switches(not hosts)

I have a network topology is as follows:

                                     | switch | s1

                                          |

                                     | switch |  s2
                                    /          \

                         s3  |switch|           |switch|  s4

                                |                  |

       h1 **(IP:10.0.1.10)**|  Host  |          | Host|**(IP: 10.0.2.20)**  h2

I want h1 talk to h2 and have followed several examples such as this, but in all of them, they add router as a host and then add routes, here I want s2(which is a switch) to route my packets to s4 and s3. My topology is fixed and built using fnss.

I am new to network programming please help me in this case?

Upvotes: 2

Views: 1270

Answers (1)

Karthik Balaguru
Karthik Balaguru

Reputation: 7852

In brief, if different hosts are in different subnets and they want to talk to each other, we should add one router in the environment else it is not required.

a. If you use classful addressing, it depends on the classful mask that you use. If you use classful mask, like the 10.x.x.x address would have a 255.0.0.0 mask, it would make the two hosts to be on the same network and they would have no problem in communicating.

b. If you use classless addressing for the shared network topology, there should be no problem in communicating if you are using /16 subnet. However, if you use /24 subnet for your topology, you need a router.

Upvotes: 1

Related Questions