What is the IP configuration for your PythonAnywhere server (i.e. what is the output of the shell command used for this purpose)? Optional: Write a function that garners this information from the shell and returns a dictionary of { "interface name": {"ipv4": "ipv4 address", "ipv6": "ipv6 address"} }. Hint: use subprocess.getoutput. What are the MAC addresses for these interfaces? What are all the IPv4 addresses associated with these interfaces? What is the IP subnet associated with each of these addresses? What is the netmask of each of these IP subnets? How many IP addresses are available in each of these subnets? Do any of the interfaces stand out? If so, do some research into what they might imply regarding the structure of PythonAnywhere. Are any of these IP addresses public? If not, prove it. If so, prove it.
Asked
Active
Viewed 189 times
-4
-
Please, do your own homework. If somebody else does it for you, you will just be hurting yourself. If others here wanted to do this homework, they would take the class for themselves. – Ron Maupin Sep 27 '16 at 02:28
-
I had the answers. – Nichols Sullivan Oct 04 '16 at 16:39
1 Answers
0
Network Management
open a bash console and use the "ls" command. The IP configuration is....
'ip address show' (command.
A list should pop up and all the information is in the pop up.
using a 3.5 Ipython console
step by step
#import subprocess
#subprocess.get
#subprocess.getoutput('ls')
#ipinfo = subprocess.getoutput('ip address show')
#import ipaddress
#iface = `ippadress.ipv4 interface
#iface = ippaddress.ipv4'
#iface.
#iface.netmask iface.netmask
#face.network
#iface.network.num_addresses

Community
- 1
- 1

Nichols Sullivan
- 1
- 2