Develop a simulation program to simulate an 8-port Ethernet switch. The switch initially has no knowledge about the hosts connected to each port. It learns frame addresses and stores-and- forwards the frames. The input text file "in.txt" contains information of the incoming frames, one frame per line. There are 4 pieces of data per line: frame ID, arrival port, frame source address, and frame destination address. The frames arrive at the switch in the order of which they appear in the input file. Destination address "X" indicates a broadcast frame. The output text file "out.txt" has 8 lines. Each line lists all the frames departing from each port, here is an example: "in.txt" contains 5 incoming frames: F1 P2 B-A F2 P6 D-C F3 P5 E--B F4 P7 F--D F5 P6 D--X "out.txt" should list the departing frames on each port: P1: F1 F2 F5 P2: F2 F3 F5 P3: F1 F2 F5 P4: F1 F2 F5 PS: F1 F2 FS P6: F1 F4 P7: FI F2 F5 I

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Develop a simulation program to simulate an 8-port Ethernet switch. The switch initially has no
knowledge about the hosts connected to each port. It learns frame addresses and stores-and-
forwards the frames. The input text file "in.txt" contains information of the incoming frames, one
frame per line. There are 4 pieces of data per line: frame ID, arrival port, frame source address,
and frame destination address. The frames arrive at the switch in the order of which they appear
in the input file. Destination address "X" indicates a broadcast frame. The output text file
"out.txt" has 8 lines. Each line lists all the frames departing from each port, here is an example:
"in.txt" contains 5 incoming frames:
F1 P2 B--A
F2 P6 D--C
F3 P5 E--B
F4 P7 F--D
F5 P6 D--X
"out.txt" should list the departing frames on each port:
P1: F1 F2 F5
P2: F2 F3 F5
P3: F1 F2 F5
P4: F1 F2 F5
P5: F1 F2 F5
P6: F1 F4
P7: F1 F2 F5
P8: F1 F2 F5
I
Transcribed Image Text:Develop a simulation program to simulate an 8-port Ethernet switch. The switch initially has no knowledge about the hosts connected to each port. It learns frame addresses and stores-and- forwards the frames. The input text file "in.txt" contains information of the incoming frames, one frame per line. There are 4 pieces of data per line: frame ID, arrival port, frame source address, and frame destination address. The frames arrive at the switch in the order of which they appear in the input file. Destination address "X" indicates a broadcast frame. The output text file "out.txt" has 8 lines. Each line lists all the frames departing from each port, here is an example: "in.txt" contains 5 incoming frames: F1 P2 B--A F2 P6 D--C F3 P5 E--B F4 P7 F--D F5 P6 D--X "out.txt" should list the departing frames on each port: P1: F1 F2 F5 P2: F2 F3 F5 P3: F1 F2 F5 P4: F1 F2 F5 P5: F1 F2 F5 P6: F1 F4 P7: F1 F2 F5 P8: F1 F2 F5 I
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 8 steps with 5 images

Blurred answer
Knowledge Booster
Designing Real Time System
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education