0% found this document useful (0 votes)
30 views23 pages

12 Networking Basics

Uploaded by

adeelpfizer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views23 pages

12 Networking Basics

Uploaded by

adeelpfizer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Networking basics

Networking
Multiple physical or virtual computing devices interconnected together to form network
Medium

wired wireless
LAN
WAN
Network interface controller
Media access control (MAC)
It is a physical address or hardware address

It is a unique identifier for IEEE 802 Network technologies (Ethernet, Wifi, Bluetooth)

It is denoted in hexadecimal (12 hexadecimal or 48 bits)

eg: 00-1E-67-B0-08-D8
Internet protocol (IP)
It is logical address or location based identification

It denoted in dotted decimal (it is 32 bit address)

eg:

192.168.1.100
Ranges of IP

00000000 00000000 00000000 00000000

11111111 11111111 11111111 11111111

Range

0.0.0.0

255.255.255.255
Classes of IP
A 0 - 127

B 128 - 191

C 192 - 223

D 224 - 239 - (Multicasting)

E 240 - 255 - (R&D)

0 - (Any network)

127 - (Loopback)
Network / Host
Network Host

Class A - 8bits 24bits

Class B - 16bits 16bits

Class C - 24bits 8bits


Subnet mask / Prefix length
Class A - 255.0.0.0 or /8

Class B - 255.255.0.0 or /16

Class C - 255.255.255.0 or /24


Naming of NIC in linux
Physical NIC

ethX, ensX, enoX, enpXsY

Virtual NIC

lo, brX, virbrX, teamX, vnetX, bond

Wireless NIC

wlanX
Verify NIC and IP property
ip link && ip addr
IP command (delete IP address)
ip addr del 10.0.0.10/8 dev ens160
IP command (adding IP address)
ip addr add 172.16.0.10/16 dev ens160
Note:

IP command is not permanent

For permanent connection (configuration) edit /etc/sysconfig/network-scripts/ifcfg-*


Network manager
It is a daemon in rhel which is used to manage IP property

Two ways of managing

1. nmtui
2. nmcli
Listing the connection
nmcli con show

nmcli con show --active

nmcli con show <con-name> | grep ipv4

nmcli con show <con-name> | grep connection


Deleting the connection
nmcli con del <con-name>
Creating a connection
#dhcp

nmcli con add con-name <con-name> ifname ens160 type ethernet

#manual

nmcli con add con-name <con-name> ifname ens160 type ethernet ip4 172.17.0.10/16 gw4 172.17.0.1
ip6 2000::10/64 gw6 2000::1
Activating/Deactivating a connection
nmcli con up <con-name>

nmcli con down <con-name>


Modifying a connection property
nmcli con modify <con-name> ipv4.addresses 172.18.0.10/16 ipv4.gateway 172.18.0.1 ipv4.dns 8.8.8.8
ipv4.method manual

You might also like