🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

OS Fundamentals - 6 - networking.pdf

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Full Transcript

OS FUNDAMENTALS Networking 1 Phaedra Degreef TCP/IP NETWORKING 2 LAN • Local Area Network 3 OSI MODEL OF NETWORKING 4 COMMUNICATION - ENCAPSULATION 5 IP • Layer 3: network layer • Most common protocol used: IP − IP v4 − IP v6 • IP address: unique identifier for each host on the net...

OS FUNDAMENTALS Networking 1 Phaedra Degreef TCP/IP NETWORKING 2 LAN • Local Area Network 3 OSI MODEL OF NETWORKING 4 COMMUNICATION - ENCAPSULATION 5 IP • Layer 3: network layer • Most common protocol used: IP − IP v4 − IP v6 • IP address: unique identifier for each host on the network 6 IP ADDRESS • IP v4: 32-bit addresses • Mostly written in “dotted decimal” notation − 192.168.1.100 • Too limited nr of addresses available in today’s world − 232 = 4.294.967.296 possible addresses 7 IP ADDRESS • IP v6: 128 bits address − 2128 addresses = like a LOT of addresses • Written as a string of hexadecimal values separated by colons (:) − 2001:0DB8:0000:1111:1111:0000:0000:0000:0200 − 2001:DB8:0:1111:1111:0:0:0:200 − 2001:DB8:0:1111:1111::200 8 IP V4 • Address + subnet mask − Address 192.168.1.2 − Subnet mask 255.255.255.0 • Subnet mask defines which part of address is network part and which is host part • Only hosts within the same network part can communicate = broadcast domain 9 IP ADDRESSES • Address 192.168. 1.2 • Subnet mask 255.255.255.0 − The blue part of the address is called the network part • Can communicate with any other device that has an IP address with the same network part » 192.168.1.1 to 192.168.1.254 − The red part is called the host part • 0 is reserved for the so-called network address » Can not be used as a valid IP address of a device • Must be unique for each device • .255 is reserved as broadcast address 10 OTHER EXAMPLE • IP address 10. 1.1.2 • Subnet mask 255.255.0.0 − Network address: 10.1.0.0 − Broadcast address 10.1.255.255 − Can communicate with • 10.1.0.1 → 10.1.255.254 11 CAN I USE VALUE 255 THEN? • Not when it is the broadcast address • When is it a broadcast address? − Network 192.168.1.0 subnet 255.255.255.0 • Broadcast address: 192.168.1.255 − Network 192.168.0.0 subnet 255.255.0.0 • Broadcast address 192.168.255.255 » Address 192.168.255.1 → 192.168.255.254 are valid! • In technical terms: when all of the bits of the host part of the address are set to 1 − 1111 1111 = 255 12 NEW NOTATION • Network 192.168.1.0 subnet mask 255.255.255.0 • Can also be noted (most recent notation) as • Address 192.168.1.0/24 − Which means: the first 24 bits of the address are the network part of the address − Each number in the IP address represents 8 bits • First 3 number together = 24 bits • Other example: 10.1.0.0 255.255.0.0 − 10.1.0.0/16 13 BROADCAST • Send packets to ALL • Better limit that “ALL” − ➔ domains 14 BROADCAST DOMAIN 192.168.1.0/24 15 172.124.0.0/16 SUBNET MASK Ex.: 120.0.0.0 network: any host with an IP address starting with 120. example: host 120.2.1.8 and host 120.20.5.6 are in the same broadcast domain = can communicate directly Ex.: 130.25.0.0 network: any host with an IP address starting with 130.25 example: host 130.25.4.8 and host 130.25.5.12 are in the same broadcast domain = can communicate directly Ex.: 192.168.1.0 network: any host with an IP address starting with 192.168.1. example: host 192.168.1.10 and host 192.168.1.6 are in the same broadcast domain = can communicate directly 16 SUBNETTING 17 ONLY SWITCH switch 192.168.1.1 255.255.255.0 18 192.168.1.2 255.255.255.0 192.168.1.3 255.255.255.0 120.70.0.0 255.255.0.0 SWITCH + ROUTER router switch 192.168.1.1 255.255.255.0 19 192.168.1.2 255.255.255.0 192.168.1.3 255.255.255.0 120.70.0.0 255.255.0.0 IP ADDRESSES • Configuration − Manual • Temporary • Persistent − Automatic • DHCP protocol 20 MANUAL IP CONFIGURATION MANUAL IP CONFIGURATION - WINDOWS 22 MANUAL IP CONFIGURATION - WINDOWS 23 VERIFY SETTINGS - IPCONFIG 24 LINUX – IP ADDRESS CONFIGURATION • Temporary assignment (lost after reboot) − ifconfig (deprecated, do not use) − ip command • Persistent assignment − Configuration file • Depends on distribution & version 25 LINUX – IP COMMAND 26 LINUX - NETPLAN • /etc/netplan/99_config.yaml file Check the actual name of your network interface (“ip a” command) Optional – not required for the lab exercises • Apply the configuration: 27 AUTOMATIC IP ADDRESS ASSIGNMENT - DHCP DHCP • Dynamic Host Configuration Protocol • “leasing” of IP addresses (automatic option) • Used in case of dynamically changing infrastructure (BYOD) − IP addresses must be unique within network − With a lot of devices, not enough addresses available − Not all devices are always present, so addresses can be “leased” for a specified time interval 29 DHCP TOPOLOGY 30 31 DHCP RANGE 32 DHCP - WINDOWS • Configure network adapter for DHCP 33 DHCP - WINDOWS 34 DHCP - WINDOWS • Getting a new IP address via DHCP − First step: release current address • ipconfig/release − Second step: get a new address • ipconfig/renew 35 DHCP SERVER IN WINDOWS • Windows server roles − − − − − − − − 36 DHCP DNS Storage services (for network storage) File or application server Remote access Web server (IIS) Active Directory …. WINDOWS 2012 SERVER DHCP ROLE • All roles are installed/activated via the server manager app: 37 SOME NEXT -> NEXT STUFF 38 39 40 41 42 43 44 45 46 DEFINING A DHCP SCOPE • From the Server Manager -> Tools -> DHCP 47 • Select your server -> IPv4 -> “New scope” • The “New scope wizard” opens 48 • Name your new scope 49 • Define range and subnet length/mask 50 • You can exclude some (static) IP addresses 51 • Configure lease duration 52 • Optional configuration: DNS, WINS, gateway 53 • Final step: ACTIVATE the new scope 54 • Add/manage reservations − Alternative for static IP address 55 56 DHCP - LINUX • Configure an Ethernet adapter for DHCP: − Modify network configuration files (interfaces or netplan file, depending on distribution/version) − ifconfig command (DO NOT USE) 57 DHCP - LINUX • 58 Renew DHCP address: dhclient DHCP SERVER FOR LINUX: DNSMASQ • DNS resolver & DHCP server • Steps: − Install dnsmasq − Set DHCP ranges per network interface − Restart dnsmasq daemon (!) 59 MORE INFO • https://help.ubuntu.com/lts/serverguide/net work-configuration.html.en 60 LAB ASSIGNMENT • Create a DHCP server and DHCP client studentX_pub network DHCP server studentX_priv network studentX_priv network DHCP client 61 REMOTE CONNECTION REMOTE CONNECTION • Why? − Remote computer/system management − Remote support − Server room: less physical access required 63 WINDOWS • Remote desktop • VNC 64 REMOTE DESKTOP • Very lightweight protocol 65 REMOTE DESKTOP • Step 1: allow remote connections on “target” computer: 66 REMOTE DESKTOP • Step 2: open remote desktop on source: 67 REMOTE DESKTOP • Credentials 68 REMOTE DESKTOP • Result: 69 LINUX • telnet, rsh, rlogin • Ssh: secure version • VNC 70 TELNET • Original protocol − TCP/IP − Client/server • Name of protocol as well as the name of the tool to use the protocol • Very large support, can be used standard on many (network) devices • Not encrypted! 71 RSH / SSH • Command-line remote shell − Rsh, rlogin: unencrypted connection − ssh: encrypted connection • Username/password can be replaced by certificate 72 RSH • Execute a command, then terminate − Example: execute a mkdir command on remote system remotehost.example.com as user remoteuser: • rsh –l remoteuser remotehost.example.com “mkdir mydir” • If no command is given: rlogin session − Is manually terminated 73 VNC • Client-server application − Server: VNCserver: installed and active on remote system − Client: VNCviewer: on local system 74 GATEWAYS, ROUTING DEFAULT GATEWAY • One host can only communicate directly with other hosts in the same network (broadcast domain) • All others need a device called a router • The IP address of the router is the default gateway • A host needs a default gateway address in the same network! 76 ROUTING, GATEWAY 77 MAC ADDRESS • Unique hardware address • Per network adapter • IP address – MAC address association: arp − Arp request with IP address is sent to all − Destination host responds with MAC address 78 LINUX ROUTE COMMAND • Static routes 79 DYNAMIC ROUTES • Network routing infrastructure is very dynamic (Internet) • Routers adapt themselves dynamically − Self-learning routing protocols, discovery 80 81 82 WWW ROUTING INFRASTRUCTURE 83 DNS DNS • Domain Name System • Designed in 1983 • First Unix implementation in 1984: − BIND: Berkeley Internet Name Domain − Ported to Windows in 1990 • Replaced the “hosts.txt” file with manual mappings… 85 WHAT IS DNS? • Translates a name to an IP-address • Because names are easier to work with than addresses… • Request-response principle www.google.com? 64.233.166.99 86 87 DOMAIN NAMES - Hierarchical structure - Maximum 253 characters, up to 127 levels label 88 DOMAIN NAME SPACE ORGANISATION • Hierarchical database • Top level: “root” • Top-level-domains − .com .org …. • Sub-domains 89 HIERARCHY 90 91 NETWORK TOOLS HANDY TOOLS / COMMANDS • Ping − Test layer 3 connectivity • Nslookup − DNS lookup • Wget − Retrieve files via http, https or ftp • Traceroute − Visualize route to destination 93 LOCALHOST • Special case: 127.0.0.1 = own network interface • Test network card: ping localhost 94 NSLOOKUP 95 NSLOOKUP – EMAIL SERVERS 96 TRACEROUTE 97 GUI VERSION OF TRACEROUTE 98 IPCONFIG 99

Use Quizgecko on...
Browser
Browser