PPT - Department of Computer Science

Download Report

Transcript PPT - Department of Computer Science

/dev/urandom
Barry Britt, Systems Support Group
Department of Computer Science
Iowa State University
Outline

DNS

Samba

Apache

NAT & routing
DNS

How does your machine find out that:


popeye.cs.iastate.edu => 129.186.3.66
Domain Name System

Consists of name servers, each responsible for
“domains”

What are domains?




.edu
.com
.org
.iastate.edu
DNS querying


Every FQDN (Fully Qualified Domain Name) has
an implied '.' at the end of it

popeye.cs.iastate.edu.

www.google.com.

en.wikipedia.org.
Queries are handled by the DNS servers referenced
on your computer.

/etc/resolv.conf on most Linux machines
Anatomy of a DNS Query


How does your machine
know what to do?
RFC 1035 (DNS
Protocol Specification)


Says, start at the
end and work to
the beginning.
Let's query:
www.google.com.
Your
Computer
Where is www.google.com?
Where is .com.?
. (root)
Name servers
Your DNS
Where is
.google.com.?
.com
Name servers
Where is
www.google.com.??
.google.com
Name servers
More DNS


Queries must be done for every host name (but
results are cached for a period of time)
Note:


One server process can be a client process for
another service
e.g. - network time protocol (NTP)

Queries a time server (time.iastate.edu) for the
correct time.

Uses DNS to resolve time.iastate.edu
Samba



What is it?
Short Answer: Software that allows a UNIX
machine to work as a Windows File Server
Long Answer:

M$ uses a protocol called CIFS for file sharing
(Common Internet File System)

M$ uses a transport protocol for CIFS called SMB
(Server Message Block)

Samba is an implementation of SMB/CIFS that
runs on many types of machines
Samba History


1992 → Andrew Tridgell

Wanted to connect DOS PC and UNIX Server
AND

Wanted to use NetBIOS on both
So... he accomplished this by:

Writing a packet sniffer

Reverse engineering the SMB protocol

Implementing this on a UNIX machine so that it
behaved like a

Then, he released the code to the public
Samba History

1994 → Tridgell wanted to link wife's windows
machine to his Linux network.


1999 → Samba 2.0 is released


Tried his old code, and it worked!
Testing shows that Samba 2.0 is 2x faster than
Windows 2000 Server
2003 → Samba 3.0 is released

Testing shows that Samba 3.0 is 2.5x faster than
Windows 2003 Server
Samba Misc. Info


Samba project is HUGE (www.samba.org)
Samba is mentioned in the famous “Halloween
Memo” from Microsoft (leaked memo in the late
80's)

License is GPL

Server can be any (or all) of the following:

NetBIOS (name resolution) server

Domain Browser

Authentication server

File & Print Server
Samba Misc. Info

Client

Feels like it's talking to a Windows Server





For More Info....

SMB How-To at www.tldp.org

Official How-To at www.samba.org


Can Mount files
Can get NetBIOS resolution
Can authenticate to Samba server
Can browse the Domain
Chapter 2
You WILL be doing this in Lab.
Apache


License: Apache Software License (ASL)

Free software license, similar to GPL but allows
for patented software inclusion.

Why? Want 3rd party contributions from
companies.
Known for...

HTTP Server

Apache 1.0 → release 1995

After 1 year, Apache is the #1 web server on the
Internet
Apache

Today:

Apache is the #1 web server on the internet

October 2004



IIS: 21.1% share
November 2005


Apache: 67.9% share
Apache: 70.9% share
IIS: 20.2% share
Runs on all major platforms, and some non-major
ones too
Runs sites that get tens of millions of unique hits per
day
Apache

Customization


Apache uses modules that are can be loaded at
compile time or run time
Why use Apache?

Acc'd to netcraft “Most Reliable Hosting
Company” as of Aug 2010, out of the top 10:



8 are Linux based
2 are Free BSD based
Apache/Linux runs the content on the Internet
Apache for Lab

You will

Set up a basic HTTP server

Static content


HTML pages that sit on a location on the server
Dynamic content


Pages that are constructed by the server
Output because of:


Executable (C or some other language)
Script (CGI, bash script, etc...)
Apache for Lab

References

Chapter 26 of textbook

Many apache how-to docs at www.tdlp.org

Apache documentation


httpd.apache.org
www.apache.org
Routing

Router


Device that interconnects 2 or more computer
networks
Example: a home network

2 IP address, one for each network
Internal (private)
External (public)
PC1
PC2
PC3
192.168.0.x
Router
203.176.5.49
ISP/Internet/etc...
Routing

Router's Job

Any traffic from 192.168.0.x subnet



Destined for internet → forward to 203.176.5.49
Destined for local → resend internally
Hosts specify the router's internal address as
“gateway”
NAT

Network Address Translation

Actually modifies the network addresses in the IP
packets

Why?



IP Masquerading → the NAT Router sends all traffic
AS ITSELF
The outside world cannot see the 192.168.0.x subnet
(private network)
Therefore, we can “share” the internet connection
from our ISP over our home network, ISP has no
way to tell
NAT


Some IP address blocks are reserved for private
networks

10.0.0.0 – 10.255.255.255 (24 bit block)

172.16.0.0 – 172.31.255.255 (20 bit block)

192.168.0.0 – 192.168.255.255 (16 bit block)
All these ranges are safe to use for private networks
NAT

NAT has significantly slowed the consumption of
IPv4 addresses.

Delay of Ipv6 adoption is primarily due to NAT

How many devices connected to Internet?


Recent estimate: > 5,000,000,000

Over IPv4 limit of 232
Google Server Farm(s) may have > 10,000 all inside
of private IP space using NAT

Only the front-end “gateway”s need proper IP
addresses