Showing posts with label Networking. Show all posts
Showing posts with label Networking. Show all posts

Tuesday, April 5, 2022

What are VRFs? (Virtual Routing & Forwarding)

This blog covers what VRFs are and how you would set them up in your network.

TRADITIONAL ROUTING & INTRO TO VRFs

Typically, your router will have a routing table compiling all the known networks with all the possible routes. This is a sole table for all interfaces and subnets. For an organsation that handles one evnironment this is perfectly fine but what if you were a service provider with multiple customers using your network for technologies such as MPLS? This is were VRFs come in.

A VRF is the layer 3 version of a VLAN found at layer 2. With VLANs, you split up your broadcast domains into separate layer 2 domains, assosiating interfaces with a specific VLAN for it take part on that subnet. VRFs work similarly to this. You create your VRFs like you would a VLAN, and then you associate your interfaces with a VRF. Like VLANs, these VRFs are segragated from one another and only see other interfaces that are part of the same VRF.

The router no longer has a sole routing table, there's one for each VRF. As you associate an interface with a VRF, it is taken out the main routing table and put in the VRF's routing table. The built in routing table of the router won't even see that the interface exists. This segmentation of the routing does allow for configurations you wouldn't typically see such as the ability to have duplicate IP addresses on other VRFs and it's perfectly fine. They are virtually separate so there's no conflicts.

VRF USE CASE

VRF is used with service providers running MPBGP in MPLS as it allows them to segement custmer traffic over a WAN environment. The lighter version, VRF-Lite has even more use as it doesn't require MPBGP so places like data centers or large networks can use VRF-Lite to segment traffic for DMZs, extranet and internal to group traffic into zones.

Below shows an example of an ISP with two cusotmers. There's two VRFs for each one, the customers can only see the links part of their VRF so the customers won't see one another but the ISP can still manage both.


HOW IS IT CONFIGURED? 

VRF is configured similar to VLANs where you create the VLAN, assosicate an interface with said VLAN. The image below shows a router with 2 interfaces being assosicated with different VRFs and the console showing the commands. (You can even use one physical interface for multiple VRFs by using subinterfaces then associating each one with a VRF)

At the bottom, you can see you can look at the IP routing table for a specific VRF as well as setup OSPF for a specific VRF.

Saturday, February 19, 2022

Wireless Topologies Explained (BSS, ESS and SSIDs)

This covers wireless topologies, going over BSS, ESS and SSIDs

CONNETING TO A WIRELESS NETWORK

When you connect to a wireless network, you typically connect to an available SSID then away you go. Once connected you can freely move around a building, moving from one access point to another access point all while still connected to the same SSID.

To manage the connected clients, wireless networks use BSS, ESS and SSIDs to enable mobility.

BASIC SERVICE SET (BSS) 

Thinking about SSIDs, you see it as one overall network for a whole building/campus where you are connected to just that wireless network. That WLAN is made up of access points all broadcasting the SSID for clients. As people connect to the SSID, they also connect to the access point within range.

Each access point has its own local wireless network which covers the broadcast radius of the access point's radios. This local WLAN of the access point is a BSS. For a WLAN, it isn't just the SSID of the whole building/campus but it is also multiple BSS networks that make up the foundations of the network.

Each BSS has an ID that the WLAN uses to track which AP a client is connected to and to ensure each BSS can be uniquely identified. If you go into CMD or PowerShell in Windows, you can use the command 'netsh wlan show interfaces' to see what the BSSID is of the BSS you are connected to. Below is an example.


EXTENDED SERVICE SET (ESS)

Extended Service Sets are basically what we typically call SSIDs. An ESS is a collection of BSSs that are broadcasting the same SSIDs to allow clients to roam between the APs. Below is an example of multiple BSS networks making up a larger WLAN to form an ESS.

SERVICE SET ID (SSID)

SSIDs are friendly names for WLAN networks. BSS networks have a BSSID which is the MAC of the broadcasting AP but SSIDs make things easier. For an ESS, there is no ESSID but the SSID giving it a friendly name removes the need for an ESSID. SSIDs are used for both BSS and ESS as it's easy to have the consistancy and avoids having to use the BSSID.

Thursday, December 30, 2021

Understanding OSPF LSA Types

This covers the different LSA types in OSPF and how they behave in OSPF AS.

PURPOSE OF LINK-STATE ADVERTISEMENTS (LSAs) IN OSPF

OSPF's LSDB is built using LSAs advertised by routers within the OSPF AS. These LSAs are complied in the LSDB with a LSID to identify them. The OSPF SPF algorithm uses these LSAs to calculate paths to destinations. There are different LSAs for different aspects of OSPF from internal area information to inter area (IA) routes shared by ABRs between areas to external routes through ASBRs running redistribution.

LSA TYPE 1 - ROUTER LSA

Type 1 LSAs are generated by a router and will contain information on all its connected links which are OSPF enabled. This information consists of:
  • For non-DR elected interfaces, lists the router's interface subnet number/mask and interface OSPF cost.
  • For interfaces with an elected DR, it lists the IP address of the DR with a notation that the interfaces connects to a transit network.
Every router in an area will create a single an Type 1 LSA for themselves and flood it through the same area it is in. ABRs on the other hand create multiple Type 1 LSAs, an LSA for each area they are in and flood it to the the areas the LSAs describe. As the ABR as one RID, that will be the same on each LSA.

The LSID for Type 1 LSAs is the RID of the advertising router and are listed as "O" in the routing table.

LSA TYPE 2 - NETWORK LSA

Type 2 LSAs are used on Multiaccess (MA) networks where there are multiple adjacencies over a shared broadcast domain. Once the DR has been elected, it will then create Type 2 LSAs for the subnet. OSPF cannot represent multiple routers on a single subnet using a link connection to all four routers. OSPF defines a Type 2 network LSA as a transit network. 

Each router's Type 1 LSA will describe a connection to this transit network which is then molded into a Type 2 LSA by the DR and uses it's interface IP as the LSID to show it is a Type 2 LSA. This is flooded within the local area as Type 1 LSAs are.

These are listed as "O" routes in the routing table.

LSA TYPE 3 - SUMMARY LSA

ABRs don't simply forward all Type 1 and 2 LSAs to other areas, that wpuld increase the complexity of the SPF algorithm as well as take up more memory. Instead, the ABR will summaries the subnets of an area and forward that out to simply say subnet XYZ exists in Area 2. 

These LSAs aren't detailed like Type 1 and 2 LSAs. The ABR will use the subnet's address as the LSID and include its own RID so others know which ABR advertised the route. Although it is called a Summary LSA, it doesn't summaries the subnets but the term simply means it isn't as detailed.

These are listed as "OIA" routes in the routing table.

LSA TYPE 4 - SUMMARY ASBR LSA

These are only created when an ABR recieves a Type 5 LSA from an ASBR. The LSA will bascially list the RID of a ASBR and the cost to get to it from said ABR. This is flooded out to all connected areas. The LSID used for these LSAs is the ASBR's RID.

The importance of these is when there are multiple possible paths to subnets external to the OSPF AS to act as tie breakers for routing for Type 2 External Routes.

LSA TYPE 5 - EXTERNAL LSA

Routes from an external AS are flooded through the OSPF AS through the ASBR. These LSAs are flooded to all none stubby areas, stubby areas will have to use default routes as they don't allow Type 5 LSAs in the area. The ASBR will generate a Type 5 LSA for each subnet including the following information.
  • LSID which is the subnet IP address
  • Mask which is the subnet mask
  • Advertising Router which is the RID of the ASBR
  • Metric which is set by the ASBR
  • External Metric Type which can either be Type 1 or Type 2
There are two metric types used, External Type 1 or External Type 2. These are displayed in the routing table as either "E1" or "E2". 
  • External Type 2 routes will just use the metric set by the ASBR, if there is multiple paths then having the same metric means it will then use the Type 4 LSA to calcualte which has the better cost. This is basically the cost of the ABR to the ASBR added to the existing metric.
  • External Type 1 routes will use the metric set by the ASBR but then add on the internal costs. 

LSA TYPE 6 - MULTICAST LSA

These are used when routing using multicast through the MODPF routing protocol and this LSA isn't supported on Cisco products.

LSA TYPE 7 - EXTERNAL LSA

This is basically the same as a Type 5 LSA. As Type 5 LSAs cannot enter stubby area, the Type 7 LSA was developed to get round this if an ASBR is found within a stuby area. The Type 7 LSA is flooded within the stubby area but as it reaches the ABR, it is then converted to a Type 5 LSA and flooded through the normal areas.

The External Route types here are the same but in the routing table will use "N1" or "N2" rather than the "E1" and "E2" that Type 5 LSAs use.

LSA TYPE 8 - EXTERNAL ATTRIBUTES LSA FOR BGP

This LSA is for use with the Border Gateway Protocol (BGP) 


Monday, March 1, 2021

Creating an Aruba IAP Cluster and SSID

This uses the Aruba 315 model IAPs.

BOOTING THE ACCESS POINTS

You need to power up the access points and ensure they can get an IP address via DHCP, you can manually specify one if you have the console cable. 

If you push down the reset button as it powers up, it should reset the access point. You will see if this has happened when the lights flash and flash for a second time 10 seconds later. Let the access point boot up.

CONNECTING TO THE SETMEUP SSID

Once the AP has booted up, got an IP address and is broadcasting the SetMeUp SSID you can begin to configure the access point. You should see a network named SetMeUp-XX:XX:XX which is the Aruba AP.

CONNECTING TO THE ADMIN PORTAL

Once you are connected you can access the admin portal via your web browser entering the IP address of the access point or using the URL 'setmeup.arubanetworks.com' to access the web portal. The username will be admin and the password is the serial number on the back of the access point.

USING THE PORTAL

Under Configuration you can change the controller's name, change network and access point settings, etc. Below you can see me setting the name of the IAP controller to JakeOnSysadmin.

CREATING AN SSID

To create a new SSID, you need to go to Configuration then Networks which will show the existing SSIDs. Click on the Plus sign to create a new SSID.

Go through the wizard setting the name, VLAN settings, security settings, etc.


Once finished you should now see the SSID broadcasting.

CLUSTERING THE ACCESS POINTS

If you boot up another access point within the same VLAN, it should cluster with the existing access point and broadcast the same SSIDs to extend your wireless coverage.


Setting Up DHCP on a HPE 5130 Switch

This covers setting up a HPE 5130 switch as your DHCP server.

ENABLING DHCP GLOBALLY

First you need to enable DHCP globally on the switch. You do so with the command below.


CREATE A VLAN AND VLAN INTERFACE

Now we need to create a VLAN and a VLAN interface which will be the gateway for the VLAN. Below are the commands used to create the VLAN and it's interface along with an IP address.


CREATING THE POOL

With the VLAN created, the pool needs to be created. You need to define the network address and mask as well as the range of addresses you can get via DHCP. The commands are shown below.


ASSIGN A DHCP POOL TO A VLAN INTERFACE

The newly created DHCP pool now needs to be assigned to the VLAN interface. This is done with the command shown below.


TESTING THE DHCP SERVER

That should be all, just to confirm I have plugged in an access point to see if it gets an IP address.


The command 'display dhcp server ip-in-use' will show the leases, as we can see there's a lease which shows DHCP is working.



Saturday, February 27, 2021

Stacking HPE 5130 Switches

The switches used in this example are HP 5130s.

WHAT ARE STACKED SWITCHES?

Stacked switches are multiple switches connected together in a cluster to appear as a single logical device. The benefits to this is ease of management with less IP addresses to document as well as redundancy as you can have multiple uplinks so if a link does go down, clients can go over the additional uplinks.

You can even use link aggregation on the uplinks to simplify spanning-tree topologies as well as load balance traffic up to the distribution layer switches.

MY LAB

Below is an example of the lab I am using for this. It's two HPE 5130s with stacking cables connected to the Ten-GigabitEthernet ports. The image below is of the stack completed.

The cables are connected last, once all the configuration is in place you then slot in the stacking cables.

CONFIGURING THE FIRST SWITCH

The first switch is the top one, it will need to be numbered to represent it's position in the stack (as it's the top switch it will be switch 1). You can use the command 'display irf' to show the IRF topology. AS the screenshot below shows, switch 1 is already set as Member 1.

Now that it is numbered correctly, the stacking ports need configuring. First you need to shutdown the ports you will be using, in this case Ten-Gig 1/0/49 and Ten-Gig 1/0/50, then assign them to an IRF port.

You create the IRF ports using the command 'irf-port <switch-num>/<port-num>' so I will be using irf-port 1/1 and 1/2. You define which physical port(s) you want to be part of that IRF port then once all your physical ports are associated with an IRF port, bring those ports back up.

Once the ports are ready, you can enable IRF on the switch using the command below. I will save the configuration and reboot it.

CONFIGURING THE SECOND SWITCH

Now this is the second switch therefore it needs to be renumbered as switches by default will be set as member 1. I can confirm this by using the 'display irf' command and then renumber the switch using the command shown below. You will need to save you changes then reboot the switch for the change to take affect.

After the reboot, I can check the IRF topology again to see it has now updated to be member 2.

Now, like before the switch will need it's ports setting up so shutdown the physical ports being used for stacking, set up the IRF port and associate the physical ports with that IRF port then bring them back up. Finally the IRF fabric is enabled to complete the setup of switch 2.

CONNECTING THE SWITCHES

With the configuration being set on each switch, all that is left is for the stacking cables to be connected. You need to push them in until they click into place and then the stack will automatically form. Some switches may reboot, typically the non-master switches will reboot. Once it is all back up, you can check the IRF topology and you should see both switches present.

Friday, February 12, 2021

Understanding Multi-Tiered Network Design

This covers designing networks with multiple tiers and redundancy.

DESIGNING A NETWORK

When designing a network, uptime, resiliency, redundancy, performance and manageability are the main things to design into the network. 

If you build a network with lots of redunancy then that will prevent a single point of failure causing a network outage. Redundancy allows the network to continue to run even if there is a link or network device down. The network can withstand outages while allowing end users to continue to work and give the network team time to resolve the issue. This resiliency will ensure the uptime is good within the network and lowers the impact of issues.

Redundancy can also improve performance. Multiple links between network devices can be logically made to act as a single link which allows traffic to load balance across the links for higher throughput. If a link does go down then spanning tree won't need adjust the tree and root ports, allowing traffic to continue to flow.

SIMPLE NETWORK DESIGN

Below is an example of a simple network. There's a router, layer 3 switch and layer 2 switches for end devices. Now this network can work, but if a link were to go down, or the layer 3 switch goes down then the network won't be able to carry on running.

TIERED NETWORK DESIGN

Now with redundancy then the network could look like below where the network is tiered. End devices connect to layer 2 switches at the access layer, if traffic needs to flow further through the network it can go up to the distribution layer then down to other layer 2 switch or up to the routers for internet access.

If a link or layer 3 switch goes down then the redunadant link can be used to avoid disrupting the flow of traffic and uptime within the network.

Segmenting the network like this makes it easier to manage. It will be easier to understand the flow of traffic and can be easier controlled with ACLs as well as adding in controlled segments like DMZs. 

FURTHER REDUNDANCY

You can go even further with stuff like clustering, the access layer switches can be clustered to logically behave as a single switch, same with the layer 3 switches clustered into a single logical switch. The routers can then use redundancy protocols such as HSRP, VRRP, GLBP to allow a router to failover if one goes down.

Understanding the DHCP Request Process

This covers the underlying process of clients requesting and receiving DHCP IP Addresses from DHCP servers.

DHCP MESSAGES

The DHCP process is made up of 4 messages between the client and the DHCP server.

  1. Discover - Client broadcasts out to see if there's a DHCP server.
  2. Offer - The DHCP Server responses with an IP address the client can have.
  3. Request - The end device requests to have the IP address
  4. Acknowledgement - The DHCP server acknowledges that the end device has that IP address now.

The messages from the client are broadcasts whereas the DHCP server responds using unicast.

What is Administrative Distance?

This covers administrative distance in terms of routing within computer networking.

THE NEED FOR ADMINISTRATIVE DISTANCE

When routing, there may be lots of possible best routes. Say you you were going to Network B, OSPF will determine the best route to there, EIGRP will determine a best route as well, IS-IS would too and maybe you have a static route to Network B. There's 4 different best paths to Network B but which one will be put into the routing table as the main route? This is what administrative distance handles.

Administrative Distance gives each routing method a score, this score rates how reliable and trustworth the route is. The lower the score the better. So if there's two routes to a network, one from OSPF and one from a static route, then the administrative distance score will be used to decide which route to use.

The list below shows the administrative distance scores for different routing protocols and methods of routing traffic. So in the case of OSPF vs a static route, the static route is trusted more and will be used over OSPF.

Route Protcol / Source Administrative Distance Score
Connected Devices 0
Static Routes 1
EIGRP Summary Route 5
External BGP 20
EIGRP 90
OSPF 110
IS-IS 115
RIP 120
External EIGRP 170
Internal BGP 200

What's the Difference Between Collision Domains & Broadcast Domains?

This covers the difference between a collision domain and broadcast domain in terms of computer networking.

WHAT IS A COLLISION DOMAIN?

Collision domains describe the area in a network where datagrams can collide. The number of collision domains depends on equipment. 

The image below shows a 4-port hub and 4-port switch. The hub and connecting devices are all a single collision domain, why? Because a hub forwards datagrams out of all interfaces therefore there's the possiblity of a collision on all interfaces whenever traffic is transmitted.

The switch in the image has 4 collisions domain, why? Switches are more intelligent, they make forwarding desicions based on the MAC address table therefore each each link between an end device and the switch is an isolated collision domain. There's 4 links therefore 4 collision domains.

WHAT IS A BROADCAST DOMAIN?

Broadcast domains describe how far a datagram broadcasted out can reach. If an end device broadcasts a datagram out, it will be forwarded out to the whole subnet. It doesn't pass routers or pass between subnets so a broadcast domain is contained in to it's own subnet. 

(You can forward broadcasts between subnets such as using DHCP Relays to forward a DHCP Request, which is a broadcast, between subnets)

The topology below shows two layer 2 networks separated by a router. The router is the barrier for the broadcasts so each side of the router is a broadcast domain.

VLANs can be used to minimise broadcast domains. If half of your switch is for VLAN 10 and the other half is set as VLAN 20, then broadcasts for VLAN 10 will only be forwarded to half of that switch meaning each VLAN will be it's own broadcast domain.