| Layer# | Layer name | PDU | Description | Examples of Protocols |
|---|---|---|---|---|
| 7 | Application | Data | Network Process to Application | DNS, FTP, HTTP, Telnet, DHCP |
| 6 | Presentation | Data | Data Representation and Encryption | GIF, JPEG, SSL, MIME |
| 5 | Session | Data | Interhost Communications | NetBIOS, Sockets, Named, Pipes, RPC |
| 4 | Transport | Segment | End-to-End Connections and reliability | TCP, UDP |
| 3 | Network | Packet | Path Determination | IPv4, IPv6, IPsec, BGP, ICMP, IGMP |
| 2 | Datalink | Frame | Physical Addressing | Ethernet, MAC, Wifi, LLC |
| 1 | Physical | Bits | Mediums, signals, and binary transmission | Cat5e, Fiber, Wireless |
/etc/protocolseth0, ens23, enp0s3, ens1p1, wlan0, etc…intf0:0 (numbers between 0 to 255)
eth0.2 = vlan 2 on eth0/etc/network/ (check out these directories in your VM!)/etc/systemd/network/usr/lib/systemd/network/usr/local/lib/systemd/network/etc/NetworkManager/NetworkManager.conf (is this present in your Ubuntu Server?)Ifconfig, ip, netplan, ethtool, etc…ifconfig and have switched to more modern, more powerful ip and netplan utilities
networkd or Network Manager in Ubuntuip CommandNote: ifconfig is deprecated. You can still install ifconfig utility manually in Ubuntu via ethtools package
ip utility is designed to be one command to rule them all! Functionally organized on Layer 2 and 3 of the network stackip is capable of almost all networking-related tasks:
Netplan instead!ip Command Structure (how to use)ip or sudo ip)address (Layer 3)link (layer 2, physical interface itself)maddr (layer 3, Multi-cast address)neigh (layer 2, ARP tables)route (layer 3, route tables)show or modifying sub-commands:
showadd, del, setdev <interface>Here is a nice IP Command Cheat Sheet from RedHat: https://access.redhat.com/sites/default/files/attachments/rh_ip_command_cheatsheet_1214_jcs_print.pdf
Netplan for Persistent ConfigurationNetplan website for introduction and documentation: https://netplan.io/Netplan uses YAML format for configuration files/etc/netplan/*.yamlNetplan supports Network Manager and system-networkd (you can choose via .yaml)# <- this is a comment
# Blank space indicate indentation (use space bar to insert appropriate number of them)!
network:
version: 2 # We only use version: 2
renderer: <renderer name> # use “networkd” or “networkmanager”
ethernets:
<device_name>: # Use `ip addr show` to get the logical name of the interface (examples: eth1, ens33, or ens34) Or use `lshw –class network`
dhcp4: <true/false>
addresses: [<IP>/<mask>]
gateway: <Gateway_IP>
nameservers:
addresses: [<DNS_IP_1>,<DNS_IP_1>]
# <- this is a comment
# Blank space indicate indentation (use space bar to insert appropriate number of them)!
network:
version: 2 # We only use version: 2
renderer: <renderer name> # use “networkd” or “networkmanager”
ethernets:
<device_name>: # Use `ip addr show` to get the logical name of the interface (examples: eth1, ens33, or ens34) Or use `lshw –class network`
dhcp4: <true/false>
addresses: [<IP>/<mask>]
gateway: <Gateway_IP>
nameservers:
addresses: [<DNS_IP_1>,<DNS_IP_1>]
Netplan read your configuration use the following commands:
sudo netplan try: Try out the configuration for 120 Seconds to make sure everything is finesudo netplan apply: Apply configuration permanentlysudo netplan --debug generateipnetplanlshw –C networkping/etc/protocols/etc/netplan/*.yaml/etc/network//etc/systemd/network/usr/lib/systemd/network/usr/local/lib/systemd/network