Network Device
- Any packet entering a port is broadcast out or "repeated" on every other port, except for the port of entry.
- bridge
- The bridge allows two or more network segments creating an aggregate network; while the router allows the networks to communicate independently as separate networks.
- A network bridge is a network device that connects more than one network segment.
- A bridge is a networking device that connects two systems. Typically, a bridge is used to connect two LANs to make a much larger LAN to a certain extent.
- The bridge learns the MAC address of each connected device.
- A bridge can learn the addresses of the computers within the network. It can accomplish this “learning” by looking and recording each of the network computer’s MAC address* and **port or interface on which a frame was received.
- Transparent Bridge(meaning that the nodes using a bridge are unaware of its presence).
- The bridge has to forward (receive and subsequently transmit) frames from one LAN (e.g. LAN A below) to another (e.g. LAN B).
- The bridge could forward all frames, but then it would behave rather like a repeater;
- It would be much smarter if the bridge only forwarded frames which need to travel from one LAN to another.
- To do this, the bridge need to learn which computers are connected to which LANs. More formally, it need to learn whether to forward to each address.
- By examining the MAC source address of each received frame, and recording the port on which it was received, the bridge may learn which addresses belong to the computers connected via each port. This is called "learning".
- The source addresses X,Y are observed to be on network A, while the address of computer Z will be observed to be on network B.
- The learned addresses are stored in the an interface address table associated with each port (interface).
- If the address is not found, no frames have been received from the source. The source may not exist, or it may not have sent any frames using this address. Since the bridge does not know which port to use to forward the frame, it will send it to all output ports, except that on which it was received. This is called flooding.
- If the address is found in an interface table and the address is associated with the port on which it was received, the frame is discarded(filtered). (It must already have been received by the destination.)
- If the address is found in an interface table and the address is not associated with the port on which it was received, the bridge forwards the frame to the port associated with the address.
- Multiple Port Bridges (Switches)
- STA(Spanning Tree Algorithm)
- A bridge / switch /hub LAN must form a tree, and not a ring.
- That is, there must be only one path between any two computers.
- If more than one parallel path were to exist, a loop would be formed, resulting in endless circulation of frames over the loop.
- The IEEE (in IEEE 802.1D) has defined the Spanning Tree Algorithm (STA) which automaticallt detects loops and disables one of the parallel paths.
- Routers may be used to connect two or more IP networks, or an IP network to an internet connection.
- A router consists of a computer with at least two network interface cards supporting the IP protocol.
- The router uses the information held in the network layer header (i.e. IP header) to decide whether to forward each received packet, and which network interface to use to send the packet.
- The routing and filter tables resemble similar tables in link layer bridges and switches. Except, that instead of specifying link hardware addresses (MAC addresses), the router table sepcify network (IP addresses).
- A router forwards packets from one IP network to another IP network.
- Routing table
- The routing table lists known IP destination addresses with the appropraite network interface to be used to reach that destiantion. A default entry may be specified to be used for all addresses not explicitly defined in the table
- Filter table
- MTU(Maximum Transfer Unit)
- Before a packet is forwarded, the processor checks the Maximum Transfer Unit (MTU) of the specified interface. Packets larger than the interface's MTU must be fragmented by the router into two or more smaller packets.
- Path MTU Discovery
- If a packet is received which has the Don't Fragment (DF) bit set in the packet header, the packet is not fragmented, but instead discarded. In this case, an ICMP error message is returned to the sender (i.e. to the original packet's IP source address) informing it of the interface's MTU size. This forms the basis for Path MTU discovery (PMTU).
- Routing engine
- The function of the routing engine is to process routing information (exchanged between routers using a routing protocols such as the Border Gateway Protocol, BGP) so as to compute routes (using a shortest path algorithms) that are stored in routing information bases (RIB) and that are composed by a destination, a next-hop interface, and a metric. Routing entries are subsequently used to populate the forwarding information base (FIB) whose entries are used by the forwarding engine.
- Forwarding engine
- The function of the forwarding engine is to transfer incoming traffic to an outgoing interface directed towards a router closer to the traffic destination by performing a longest match prefix lookup using the incoming traffic destination address. This forwarding process is connectionless implying that at each hop the forwarding decision is taken independently for each datagram.
- Management agent