Department of Electrical Engineering and Computer Sciences University of California Berkeley Basic Background General Overview of different kinds of networks General Design Principles Architecture Performance How to write a network application Now let s get into how things really work Application Must separate the application processing from the application protocols Example TCP IP Network WWW Browser Server HTTP Also applications can be run on the end hosts or inside the network cloud WWW on end hosts DNS in the network cloud UDP HTTP DNS TCP UDP IP Ethernet FDDI Token Etc 0 DNS WWW HTTP Both are client server applications have decentralized management enable access to vast amounts of distributed information are based on open protocols are distributed databases 0 1 0 0 Resolves a host name names into an IP address Why host names To organize machines Eg robotics eecs berkeley edu This conveys more information to humans than 128 32 48 234 Why IP addresss The network needs an address to route Host Names yield information to people and IP addresses yield information to routers 0 Initially all host addess mappings were in a file called hosts txt in etc hosts Changes were submitted to SRI by email New versions of hosts txt were ftp d periodically from SRI An administrator could pick names at their discretion As the internet grew this system broke down because SRI couldn t handled the load The system was unreliable since there was a single point of contact Names were not unique Many hosts had inaccurate copies of hosts txt Internet growth was threatened 0 Hierarchical Namespace Distributed architecture for storing names Nameservers assigned zones of the hierarchical namespace Backup servers available for redundancy Administration divided along the same hierarchy DNS client is simple Resolver Client server interaction on UDP Port 53 but can use TCP if desired 0 2 0 4 root edu berkeley eecs gov com mil org net uk fr The first level names are called Top Level Domains Depth of tree is arbitrary limit 128 Domains are subtrees mit sims E g berkeley edu and eecs berkeley edu Name collision avoided argus E g berkeley edu and berkeley com 0 3 0 0 root edu berkeley eecs sims gov com mil org net uk fr mit A zone corresponds to an administrative authority that is responsible for that portion of the hierarchy argus 0 5 6 Servers are organized in hierarchies Each server has authority over a portion of the hierarchy A server maintains only a subset of all names Each server contains all the records for the hosts in its zone Each server needs to know other servers that are responsible for the other portions of the hierarchy Every server knows the root Root server knows about all top level domains 0 70 8 root name server Host whistler cs cmu edu wants IP address of www berkeley edu 2 1 Contacts its local DNS server mango srv cs cmu edu 2 mango srv cs cmu edu contacts root name server if necessary 3 Root name server contacts authoritative name server ns1 berkeley edu if necessary 5 local name server authoritative name server mango srv cs cmu edu 1 whistler cs cmu edu ns1 berkeley edu 6 requesting host 3 4 0 www berkeley edu 70 8 root name server Root name server May not know authoritative 6 2 name server 7 3 May know intermediate name server who to contact to find authoritative name server local name server intermediate name server Recursive query mango srv cs cmu edu Puts burden of name resolution on contacted name server Heavy load 1 edu server 4 8 5 authoritative name server ns1 berkeley edu requesting host whistler cs cmu edu www berkeley edu 0 8 Iterated query root name server Contacted server 2 replies with name 3 of server to contact I don t know this name but ask this local name server server mango srv cs cmu edu 1 iterated query 4 5 intermediate name server edu server 6 8 requesting host 7 authoritative name server ns1 berkeley edu whistler cs cmu edu 0 www berkeley edu For non root severs multiple servers are common as well Caching provides another form of redundancy and quicker response time DOS attack in October 2002 Secure DNS A M Root Servers Net 0 1 70 0 9 Mail Exchange Point A host that either processes or forwards mail Why should the DNS just resolve IP addresses MX records map a name to the name of the mail exchange point for that name Example www tecknowbasic com IN 10 formidible cnchost com www tecknowbasic com IN 20 zealous cnchost com www tecknowbasic com IN 30 inflexible cnchost com Lower numbers imply higher preference 0 5 DNS records don t have to store the real IP address of the host All hosts in the acme com may have the same IP address A firewall at this IP address decides whether to admit a transport level connection firewall to the host x acme com A load balancer decides to forward the connection to one of several identical servers In both cases the gateway must use a local lookup to decide which end host to direct the connection Redirection to anywhere Even another country Allows for distributed caching architectures Makes tracking the geographic location of a name very difficult 0 2 70 0 0 From Berkeley C ping www akamai com Pinging a1440 g akamai net Reply from 64 164 108 148 Reply from 64 164 108 148 Reply from 64 164 108 148 Reply from 64 164 108 148 64 164 108 148 with 32 bytes of data bytes 32 time 10ms TTL 249 bytes 32 time 10ms TTL 249 bytes 32 time 10ms TTL 249 bytes 32 time 20ms TTL 249 Ping statistics for 64 164 108 148 Packets Sent 4 Received 4 Lost 0 0 loss Approximate round trip times in milli seconds Minimum 10ms Maximum 20ms Average 12ms From the NY Area 63 240 15 146 From the UK 194 82 174 224 0 3 00 DNS is a crucial part of the internet Namespace is hierarchical Administration is distributed It is vulnerable in various ways but no more than other parts of the internet infrastructure Its performance is enhanced by caching DNS Hacks can enable many interesting things 0 6 A distributed database of URLs Core components Servers which store files and execute remote commands Browsers retrieve and display pages of content linked by hypertext Each link is a URL Can build arbitrarily complex applications all of which share a uniform client Need a protocol to transfer information between clients and servers HTTP 0 0 protocol host name port directory path resource Extend the idea of hierarchical namespaces to include anything in a file system ftp www eecs berkeley edu 122 Lecture6 presentation ppt Extend to program executions as well http us f413 mail yahoo com ym
View Full Document