Skip to content

Instantly share code, notes, and snippets.

@vicradon
Last active May 30, 2024 07:40
Show Gist options
  • Save vicradon/3c9561c8937875937f1fdca3c31c799e to your computer and use it in GitHub Desktop.
Save vicradon/3c9561c8937875937f1fdca3c31c799e to your computer and use it in GitHub Desktop.
Bunch of networking notes

Networking Notes

A bunch of notes about networking related concepts such as TCP/IP, DNS, BGP, OSPF, etc.

How to Configure a new interface on a Cisco IOS Router

The first step is to enter the priviledged exec mode using the enable (or en) command. In this mode, you can check the current interfaces using the show ip interface brief command. You can then define new loopback interfaces using the commands:

Router#conf t
Router(config)#interface loopback 0
Router(config)#ip address 10.0.0.1 255.0.0.0

Router(config)#interface loopback 1
Router(config)#ip address 192.168.0.1 255.255.255.0
...

The command above configures two loopback interfaces on the router. Loopback interfaces are always up and are software based.

Common IOS Commands

Command Use case
show ip interface brief shows the interfaces configured on a router

Configure BGP

Router#conf t

Router(config)#interface loopback 1
Router(config)#ip address 192.168.0.1 255.255.255.0
Router(config)#router bgp 21
Router(config)#network 34.0.0.0 mask 255.255.255.0
...

The command above configures bgp on loopback interface 0

Tables in networking

There are several tables in networking. There's the

  1. ARP table that maps IP addresses to Mac addresses
  2. Mac address table that maps Mac addresses to physical ports on a switch
  3. IP routing tables that maps IP network prefixes to destination next hop alongside a metric for choosing the best path

We will now look at these tables in great detail.

ARP Table

The ARP table maps IP addresses to Mac addresses. It lives on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment