l3_learning

Tutorial no 3

Testing layer 3 script l3_learning.py

                            Router is network intelligent device works on IP addresses unlike switch working on MAV address. Hence it is termed as intelligent than switch or hub. This component is not quite a router, but it’s also definitely not an L2 switch. It’s an L3-learning-switchy-thing. Perhaps the most useful aspect of it is that it serves as a pretty good example of using POX’s packet library to examine and construct ARP requests and replies.

                              l3_learning does not really care about conventional IP stuff like subnets – it just learns where IP addresses are. Unfortunately, hosts usually do care about that stuff. Specifically, if a host has a gateway set for some subnet, it really wants to communicate with that subnet through that gateway. To handle this, you can specify “fake gateways” in the commandline to l3_learning, which will make hosts happy. For example, if you have some machines which think they’re on 10.x.x.x and others that think they’re on 192.168.0.x and they think there are gateways at the “.1” addresses:

      We need hosts from different network. You can download script from here for topology of two hosts having IP 192.168.50.10, 192.168.10.10 i.e. from different network.

1) You can use nano editor to save the topology script in pox>ext location. Copy and paste the code in nano editor save using key ‘CTRL+O’ and exit editor by ‘CTRL+X’.

1

2

2) To run script

> sudo python ./mininet_script.py 3

3) Now run l3_learning script with fake gateways i.e. fakeways

4

4) Verify results using ping

h1 ping h2

h2 ping h1

6

 5