DNS, DHCP, SNMP & Network Security
DNS, DHCP, SNMP & Network Security
Server-Client Model
Server - A program in a remote or local machine - Executed first and passively waits connection from clients - Accepts request from client and reply to the client Client - A program in a local machine - Executed later and actively initiates connection to server - Sends request to server and accepts reply from server Multiple servers on one computer Multiple clients on one computer Server chain: server server b c a server connects TCP/UDP to another server
server a client 1
Lecture 12
IP Phy. Interface
client client 2 3
internet
Lecture 12
Address Resolution
User
DNS
Application 1
Application k (browser)
ports
80
DNS
Reverse ARP
RARP
ARP
Hardware address used in physical network IP address used in the Internet Symbolic address (domain name) used in application or by users Address resolution - translation between different address schemes ARP or RARP: translation between IP address and hardware address DNS: translation between symbolic address (domain name) and IP address
Lecture 12
...
org
au
jp
foobar
Label
soap almond candy peanut
tama
Host Name
judy judy.peanut.candy.foobar.com
cis cis.k.hosei.ac.jp
Each organization registers its unique name like foobar, hosei and so on, with central authority under one TLD such as com, edu, org, au, jp, Name subdivision, level, label and host name are controlled locally by organization
Lecture 12
root NS
edu NS
...
org NS
au NS
jp NS
ac NS hosei NS u-aizu mt
i Kaganei k
NS
tama NS
Root NS is needed to interconnect different TLD Choosing DNS server architecture - Small organizations can use a single name server - Large organizations often use multiple name servers according to division/location Each NS keeps a table of DN-IPAddr pairs of local hosts and knows up/low NS
IP Address Resolution
NS: Name Server
com NS
Lecture 12
root NS jp NS
foobar NS Step 2
ac NS
133.25.252.22
Cache table:
www.hosei.ac.jp 133.25.252.22
Step 1 candy NS
133.25.252.22
www.hosei.ac.jp hosei NS
DNS DB www.hosei.ac.jp
133.25.252.22 .
www.hosei.ac.jp http://www.hosei.ac.jp
Step 3 R
R R R judy http://133.25.252.22:80
DNS request is forwarded to root server, which points at next server to use Eventually, authoritative server is located and IP address is returned DNS server hierarchy traversal is called iterative resolution Servers and hosts use caching to reduce the number of DNS requests Each domain may keep many NS copies to speedup address resolution more than 13 root servers distributed all around the world DNS Types: A, NS, MX (Mail Exchange), SOA (Start OF Authority), CNAME (Canonical Name) nslookup utility: >domain_name or IP address, >set querytype=NS, A,
Lecture 12
Lecture 12
DHCP Client
67
DHCP Server
DHCP Client
DHCP Client
67
DHCP Server
DHCP Server
67
Address is assigned with a lease (1 hour default) - Client cannot use the assigned address after lease expires without renew request - Client can automatically ask for extension prior to expiration (50% lease time)
Suppose host leaves subnet? Address no longer in use; server should reassign !
Host can get IP address using DHCP, but cannot get domain name D-DHCP
Lecture 12
Message Format
DHCP
Operation code: 1-request; 2-reply, Hardware type: physical network, 1-Ethernet Hardware length: length of physical address, 6-Ethernet Hop count: the maximum number of hops the packet can travel Transaction ID: set by client and used to match a reply Client IP address: set 0 by client in the beginning Your IP address: client IP address filled by server Server IP address: filled by server Router/gateway IP address: filled by server Client hardware address: supplied by client Server name (optional 64-byte field): string Boot file name (optional 128-byte field): full path of the booting file. The client can use this path to retrieve booting information via TFTP Options: subnet mask, DNS server, printer server, lease time, etc
Lecture 12
Network Management
Responsibility of network administrator: monitor/control network hardware/software - Designs and implements efficient and robust network infrastructure - Identifies and corrects hardware/software problems as they arise Network management work is hard because networks are heterogeneous and large Types of network problems - Catastrophic * Fiber broken by backhoe * LAN switch loses power * Invalid route in router * Easier to diagnose - Intermittent or partial * NIC sends frames with bit errors occasionally * Router has one invalid entry * Harder to diagnose Some intermittent of partial failures may not be evident to user * Hardware may drop frames with data errors * Network protocols may recover from lost packet * However, network performance decreases !!
Lecture 12
Management data transfer between manager and agent using SNMP over UDP 162 agent
162 agent
H
agent
agent
agent R
H
agent R
Ethernet
Token Ring
H
agent
H
agent
H
agent
H
agent
SNMP defines how to get and change data in MIB of a host/device MIB: Management Information Base - data related to parameters, states, called objects, in a host/router/switch
Agent
SNMP agent
Agent
SNMP agent
Agent
SNMP agent
MIB
MIB
MIB
Lecture 12
itu: 2 internet: 1
1.3.6.1.2.1
iso-itu: 3 mgmt: 2
mib: 1
sys: 1
if: 2
at: 3
ip: 4
icmp: 5 tcp: 6
udp: 7 egp: 8
ipForwarding: 1 ipDefaultTTL: 2
ipInReceive: 3 ipInHdrError: 4
Lecture 12
Lecture 12
GetRequest (fetch) retrieves value of object in device MIB GetResponse (answer) sends requested value of object to manager SetRequest (store) stores new values into object in device MIB Get-next retrieves next object (for scanning)
Variables
- Version. 1-SNMPv1, 2-SNMPv2 - Community. password, or "public" if no password - Request ID. match a request to a response - Error status. no-error/error type in response by an agent - Error index. tell manager which variable caused error - Variables. reply manager's request from agent
Lecture 12
Network Security
The Internet is open, Routers forward packets - from any source - Somebody can get the packets transmitted for others (passive attack) - Somebody can send in packets from outside (active attack) Security Policy should consider - Computer systems, LANs, interconnection devices, ... - Data stored on servers - Messages traversing LANs - Internal or external access - Read/write versus read-only access - Network software application software security holes
Aspects of Security - System/network security - Data/information security Data accessibility - contents accessible Data integrity - contents remain unchanged Data confidentiality - contents not revealed
Lecture 12
Message
K
Secure key
K
Secure key
Encryption Standards DES (Data Encryption Standard) - designed originally by IBM, and adopted by the US government in 1977 and by ANSI in1981 - 64-bit block (encryption unit) and 56-bit key - not recommended use after 1998 because it can be broken Triple-DES - three keys and three executions of DES IDEA (International Data Encryption Algorithm) - 128-bit block/key AES (Advanced Encryption Standard) - 128-bit block/key
Lecture 12
KPub
Public key open to all
RSA (Rivest, Shamir, Adleman, 1978) Key Generation
KPri
Private key kept secret by owner Hard to factor n into 2 primes p and q RSA key size: 128 to 300 decimal digitals i.e., 425 to 1024 bits RSA needs more computations than DES much slower than DES
- Select p, q which are primes - Calculate n=pxq, and t(n)=(p-1)x(q-1) - Select integer e satisfied gcd(t(n), e)=1 and e<t(n) - Calculate d satisfied exd=1 mod t(n) - Public key: KU={e, n} - Private key: KR={d, n} - Plaintext: M < n - Ciphertext: C = Me (mod n) - M = Cd (mod n)
Example
-
Encryption
Decryption
Given M=19 Select two prime numbers p=7 and q=17 Calculate n=7x17=119, and t(n)=6x16=96 Select e=5 Determine d=77 since 5x77=385=4x96+1 Ciphertext C=195 (mod 119)=66 Decryption 6677 (mod 119)=19
Lecture 12
Message
E=F(F(M,KA,Pri), KB,Pub)
KA,Pri
KB,Pub
KB,Pri
KA,Pub
Lecture 12
Exercise 12
1. Using nslookup utility to get IP address of www.k.hosei.ac.jp. Find out how many name servers in domain k, hosei, ac and jp, respectively. 2. A host can dynamically get an IP address by means of exchanging information with a DHCP server using TCP/IP protocols. However, the host has no IP address before getting the IP address. How does the host communicate with DHCO server when having no IP address? Furthermore, the host can only hold the issued IP address with finite lease time such as one hour. Why? What method in DHCP is used to renew the release to hold the IP address more than one hour? 3. Data of parameters and states called objects of a host/router is stored in MIB (management information database). Each object in MIB has a unique identifier represented in hierarchical ASN.1 name scheme. Explain the meaning of ipForwarding object of a router, and give its identifier. 4. SNMP uses ASN.1 to represent data of an object. Give the SNMP representations of string data SNMP and IP address 133.25.252.22 in hexadecimal format, respectively. 5. Explain why the digital signature method shown in the lecture note can guarantee both authentication and confidence.