DEV Community

Randika Madhushan Perera
Randika Madhushan Perera

Posted on

Managing Networking

1. Describing Networking Concepts

1.1 TCP/IP Network Model

  • Application

Each application has specifications for communication so that clients and servers may communicate across platforms. Standard protocols include SSH (remote login), HTTPS (secure web), NFS or CIFS (file sharing), and SMTP (electronic mail delivery).

  • Transport

TCP and UDP are the protocols for the transport layer. A list of well-known and registered ports can be found in the /etc/services file.

  • Internet

The Internet, or network layer, carries data from the source host to the destination host. The IPv4 and IPv6 protocols are Internet layer protocols. Each host has an IP address and a prefix used to determine network addresses. Routers are used to connect networks.

  • Link

The link, or media access, layer connects to physical media. The most common types of networks are wired Ethernet (802.3) and wireless WLAN (802.11). Each physical device has a hardware address (MAC) used to identify the destination of packets on the local network segment.

1.2 IPv4 Networking

  • IPv4 Addresses

    • IPv4 is a 32-bit number.
    • Ranging in value from 0-255 and separated by dots.
    • The address has two parts network part and host part.
    • All hosts on the same subnet, can talk to each other without a router.

Key points:

  • netmask: indicates how many bits of the IPv4 address belong to the subnet.
  • network address: the lowest possible address on a subnet (host part is all zeros in binary).
  • broadcast address: The highest possible address on a subnet (host part is all ones in binary).

Examples:

01) The IP address is 192.168.1.107 and the netmask is 255.255.255.0. Calculate the Network address and broadcast address.

IPv4 addresses and netmasks

IP address: 192.168.1.107 = 11000000.10101000.00000001.01101011
Network prefix:255.255.255.0 = 11111111.11111111.11111111.00000000
Network addr :192.168.1.0 = 11000000.10101000.00000001.00000000
Broadcast addr:192.168.1.255 = 11000000.10101000.00000001.11111111

02) A server should have the static IP address of 192.168.1.102/255.255.255.0. The default gateway is 192.168.1.1 and the DNS should be 192.168.1.1. Configure the server's network configuration

step 01:

$ nmcli connection add con-name static type ethernet ifname enp0s3

step 02:

$ nmcli connection show

network connection show

step 03:

$ nmcli connection modify static ipv4.addresses "192.168.100.102/24" ipv4.gateway 192.168.100.1 ipv4.dns 192.168.100.1 ipv4.method static connection.autoconnect yes

step 04:

$ nmcli connection show static

network connection show

step 05:

$ nmcli connection down enp0s3; nmcli connection up static

connection drop and up

step 06:

$ reboot

Top comments (0)