Networking Notes

Networking concepts and terms is something I keep forgetting and keep re-remembering them. So this blog post is mainly for me to come back to and refresh my memory. It could also be helpful for some of you too. This is gonna be a live post where I will keep adding stuff as I learn more about networking and feel the necessity to put it here.

Networking interface is a component that allows a device to basically participate in any network. For example there is lo interface that has an ip of 127.0.0.1, which is obv loopback and we know what it does, and then there are interfaces for wifi connection, ethernet and so on. An interface has an ip and a mac address as well along with other stuff obviously. An example below.

eth0@if25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether bc:24:11:87:a0:72 brd ff:ff:ff:ff:ff:ff link-netnsid 0

inet 10.0.0.50/24 metric 1024 brd 10.0.0.255 scope global eth0

valid_lft forever preferred_lft forever

inet6 fe80::be24:11ff:fe87:a072/64 scope link proto kernel_ll

valid_lft forever preferred_lft forever

A Gateway allows packets to enter and leave the network. So every network has to have a gateway if it wants to connect to any other network/internet.

Routing tables are used to guide packets which gateway to go to for a particular destination. Now this obviously comes into picture if a network has more than one gateway. Note that even is there is only one gateway, a device would still have a routing table. But the question of thinking about or configuring route tables generally comes when there is more than one gateway to a network. We can use the following command to get the default gateway

ip route show