vRouter
The class "vSwitch" and "vRouter" are the implementation of the switch and router in the simulated network topology. "vSwitch" and "vRouter" will create a scheduling process to schedule all "vPacket" in the queue to "vNIC" for transmission based on the priority of "vPacket" when a "vPacket" arrived or has been transmitted. The scheduling process is implemented as an "event and only one scheduling process for each "vSwitch" or "vRouter" can exist at any time. If a "vSwitch" or "vRouter" does not have enough RAM to accommodate a "vPacket" upon receiving it, the "vPacket" will be dropped. The difference between "vSwitch" and "vRouter" are:
-
For a "vSwitch," the IP address attribute of its "vNIC" is set to none, and its "vNIC" can be connected to any entity.
-
For a "vRouter," the IP address of each of its "vNIC" instances must belong to a unique network and its "vNIC" cannot be connected to a "vHost" entity.
Bases: vHardwareEntity
Source code in PyCloudSim\entity\v_router.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
|