get_queried_object_id(); # if the same page, get the correct template. if( $page_id == $posts_per_page_id ){ # get the current theme directory. $theme_directory = get_stylesheet_directory() ."/"; # get the page template $page_template = get_post_meta($page_id, '_wp_page_template', true ); # by-pass the default template, allow wordpress to handle the fallback template. if( $page_template != 'default' ){ # find the template in the parent if the template is not a child template if( is_child_theme() && !file_exists($theme_directory . $page_template) ){ # set to parent template directory $theme_directory = get_template_directory(); } return $theme_directory . $page_template; } } } return $template; } add_filter('template_include', 'posts_page_custom_template'); ?> What is a Network? | tech your ideas

What is a Network?

A network is a way to get ”stuff” between 2 or more “things”

Goal: Basic understanding of common modern networking technology and terminology

Examples:

  • Analog: ’Snail’ Mail, phone system, conversations, railroad system, highways and roads.
  • Digital: Routers & switches, clients & servers
  • Applications: Email/Messaging, Database, Web

Protocol Concepts

  • Protocols are sets of rules.
  • What do you want to do? (Application)
  • Where are you going? (Addressing)
  • How do you get there? (Media types)
  • Did you get there? (Acknowledgments, Error checking

Computer Networking Models

OSI (Open System Interconnection) Model

Application
Presentation
Session
Transport
Network
Datalink
Physical

DOD – LAN > Protocol Application

Simplified Four Layer Model

Application
Transport + Network
Data
Physical

Layers in Abstract

Physical Layer (layer 1)

  • Cat 5 (or Cat 5e or Cat6) twisted pair copper wire
  • Fiber (multi-mode or single-mode) coaxial copper (thick- and thin-net)
  • Cable Modem, plain phone (DSL), microwaves (wireless ethernet), etc.
  • Wi-Fi, IEEE 802.11

Data Link (Layer 2)

  • The Media Access Control (or MAC) address, or sometimes Ethernet address, physical address, adapter address, hardware address, etc.
  • It’s a 12-digit (48 bit) hexadecimal address that is unique to that Ethernet adapter and no other in the world. It can be written as or 0030.6583.fcOa or 003065:83fcOa or 00-30- 65-83-fc-0a but they all mean the same thing.
  • The first 6 digits are the Vendor code, (003065 belongs to Apple), the last 6 are the individual interface’s own. Like a car’s VIN. See http://coffer.com/mac_find/ to look up some vendor codes.

Network Layer (Layer 3)

  • Network packets can be routed.
  • Network layer packets have to be stuffed inside the data layer packets. This is called “encapsulation” and is why a layered model is
    so handy.
    When you link computers, via layers 1 (Physical) and 2 (Data) you get a network.
  • When you link networks, you get an internetwork. You need the Network layer (3) to get data between all the little networks (often called subnets) of your internetwork.
  • Network Layer Protocols: Internet Protocol (IP) and some others that aren’t used any more (AppleTalk, Netware, etc.)
  • The Internet Protocol (IP) is the Network layer protocol used on the Internet!
  • ARP: Address Resolution Protocol. Turns an IP number into an number, very important.
  • Instead of asking “Who’s Bob?” you ask “Who’s 172.19.4.15” and if you get a reply, associate the Ethernet address.
IP Addressing
  • IPv4 addresses consists of 4 “octets” such as: 171.64.20.23
  • Each “octet” consists of numbers between O and 255 (or 00 and FF in hex! Don’t ask why Ethernet is in hex but IP isn’t, they just are.)
  • It works sort of like the phone system, with “area codes” to the left, then “prefix” etc. but more flexible. On campus, your computer will
  • know that “171.64.” means “UNO” while it will figure out that “20” means “Pine Hall” and will learn that “23” means the computer called “networking.” It does this via sub-net masking (in this case, 255.255.255.0), which isn’t covered in this class.
  • IPv6 uses a 128-bit address, theoretically allowing 2^128, or approximately 3.4×10^38 addresses.
    • Example: FE80:0000:0000:0000:0202:B3FF:FE1E:8329
IP: Domain Name Resolution (DNS)
  • Since most people find it easier to remember names instead of numbers, IP numbers can and almost always are associated with names.
  • Your computer, however, needs a number, so the Domain Name System (DNS) exists to make everyone happy.
  • A name, such as networking.cybrary.edu tells you the first (or top) level
  • domain (.edu, for educational institutions) the second level domain (cybrary) and the actual host’s name (networking).
    • If you want the number for a host name within cybrary.edu, you’ll ask one of our DNS servers to give it to you.
    • If you need to go outside cybrary.edu, you’ll still ask our servers, but they’ll figure out which other server(s) should get your request, send it to them, and will send the reply back to you.
  • Use nslookup command to identify DNS resolutions. eg : nslookup google.com

Transport Layer(Layer 4)

  • The protocols of the layer provide host-to-host communication services for applications.
  • Uses in-coming and out-going ports to/from a server.
    • Http: port 80
    • Https: port 443
  • Major types:
    • Transmission Control Protocol (TCP) is connection-oriented and provide error checking.
    • User Datagram Protocol (UDP) is connection less. Used for streaming
TCP Connections

Application Layer (Layer 7)

  • Interfaces with the operating system and other applications and communicates data between files, messages, and other network activities.
  • Examples: Email (smtp), Web (http), file transfer (ftp), time (ntp)

Comments

One response to “What is a Network?”

  1. ปั้มไลค์ Avatar

    Like!! Thank you for publishing this awesome article.

Leave a Reply

Your email address will not be published. Required fields are marked *