I have created a simple topology (two hosts and a switch). h1 is the FTP server and h2 is the FTP client. FTP server is installed by
sudo apt-get install ftpd and started by the command
All of these steps at the hosts are done from inside the topology file. Here is the code snippet:
... host1 = net.get('h1') host1.cmd('inetd &') host2 = net.get('h2') host2.cmd('ftp 10.0.0.1') ...
At this point, host2 needs to enter the username and password of host1 in order to establish the FTP session and then get the file from the FTP sever(host1). The username and password both are
How can I do this? I have tried doing it like this, but it does not work this way.
... host2 = net.get('h2') host2.cmd('ftp 10.0.0.1') host2.cmd('mininet') #for username host2.cmd('mininet') #for password host2.cmd('get myfile')#for getting the file myfile ...
Please help me find a solution to this.