SEEM3490 Information Systems Managementseem3490/slides/lecture03.pptx.pdf · Supernetting (NAT)...

12
SEEM3490 Information Systems Management Lecture 03 – Web Information System II Browsers Today, we have many browsers! Internet Explorer Firefox Safari Opera Chrome More browsers means more difficult for a programmer’s job… Copyright (c) 2012. Gabriel Fung. All rights reserved.

Transcript of SEEM3490 Information Systems Managementseem3490/slides/lecture03.pptx.pdf · Supernetting (NAT)...

SEEM3490 Information Systems Management Lecture 03 – Web Information System II

Browsers

!   Today, we have many browsers! !   Internet Explorer

!   Firefox

!   Safari

!   Opera

!   Chrome

!   More browsers means more difficult for a programmer’s job…

Copyright (c) 2012. Gabriel Fung. All rights reserved.

IP Address and Domain Name

!   It is perfectly fine to type IP Address in a browser for in-house applications

!   Yet, it may not good for a public web site.

!   So we may need to buy a domain name. !   Note: most hosting companies (no matter free or not) allow you

to use a custom domain name

Copyright (c) 2012. Gabriel Fung. All rights reserved.

Domain Name

!   Domain name is NOT free. You need to pay for annual fee !   It just like renting an apartment. You need to pay for it.

!   There are numerous companies allow you to buy URL !   Search carefully in the web, compare the prices of different

companies, read the terms and conditions carefully.

!   Different companies may provide different services.

!   Ask yourself what kind of services you want! ! WhoisGuard? URL forwarding? Email forwarding? Transfer?

Parking? Advertisement? Dynamic DNS? … (too many)

Copyright (c) 2012. Gabriel Fung. All rights reserved.

Domain Name (cont'd)

!   Read the restrictions carefully before you buy: !   E.g., .com.hk can only be purchased if you have registered a

company in Hong Kong (documentation proof is required)

!   Remember: !   Buying a domain name is just like buying a house!

!   People can make money (not a small amount) by re-selling the domain !   E.g., if you bought the domain name "www.microsoft.com" before

Microsoft buy it, then I think Microsoft will pay whatever you ask for…

Copyright (c) 2012. Gabriel Fung. All rights reserved.

Domain Name System

!   DNS – Domain Name System !   In the very very old days, the “hostnames to IP address” were

mapped in a local file

!   As the Internet grows, it becomes impossible to keep all of the information in a local file system. We need a systematic structure – DNS

Copyright (c) 2012. Gabriel Fung. All rights reserved.

Domain Name System – Brief History

!   1983 !   Paul Mockapetris from UC Irvine designed the DNS (RFC 882

and RFC 883).

!   1984 !   Douglas Terry, Mark Painter, David Riggle, and Songnian Zhou

from UC Berkeley (all are students) wrote the first Unix name server implementation, called the Berkeley Internet Name Domain (BIND) Server.

!   1985 !   Kevin Dunlap from DEC revised the DNS implementation.

BIND was ported to the Windows NT in 1990 and is the most widely used DNS software on the Internet even now.

Copyright (c) 2012. Gabriel Fung. All rights reserved.

Domain Name System Structure

!   DNS has a hierarchical structure !   Last component of a URL was intended to indicate the type of

organization hosting the computer

!   Two letter codes indicate the country of origin hosting the site. They are defined in ISO 3166

Root

com hk

edu org

cuhk hku

cs se

Code Meaning

com Commercial

edu Educational

gov Government

int International Organization

mil Military

net Network related

org Miscellaneous

Copyright (c) 2012. Gabriel Fung. All rights reserved.

Domain Name System in Action (cont'd)

!   Within the same network: !   You are using a computer in CUHK

!   You want to find cs.cuhk.edu.hk

Where is cs.cuhk.edu.hk?

CUHK server IP Address of cs.cuhk.edu.hk

cs.cuhk.edu.hk must be in the “host name – IP address” table in the cuhk.edu.hk name-server (because cs is under CUHK!)

Copyright (c) 2012. Gabriel Fung. All rights reserved.

Domain Name System in Action (cont'd)

!   Scenario: !   You are using your computer at home. Your ISP is PCCW. You

want to request http://www.cuhk.edu.hk

!   Theoretical operation:

Copyright (c) 2012. Gabriel Fung. All rights reserved.

PCCW server

root server

hk server

edu.hk server

cuhk.edu.hk server

Domain Name System in Action (cont’d)

!   Root server information: !   http://www.root-servers.org/

!   http://www.iana.org/domains/root/servers

Copyright (c) 2012. Gabriel Fung. All rights reserved.

Domain Name System in Action (cont'd)

!   Yet, the root server workload will be huge!

!   In practice caching is used in DNS servers to overcome this problem, and as a result, root name servers actually are involved with very little of the total traffic.

Copyright (c) 2012. Gabriel Fung. All rights reserved.

PCCW server

Domain Name System in Action (cont'd)

!   Because of caching, when you have updated your domain name record (e.g., you have moved your server from 123.123.123.123 to 124.124.124.124), it takes time (from a few minutes to days) for all people in the world to be able to access your domain in the new address!

!   Now the only question left is: !   How can you set up your domain (e.g., www.gabrielism.com)

points to a specific IP Address?

Copyright (c) 2012. Gabriel Fung. All rights reserved.

Host Records

!   To point a domain name to an IP address, it is usually known as set up “Host Records”.

!   There are several ways to do so. The easiest one is to use the “tools” provided by your domain name registrar.

Copyright (c) 2012. Gabriel Fung. All rights reserved.

Host Records (cont’d)

!   There are many record types (See: http://tools.ietf.org/html/rfc1035#page-12). The most common ones are:

!   A – Address Record !   Used to map hostnames to an IP address of the host. E.g.,

www.se.cuhk.edu.hk maps to 137.189.59.20

!   MX – Mail Exchange Record !   Maps a domain name to a list of message transfer agents for that

domain. E.g., if you use google business for hosting your email, you have to set MX = ASPMX.L.GOOGLE.COM. https://support.google.com/a/answer/174125?hl=en

Copyright (c) 2012. Gabriel Fung. All rights reserved.

Media Access Control (MAC) Address

!   Besides IP Address, we also need MAC Address (Media Control Address) to transfer data.

!   Do you know why?

!   To identify the MAC Address of the target computer, we use “Address Resolution Protocol”.

Copyright (c) 2012. Gabriel Fung. All rights reserved.

More About MAC Address

!   A unique identifier assigned to network interfaces for communications for most IEEE 802 network technologies.

!   Although intended to be a permanent and globally unique identification, it is possible to change the MAC address on most modern hardware. !   Changing MAC addresses is necessary in network virtualization.

It can also be used in the process of exploiting security vulnerabilities. This is called MAC spoofing.

Copyright (c) 2012. Gabriel Fung. All rights reserved.

MAC Spoofing

!   Very simple in Windows (More complicated on Linux of Mac)

Copyright (c) 2012. Gabriel Fung. All rights reserved.

Address Resolution Protocol in Action

IP: 192.168.1.2 MAC: 1A-23-F9-CD-06-9A

IP: 192.168.1.2 MAC: …

IP: 192.168.1.5 MAC: E6-E9-00-17-BB-4B

IP: 192.168.1.4 MAC: …

IP: 192.168.1.3 MAC: …

IP: 192.168.1.1 MAC: 74-29-9C-E8-FF-55

IP: 137.189.1.2 MAC: 41-29-9C-E8-FF-55

IP: 192.168.1.1 MAC: 1A-23-F9-CD-06-9B

IP: 58.189.1.1 MAC: CC-49-DE-D0-AB-7D

Copyright (c) 2012. Gabriel Fung. All rights reserved.

IP: 64.189.1.1 MAC: …

More Information

! http://technet.microsoft.com/en-us/library/cc758357(v=ws.10).aspx

Copyright (c) 2012. Gabriel Fung. All rights reserved.

Subnetting

!   Divide the network into several sub-network !   Using subnet mask

!   Usage: !   The national ISP divides a granted large block into and assign

each of them to a regional ISP !   The regional ISP divides the received block and assign to local

ISPs !   The local ISP divides the received block and assign to the local

companies !   The local company divides the received block …

Copyright (c) 2012. Gabriel Fung. All rights reserved.

Supernetting (NAT)

!   We do not have enough IP Address! !   IPv4 defines IP address as 32 bits long

!   IPv6 defines IP address as 64 bits long !   IPv6 still in the research stage!

!   We may still run out of IP address no matter how long it is!

!   Solution: Supernetting (a.k.a Network Address Translation, NAT)! !   Having a large number of IP address for internal use, and only

ONE address for external (Internet) use

Supernetting (NAT) (cont'd)

Range Total

10.0.0.0 – 10.255.255.255 224 172.16.0.0 – 172.31.255.255 220 192.168.0.0 – 192.168.255.255 216

192.168.3.1

192.168.3.2

192.168.3.3

192.168.3.4

200.24.5.6 192.168.3.5

Addresses Reserved for Private Networks

References

!   Books: !   Behrouz A. Forouzan. Data Communications and Networking.

McGraw Hill. 4th Edition. 2007.

!   James F. Kurose and Keith W. Ross. Computer Networking. Addison Wesley. 3rd Edition. 2004.