Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 20th, 2013, 07:52 AM
waqasalisahito waqasalisahito is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2013
Posts: 2 waqasalisahito User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 47 m 26 sec
Reputation Power: 0
Please solve this for me

Programming*assignment*#1*
*
In*lecture,*I*presented*the*algorithm*a*switch*uses*to*learn*the*association*of*MAC*
addresses*with*its*ports.*In*this*assignment,*you*will*implement*that*algorithm*for*a*
limited*case.*
*
Assume*you*have*a*four‐port*switch.*Also*assume,*for*the*purposes*of*this*
assignment,*that*MAC*addresses*are*represented*as*integers.*Your*task*is*to*write*a*
program*that,*in*a*loop,*prompts*the*user*for*a*series*of*arriving*frames.*After*each*
frame,*the*program*will*output*the*action*to*be*taken*(forward*or*flood),*and*list*the*
port*numbers*that*are*used*for*output.*When*the*program*finishes,*it*must*output*
the*current*state*of*the*bridge*table.*
*
‐*Your*program*must*output*the*prompt:*“Input*port*number,*then*dest*and*src*MAC*
addresses”*
‐*It*must*then*be*prepared*to*read*these*values*on*a*single*line.*
‐*It*must*check*to*make*sure*the*port*number*is*between*zero*and*three.*
‐*It*must*check*to*make*sure*the*MAC*addresses*are*both*positive*integers.*
‐*If*any*of*these*conditions*are*not*met,*your*program*must*write*an*appropriate*
error*message,*and*then*prompt*the*user*for*input*again.*
‐*If*the*destination*MAC*address*is*9999*your*program*must*print*the*current*state*
of*the*bridge*table,*and*then*exit.*
‐*If*the*port*number*and*the*MAC*addresses*pass*the*error*checking,*and*the*
destination*MAC*address*is*not*9999,*your*program*must*run*the*algorithm*for*a*
learning*bridge:*
*****‐*If*the*destination*MAC*address*is*known,*the*frame*is*bridged*to*the*
appropriate*port.*
* ‐*If*the*destination*MAC*address*is*not*known,*the*frame*is*flooded*to*all*
ports,*except*the*port*on*which*it*arrived.*
* ‐*In*either*case,*the*switch*remembers*that*the*frame’s*source*MAC*
address*is*associated*with*the*incoming*port*number.*
‐*Your*program*must*then*output*either:*
‐*the*word*“Forwarding”*and*the*port*number*(from*zero*to*three)*over*
which*the*frame*is*forwarded,*or*
‐*the*word*“Flooding”*and*the*list*of*port*numbers*over*which*the*frame*
is*flooded*
‐*Your*will*then*prompt*for*the*next*frame*
‐*When*your*program*sees*a*destination*MAC*address*of*9999,*it*will*skip*the*
learning*algorithm,*print*the*list*of*(port,*MAC)*associations*(the*bridge*table),*and*
exit*
‐*You*can*assume*that*only*one*node*is*attached*to*each*port*
Comments on this post
salem disagrees: Unreadable mess

Reply With Quote
  #2  
Old January 20th, 2013, 08:15 AM
Jacques1's Avatar
Jacques1 Jacques1 is offline
pollyanna
Click here for more information.
 
Join Date: Jul 2012
Location: Germany
Posts: 1,879 Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 2 Days 7 h 20 m 28 sec
Reputation Power: 813
I seriously hope this is just a satire on lazy students, who are too stupid to even copy and paste their assignments, let alone ask a question or -- heaven forbid -- have a thought on their own.

Reply With Quote
  #3  
Old January 20th, 2013, 08:20 AM
waqasalisahito waqasalisahito is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2013
Posts: 2 waqasalisahito User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 47 m 26 sec
Reputation Power: 0
Dear can u talk to me at (waqas_fire@yahoo.com) i can tell u there its very urgent pl

jacques please help me its not my work one of my friend needs it, Hope u chat me on yahoo or skype so that i can tell u the excat question

Reply With Quote
  #4  
Old January 20th, 2013, 04:00 PM
b49P23TIvg's Avatar
b49P23TIvg b49P23TIvg is offline
Contributing User
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Aug 2011
Posts: 3,389 b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 3 Days 14 h 22 m 25 sec
Reputation Power: 383
Sorry, waqasalisahito, better kiss that girlfriend goodbye.
__________________
[code]Code tags[/code] are essential for python code!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > Please solve this for me

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap