Home | Community | Message Board

MushroomMan Mycology
This site includes paid links. Please support our sponsors.


Welcome to the Shroomery Message Board! You are experiencing a small sample of what the site has to offer. Please login or register to post messages and view our exclusive members-only content. You'll gain access to additional forums, file attachments, board customizations, encrypted private messages, and much more!

Jump to first unread post Pages: 1
Invisibledeadwk
00101011


Registered: 06/17/09
Posts: 8,890
Loc: Canada, eh? Flag
IPv4 subnetting script (python)
    #19092971 - 11/05/13 10:28 PM (10 years, 3 months ago)

Hey all, so today we had a class on subnetting at school, and I decided to start work on an IPv4 subnetting script coded in python. As of now, it can only do three things:

1)Calculate the subnet mask if you know the number of network bits
2)Calculate the subnet mask if you know the number of host bits
3)Calculate the number of usable hosts per network if you know the number of host bits.

As time goes on I'll be adding more features, so expect some periodic updates.

Feel free to give the program a test, and if you find any bugs post them here. Note that when I tried running this from terminal in Linux using "python filename.py" it fails to work, so I suggest copying the code into IDLE, saving it as a .py file, and then running it through idle with F5.


http://pastebin.com/xyu4mBuc


Extras: Filter Print Post Top
Invisibledeadwk
00101011


Registered: 06/17/09
Posts: 8,890
Loc: Canada, eh? Flag
Re: IPv4 subnetting script (python) [Re: deadwk]
    #19095388 - 11/06/13 01:24 PM (10 years, 3 months ago)

Updated the script, add an ability to determine what your subnet mask will be if you know how many hosts will be on each network, thus you can determine the number of network bits.


In the progress of adding the funcionality to determine the subnetmask based on how many subnets you will need.


http://pastebin.com/1CeTXdxq


Extras: Filter Print Post Top
Jump to top Pages: 1


Similar ThreadsPosterViewsRepliesLast post
* linux shell script help OJK 986 7 05/23/06 12:21 PM
by OJK
* Scripting Languages: Ruby vs. Python Evolving 1,178 8 02/14/04 08:57 PM
by djfrog
* Something you may already know regarding IPv4 Aiko Aiko 757 8 07/09/08 08:16 PM
by johnm214
* Who wants to teach me python? LuNaTiX 784 8 01/10/09 11:41 AM
by Baby_Hitler
* Subnet Question? Aiko Aiko 291 0 02/05/07 11:17 AM
by Aiko Aiko
* Anyone know python? CowFarmer 702 7 05/21/09 03:16 AM
by zouden
* Unable to determine these pictures' URLs JunkFood 856 5 09/15/07 10:17 AM
by daussaulit
* Anyone good at Python? LuNaTiX 502 1 10/14/08 03:23 AM
by zouden

Extra information
You cannot start new topics / You cannot reply to topics
HTML is disabled / BBCode is enabled
Moderator: trendal, automan, Northerner
827 topic views. 0 members, 2 guests and 2 web crawlers are browsing this forum.
[ Show Images Only | Sort by Score | Print Topic ]
Search this thread:

Copyright 1997-2024 Mind Media. Some rights reserved.

Generated in 0.02 seconds spending 0.004 seconds on 12 queries.