Posts

Showing posts from October, 2022

IPv4 Addresses

 A review of IPv4 addressing IP addresses can be either IPv4 or IPv6. IPv6 addressing is out of the scope of this post but will be in another post later. IPv4 addresses are 32-bits long and are represented in dotted decimal notation. There are two portions of IPv4 addresses: The network portion and the host portion. The network portion identifies a physical or logical link and is common to all devices attached to that link. The host portion identifies a unique device connected to the link. We distinguish between the network portion and the host portion with the subnet mask. We represent IP addresses in dotted decimal to make it easier for us to remember and work with. Each group of 8-bits is referred to as an "octet" and the "." separates each grouping of 8-bits. Since there are 4 groups of 8-bits that gives us a 32-bit address. We can change an IP address back to the binary equivalent to get a better idea of the the host and network portions.  Dotted decimal IP: 19
Image
 What are VLANs ?   Virtual Local Area Networks, or VLANs, are groups of devices on a LAN that are configured to communicate as if they were attached to the same wire. A VLAN is a broadcast domain, which is a group of devices that are able to communicate via a broadcast message. VLANs allow you to break up one physical switch into multiple virtual switches. Traffic is segmented from other traffic when it is placed in a VLAN. Traffic cannot communicate directly from one VLAN to another without a router or SVI(Switched Virtual Interfaces) on a layer 3 switch. Imagine your company, xyz inc., has three departments and your devices are spread out through multiple buildings. You don't want users in any one department to be able to communicate with the other departments. You can accomplish this with the use of three distinct VLANs. Without the use of VLANs, you would need to have a separate physical switch for each department to accomplish the same segmentation.  VLANs are associated with
Image
How Switches Work.   If you have been in IT for some time you might have heard the statement, “switches operate at layer 2”, but what does that really mean ? In the TCP/IP reference model, the first “layer” is known as the Network Interface Layer, which is made up of “L1” and “L2”. Layer 2 refers to frames, and the addressing that is used to communicate between devices is known as the MAC address. MAC addresses are 48-bit addresses that are separated with colons(:). An example would look like this: aa:aa:aa:bb:bb:bb. The first 6 a’s(first 24-bits) is known as the Organizational Unique Identifier(OUI) and the last 6 b’s(last 24-bits) make up the unique host portion of the address. Each network device will have a MAC address. Switches are by default a single broadcast domain(VLAN) and they need a way of forwarding these frames to the correct host efficiently. In order for the switch to be able to do this it keeps a table called the CAM(content addressable memory) ta
Image
  The Routing Table How does a router learn how to reach destinations ? Routers forward packets based on destination IP addresses and they have to know about these destinations in order for the packets to be forwarded. There are a couple of ways in which a router would learn about these destinations: Statically configured routes, Directly connected interfaces, and dynamic routing protocols. Static routes are pretty self explanatory, you manually configure(tell) the router to reach destination X.X.X.X forward to this next hop(next router). Directly connected interfaces are also kind of self explanatory. These are the interfaces(physical or logical) on the router, that have IP addresses assigned to them. The router “see’s” it’s interfaces that are up and configured as directly connected networks. So it knows how to reach those networks by forwarding out those appropriate interfaces. The third way a router will learn how to reach a destination network is dynamic rout