Devices

Device Information

This page explains the properties and functions of the devices supported by Packet Tracer 3.2.

Router:

- A router supports multiple ethernet and/or WAN ports.
  - Each Ethernet port has a MAC address, an IP address, and a subnet mask.
  - Each WAN port has an IP address and a WAN address.
- If a router is using Automatic Dynamic Routing, it uses RIP version 2 to find routes to remote networks automatically.
  - A router advertises all networks its ports belong to, specified by the IP address and subnet mask.
  - RIP version 2 supports VLSM (variable-length subnet masking).
  - RIP keeps a routing table of remote networks.
  - The routing table associates a network (network ID and subnet mask or network bits) to the closest port on the router.
- When a router receives a RIP version 2 update:
  - It checks if the receiving port is RIP enabled.
    - If the receiving port is not RIP enabled, then drops the packet.
  - It checks if the packet is from another network.
    - If the packet is from another network, then drops the packet.
  - It creates a routing entry with advertised network and subnet mask, the receiving port, the packet's source IP address as the next hop, and one less than the advertised metric as the metric.
  - It looks up the routing table for an entry with the same network and subnet mask.
    - If a matching entry is found or the new entry has a smaller metric than the old one, then removes the old one from the routing table, adds the new one, and advertises the new route out all ports except the receiving one.
    - If a matching entry is found with the same metric, then adds the new one to the routing table so load balancing is possible.
    - If a matching entry is found with smaller metric than the new one, then drops the update.
- A router keeps an ARP table.
  - It associates IP addresses with MAC addresses using an ARP table.
  - A router builds its ARP table by sending ARP requests to find the MAC address of an IP address. The device in question receives the request and sends an ARP reply back with its MAC address. When the router receives the reply, it adds the entry to the ARP table.
  - The ARP process is not visible to the user.
- When a router receives a data frame/packet (view packet process flowchart):
  - It checks if the receiving port is a WAN port.
    - If not a WAN port, then it checks if the frame is a broadcast frame.
      - If it is a broadcast frame, then drops the frame.
      - If not broadcast frame, then checks if destination MAC address matches the receiving port's.
        - If the destination MAC address does not match, then drops the frame.
  - It checks the TTL field to see if the packet is to be forwarded.
    - If the TTL field is 0, then drops the packet.
  - It checks if the receiving port has an inbound access list.
    - If an inbound access list exists, then checks if the packet passes the access list.
      - If the packet does not pass the access list, then drops the packet.
  - It checks if the receiving port is a NAT outside port.
    - If the receiving port is a NAT outside port, then looks up the packet's destination IP in the NAT table as global address.
      - If the NAT table has a matching entry, then translates destination IP and port numbers to the entry's.
  - It looks up its routing table to find the network that the packet’s destination IP address belongs to.
    - If the routing table has a matching entry, then checks if network is directly connected.
      - If the network is directly connected, then marks the packet's destination as the next hop level 2 destination.
      - If the network is not directly connected, then marks the layer 3 next hop as the next hop level 2 destination.
    - If the routing table does not have a matching entry, then checks if the router has a gateway of last resort.
      - If a gateway of last resort exists, then marks the gateway of last resort as the next hop level 2 destination.
      - If a gateway of last resort does not exists, then drops the packet.
  - It checks if the receiving port is a NAT inside port and the outgoing port is a NAT outside port.
    - If so, then looks up the packet's source IP in the NAT table as local address.
      - If the NAT table has a matching entry, then translates the source IP and port numbers to the entry's.
      - If the NAT table does not have a matching entry, then checks if the packet matches any inside NAT source list.
        - If the packet matches a source list.
          - It adds a new NAT entry to the NAT table describing this translation.
          - It translates the source IP and port numbers to the entry's.
  - It checks if the outgoing port has an outbound access list.
    - If an outbound access list exists, then checks if the packet passes the access list.
      - If the packet does not pass the access list, then drops the packet.
  - It checks if the outgoing port is a WAN port.
    - If a WAN port, then sets the frame's destination address to the all-destination address.
    - If not a WAN port, then look up the next hop level 2 destination MAC address in the ARP table.
      - If a matching entry is found in the ARP table, then sets the frame's destination address to the MAC address of the next hop level 2 destination and the frame's source address to the MAC address of the outgoing port.
      - If a matching entry is not found, then drops the frame.
  - If the frame/packet is not dropped, then forward the packet out the outgoing port.
- A router supports DHCP:
  - A router may act as a DHCP server for LANs that it connects to.
  - If a DHCP-enabled router receives a DHCP request, it will send a DHCP reply back to the host.
  - The DHCP reply contains the host's assigned IP address, subnet mask, and default gateway.
    - The default gateway is the IP address of the port on the router that received the DHCP request.
    - The subnet mask is the same as that port’s.
    - The IP address is the next available IP address in that port’s network.
  - Note that DHCP packets are not shown to the user.

Cloud Functions:

- A cloud has multiple borders, which can be either serial or modem ports.
- Each border is a WAN port that has an IP address and a WAN address.
- All other cloud functions are identical to router functions.

Switch:

- A switch has multiple ethernet or fiber ports.

- A switch uses STP to break loops in a switching network.
  - Packet Tracer does not simulate the full STP process. It simply breaks layer 2 loops by using a depth-first searching algorithm.

- A switch supports multiple VLANs.
  - Frames cannot go across VLANs.
  - Each port can be configured to be an access port.
    - Each access port can be assigned to one VLAN.
  - Each port can be configured to be a trunk port.
    - Each trunk port can have multiple VLANs.
    - A trunk port can be used to send frames to and from VLANs that are assigned to it.
    - When a switch sends a frame over a trunk port:
      - It adds a tag to the frame specifying which VLAN the frame belongs to.
    - When a switch receives a frame from a trunk port:
      - It removes the tag that is on the frame, and
      - It uses the tag to determine which VLAN to send the frame out to.

- A switch keeps a MAC table for each VLAN.
  - An entry in a MAC table associates a device's MAC address to a port on the switch.
  - A switch builds its MAC tables by listening to other devices sending frames.
    - When a switch receives a frame from a port, it creates an entry with the frame's source address and the receiving port, and adds that entry to the receiving VLAN's MAC table.

- When a switch receives a layer 2 unicast frame (view the frame processing flowchart):
  - It checks if the receiving port is an access port.
    - If the receiving port is an access port, then checks if the frame is a tagged frame.
      - If the frame is a tagged frame, then drops the frame.
      - If the frame is not a tagged frame, then marks the receiving port's access VLAN as the receiving VLAN.
    - - If the receiving port is not an access port, then checks if the frame is a tagged frame.
        - If the frame is not a tagged frame, then drops the frame.
        - If the frame is a tagged frame, then extracts the VLAN number from tag and marks it as the receiving VLAN.
        - It checks if the receiving VLAN is a member of the receiving trunk port.
          - If it is not a member, then drops the frame.
  - It checks if the frame's destination MAC address is the broadcast address.
    - If the frame's destination MAC address is the broadcast address, then sends the frame out to all ports in the receiving VLAN except the receiving one.
    - If the frame's destination MAC address is not the broadcast address, then looks up the destination MAC address in the receiving VLAN's MAC table.
      - If a matching entry is not found in the MAC table, then sends the frame out to all ports in the receiving VLAN except the receiving one.
      - If a matching entry is found, then checks if the outgoing port is the same as the receiving port.
        - If the outgoing port is the same as the receiving port, then drops the frame.
        - If the outgoing port is not the same as the receiving port, then forwards the frame out that port.

Bridge Functions:

- A bridge has two ethernet ports.
- A bridge does not have VLAN or trunking functions.
- All other bridge functions are identical to switch functions.

Hub Functions:

- A hub has multiple ethernet ports.
- When a hub receives a frame (view flowchart), it forwards the frame to all ports except the one where the packet came in from.
- When a hub receives more than one packet at the same time, a collision occurs and both frames become corrupted.
- Corrupted frames are sent out to all ports.

Repeater Functions:

- A repeater has two ports.
- When a repeater receives a frame on one port (view flowchart), it forwards the frame out the other port.
- Collisions do not occur inside a repeater.

Access Point Functions:

- An Access Point has an ethernet port and a mandatory wireless port.
- The ethernet port can be connected to another ethernet port.
- The wireless port can be associated to multiple wireless PCs.
- All Access Point functions are identical to hub functions (view flowchart).

PC Functions:

- A PC has one ethernet, one modem, or one wireless port.
- The PC may use DHCP to get an assigned IP address, subnet mask, and default gateway from a DHCP server.
- A PC keeps an ARP table.
  - It associates IP addresses with MAC addresses using an ARP table.
  - A PC builds its ARP table by sending ARP requests to find the MAC address of an IP address. The device in question receives the request and sends an ARP reply back with its MAC address. When the PC receives the reply, it adds the entry to the ARP table.
  - The ARP process is not visible to the user.
- A PC can send layer 3 unicast packets and layer 2 broadcast frames (view flowchart).
  - It checks if the port is a WAN port.
    - If the port is a WAN port, then sends the frame out.
    - If the port is not a WAN port, then checks if the destination MAC is specified.
      - If the destination MAC address is specified, then sends the frame.
      - If the destination MAC address is not specified, then checks if the destination IP is in the same network as the PC.
        - If the destination IP is in the same network as the PC, then looks up the MAC address of the destination IP in the ARP table.
        - If the destination IP is not in the same network as the PC, then checks if this PC has a default gateway.
          - If the PC does not have a default gateway, then drops the packet.
          - If the PC has a default gateway, then looks up the MAC address of the default gateway in the ARP table.
        - If a matching entry is not found in the ARP table, then drops the frame.
        - If a matching entry is found in the ARP table, then sets the frame's destination MAC address to the matching entry's.
        - Sends out the frame.
- When a PC receives a packet (view flowchart),
  - It checks if the port is a WAN port.
    - If the port is not a WAN port, then checks if the frame's destination MAC address is the broadcast address.
      - If the destination MAC address is the broadcast address, then process the frame.
      - If the destination MAC address is not the broadcast address, then checks if the frame's destination MAC address matches the port's.
        - If the destination MAC address does not match the port's, then drops the frame.
  - It checks if the packet's destination IP address matches the PC's.
    - If the destination IP address matches the PC's, then it processes the packet.
    - If they do not match, then drops the packet.

Server/Printer Functions:

- All server and printer functions are identical to PC functions.