introduction to lan tdc 363 - depaul university · 1 introduction to lan tdc 363 week 3 01/17/08...

24
Introduction to LAN Introduction to LAN TDC 363 TDC 363 Week 3 Week 3 01/17/08 TDC363-03 1 Network Protocols Network Protocols Book: Chapter 4 & 11 Book: Chapter 4 & 11 Outline Outline The TCP/IP model vs. the OSI Model The TCP/IP model vs. the OSI Model IP Address IP Address Address Resolution Protocol (ARP) Address Resolution Protocol (ARP) IPX/SPX and NetBIOS IPX/SPX and NetBIOS Protocols on Windows XP Protocols on Windows XP 01/17/08 2 TDC363-03 DNS and WINS DNS and WINS TCP and UDP TCP and UDP NAT and Firewall NAT and Firewall BOOTP and DHCP BOOTP and DHCP TCP/IP utilities on Windows 2000/XP TCP/IP utilities on Windows 2000/XP Application Layer Protocols Application Layer Protocols Introduction to Protocols Introduction to Protocols Protocol Protocol Rules network uses to transfer data Rules network uses to transfer data Protocols that can span more than one LAN Protocols that can span more than one LAN bl bl 01/17/08 3 TDC363-03 segment are segment are routable routable Multiprotocol network Multiprotocol network Network using more than one protocol Network using more than one protocol

Upload: others

Post on 20-Jul-2020

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to LAN TDC 363 - DePaul University · 1 Introduction to LAN TDC 363 Week 3 01/17/08 TDC363-03 1 Network Protocols Book: Chapter 4 & 11 Outline The TCP/IP model vs. the

1

Introduction to LANIntroduction to LAN

TDC 363TDC 363Week 3Week 3

01/17/08 TDC363-03 1

Network ProtocolsNetwork ProtocolsBook: Chapter 4 & 11Book: Chapter 4 & 11

OutlineOutline

The TCP/IP model vs. the OSI ModelThe TCP/IP model vs. the OSI ModelIP AddressIP AddressAddress Resolution Protocol (ARP)Address Resolution Protocol (ARP)IPX/SPX and NetBIOSIPX/SPX and NetBIOSProtocols on Windows XPProtocols on Windows XP

01/17/08 2TDC363-03

DNS and WINSDNS and WINSTCP and UDP TCP and UDP NAT and FirewallNAT and FirewallBOOTP and DHCPBOOTP and DHCPTCP/IP utilities on Windows 2000/XPTCP/IP utilities on Windows 2000/XPApplication Layer ProtocolsApplication Layer Protocols

Introduction to ProtocolsIntroduction to Protocols

ProtocolProtocolRules network uses to transfer dataRules network uses to transfer dataProtocols that can span more than one LAN Protocols that can span more than one LAN

blbl

01/17/08 3TDC363-03

segment are segment are routableroutable

Multiprotocol networkMultiprotocol networkNetwork using more than one protocolNetwork using more than one protocol

Page 2: Introduction to LAN TDC 363 - DePaul University · 1 Introduction to LAN TDC 363 Week 3 01/17/08 TDC363-03 1 Network Protocols Book: Chapter 4 & 11 Outline The TCP/IP model vs. the

2

TCP/IP and OSI model

01/17/08 4TDC363-03

IP (Internet Protocol)IP (Internet Protocol)

Provides information about how and where data Provides information about how and where data should be deliveredshould be delivered

Data’s source and destination addressesData’s source and destination addressesNetwork layer protocolNetwork layer protocol

01/17/08 5TDC363-03

Network layer protocolNetwork layer protocolEnables TCP/IP to internetworkEnables TCP/IP to internetworkUnreliable, connectionless protocolUnreliable, connectionless protocol

IP datagram: packet, in context of TCP/IPIP datagram: packet, in context of TCP/IPEnvelope for dataEnvelope for data

IP (continued)IP (continued)

01/17/08 6TDC363-03

Page 3: Introduction to LAN TDC 363 - DePaul University · 1 Introduction to LAN TDC 363 Week 3 01/17/08 TDC363-03 1 Network Protocols Book: Chapter 4 & 11 Outline The TCP/IP model vs. the

3

IP AddressingIP Addressing

IP AddressIP AddressLogical address used in TCP/IP networkingLogical address used in TCP/IP networkingUnique 32Unique 32--bit numberbit number

Divided into four groups ofDivided into four groups of octetsoctets (8(8 bit bytes) that arebit bytes) that are

01/17/08 7TDC363-03

Divided into four groups of Divided into four groups of octetsoctets (8(8--bit bytes) that are bit bytes) that are separated by periodsseparated by periodsE.g., 140.192.32.136 (www.cti.depaul.edu)E.g., 140.192.32.136 (www.cti.depaul.edu)

IP AddressingIP Addressing

01/17/08 8TDC363-03

Though 8 bits have 256 possible combinations, only the Though 8 bits have 256 possible combinations, only the numbers 1 through 254 are used to identify networks and hostsnumbers 1 through 254 are used to identify networks and hostsNumbers 0 is reserved for Numbers 0 is reserved for networknetwork and 255 is reserved for and 255 is reserved for broadcastbroadcast

Broadcast is transmissions to all stations on a networkBroadcast is transmissions to all stations on a network

Total: 2Total: 23232 = = 4,294,967,2964,294,967,296

IP AddressingIP Addressing

Loopback addressLoopback addressIP address reserved for communicating from a IP address reserved for communicating from a node to itself (localhost)node to itself (localhost)Value of the loopback address is always 127.0.0.1Value of the loopback address is always 127.0.0.1

01/17/08 9TDC363-03

p yp yInternet Corporation for Assigned Names Internet Corporation for Assigned Names and Numbers (ICANN)and Numbers (ICANN)

NonNon--profit organization to maintain and assign profit organization to maintain and assign IP addressesIP addresses

Page 4: Introduction to LAN TDC 363 - DePaul University · 1 Introduction to LAN TDC 363 Week 3 01/17/08 TDC363-03 1 Network Protocols Book: Chapter 4 & 11 Outline The TCP/IP model vs. the

4

Internet Name and AddressInternet Name and Address

ICANN

Address SO

Domain NameSO

ProtocolSO

Internet Corporation for AssignedNames and Numbers

01/17/08 10TDC363-03

SO

Regional Internet Registries

ARINwww.arin.net APNIC RIPE-NCC

Why IP Addresses?Why IP Addresses?Why IP Addresses?Why IP Addresses?

172.18.0.2

172.18.0.1

172.17.0.2172.17.0.1

172.16.0.2

10.13.0.0192.168.1.0

10.13.0.1

192.168.1.1

172.16.0.1

01/17/08 11TDC363-03

Unique addressing allows communication Unique addressing allows communication between end stationsbetween end stations

Unicast (oneUnicast (one--toto--one)one)Broadcast (oneBroadcast (one--toto--all)all)Multicast (oneMulticast (one--toto--many)many)

Path choice is based on locationPath choice is based on locationLocation is represented by an addressLocation is represented by an address

IP Addressing SchemeIP Addressing SchemeIP Addressing SchemeIP Addressing Scheme

255 255 255 255

DottedDecimal

Maximum

Network Host

32 bits

01/17/08 12TDC363-03

172 26 40 1

network host

Page 5: Introduction to LAN TDC 363 - DePaul University · 1 Introduction to LAN TDC 363 Week 3 01/17/08 TDC363-03 1 Network Protocols Book: Chapter 4 & 11 Outline The TCP/IP model vs. the

5

IP addresses and ClassesIP addresses and Classes

01/17/08 13TDC363-03

IP Address Problem and SolutionsIP Address Problem and Solutions

Total: 2Total: 23232 = = 4,294,967,2964,294,967,296Only 2M Class C networksOnly 2M Class C networks

Classless InterClassless Inter--Domain Routing (CIDR) Domain Routing (CIDR) RFC 1519RFC 1519

01/17/08 14TDC363-03

IP Subnet MaskIP Subnet MaskNetwork Address Translation (NAT)Network Address Translation (NAT)

RFC 1631RFC 1631Use of private IP addresses behind the routerUse of private IP addresses behind the router

IPv4 vs. IPv6IPv4 vs. IPv6

CIDRCIDR

172 26 40 1255 255 255 0

IP Address

Subnet Mask

01/17/08 15TDC363-03

Subnet Mask

Network Subnet Host

The broadcast and routing is based on the IP subnet mask.With CIDR, Class, A, B, and C networks lose its significance, and only the IP subnet mask is significant to determine the routing and broadcasting.CIDR is covered in details in TDC365. For TDC363, I will try to stay in Class C with subnet mask = 255.255.255.0

Page 6: Introduction to LAN TDC 363 - DePaul University · 1 Introduction to LAN TDC 363 Week 3 01/17/08 TDC363-03 1 Network Protocols Book: Chapter 4 & 11 Outline The TCP/IP model vs. the

6

IP Routing TableIP Routing Table

192.168.1.1/24 192.168.2.1/24

E0 E1

01/17/08 16TDC363-03

PC1 PC2 192.168.2.100192.168.1.100

Network Address Interface

192.168.1.0/24 E0192.168.2.0/24 E1

/24: 255.255.255.0

IP Routing TableIP Routing Table

192.168.1.1/24 200.10.1.1/24 E0

InternetE4

192.168.1.0

192.168.2.0192.168.2.1/24

192 168 3 1/24

E1E2

E3

01/17/08 17TDC363-03

Network Address Interface

192.168.1.0/24 E0192.168.2.0/24 E1192.168.3.0/24 E2192.168.4.0/24 E30.0.0.0/0 E4

0.0.0.0/0 default

192.168.3.0

192.168.4.0

192.168.3.1/24192.168.4.1/24

Frame/Packet TraceFrame/Packet Trace

Gateway(router)

192.168.1.1/2411.22.33.aa.bb.cc

192.168.2.1/2411.22.33.aa.bb.cd

01/17/08 18TDC363-03

PC1 PC2

Frame/Packet Address Info:MAC DA: 11.22.33.aa.bb.ccMAC SA: 33.22.11.aa.bb.ccIP DA: 192.168.2.100IP SA: 192.168.1.100

192.168.2.10033.22.11.aa.bb.cd

192.168.1.10033.22.11.aa.bb.cc

Frame/Packet Address InfoMAC DA: 33.22.11.aa.bb.cdMAC SA: 11.22.33.aa.bb.cdIP DA: 192.168.2.100IP SA: 192.168.1.100

Page 7: Introduction to LAN TDC 363 - DePaul University · 1 Introduction to LAN TDC 363 Week 3 01/17/08 TDC363-03 1 Network Protocols Book: Chapter 4 & 11 Outline The TCP/IP model vs. the

7

Routing Protocols RevisitedRouting Protocols Revisited

Static Routing Static Routing Manually populate the routing tableManually populate the routing table

the the routeroute commandcommand

The four most common routing protocols:The four most common routing protocols:

01/17/08 19TDC363-03

g pg pRIP (Routing Information Protocol) for IP and IPXRIP (Routing Information Protocol) for IP and IPXOSPF (Open Shortest Path First) for IPOSPF (Open Shortest Path First) for IPEIGRP (Enhanced Interior Gateway Routing EIGRP (Enhanced Interior Gateway Routing Protocol) for IP, IPX, and AppleTalkProtocol) for IP, IPX, and AppleTalkBGP (Border Gateway Protocol) for IPBGP (Border Gateway Protocol) for IP

Address Resolution Protocol (ARP)Address Resolution Protocol (ARP)

ARP tableARP tableLayer 2 to layer 3 mappingLayer 2 to layer 3 mappingDatabase that lists the associated MAC and IP addressesDatabase that lists the associated MAC and IP addressesContains two types of entries:Contains two types of entries:

01/17/08 20TDC363-03

Contains two types of entries:Contains two types of entries:Dynamic ARP table entriesDynamic ARP table entriesStatic ARP table entriesStatic ARP table entries

ARP utility provides a way of obtaining information ARP utility provides a way of obtaining information from and manipulating a device’s ARP tablefrom and manipulating a device’s ARP table

How does ARP work?How does ARP work?

01/17/08 21TDC363-03

192.168.1.1099:88:77:11:11:11

192.168.1.2099:88:77:22:22:22

192.168.1.3099:88:77:33:33:33

1. Who is 192.168.1.30? 2a.. It is not me. 2b. It is me.

3. My MAC address is 99:88:77:33:33:33.

4. OK. Let us create an ARP entry192.168.1.30 99:88:77:33:33:33

Page 8: Introduction to LAN TDC 363 - DePaul University · 1 Introduction to LAN TDC 363 Week 3 01/17/08 TDC363-03 1 Network Protocols Book: Chapter 4 & 11 Outline The TCP/IP model vs. the

8

ARP TableARP Table

01/17/08 22TDC363-03

192.168.1.1099:88:77:11:11:11

192.168.1.2099:88:77:22:22:22

192.168.1.3099:88:77:33:33:33

192.168.1.10 99:88:77:11:11:11192.168.1.20 99:88:77:22:22:22

192.168.1.20 99:88:77:22:22:22192.168.1.30 99:88:77:33:33:33

192.168.1.10 99:88:77:11:11:11192.168.1.30 99:88:77:33:33:33

Questions you will see at MidtermQuestions you will see at Midterm

MAC forwarding table: layer 1 to layer 2 MAC forwarding table: layer 1 to layer 2 mappingmappingARP Table: layer 2 to layer 3 mappingARP Table: layer 2 to layer 3 mappingRouting Table: layer 1 to layer 3 mappingRouting Table: layer 1 to layer 3 mapping

01/17/08 23TDC363-03

g y y pp gg y y pp gPacket and Frame tracePacket and Frame trace

Source MAC addressSource MAC addressDestination MAC addressDestination MAC addressSource IP addressSource IP addressDestination IP addressDestination IP address

Host Names and Domain Name Host Names and Domain Name System (DNS)System (DNS)

Host nameHost nameSymbolic name that describes a TCP/IP deviceSymbolic name that describes a TCP/IP device

01/17/08 24TDC363-03

DomainDomainGroup of computers that belong to the same Group of computers that belong to the same organization and have part of their IP addresses in organization and have part of their IP addresses in commoncommon

Note: Domain Name in TCP/IP is different from Domain Name in Windows.

Page 9: Introduction to LAN TDC 363 - DePaul University · 1 Introduction to LAN TDC 363 Week 3 01/17/08 TDC363-03 1 Network Protocols Book: Chapter 4 & 11 Outline The TCP/IP model vs. the

9

Addresses and NamesAddresses and Names

In addition to using IP addresses, TCP/IP In addition to using IP addresses, TCP/IP networks use names for networks and hostsnetworks use names for networks and hosts

Each host requires a host nameEach host requires a host name/etc/hosts, %windows%/etc/hosts, %windows%\\system32system32\\driversdrivers\\etcetc\\hostshosts

01/17/08 25TDC363-03

Each network requires a network name, also called a Each network requires a network name, also called a domain namedomain name

cti.depaul.edu or depaul.educti.depaul.edu or depaul.edu

Together, host name and domain name constitute Together, host name and domain name constitute the the fully qualified domain name (FQDN)fully qualified domain name (FQDN)

facweb.cti.depaul.edufacweb.cti.depaul.edu

Domain NamesDomain Names

Symbolic name that identifies an organizationSymbolic name that identifies an organizationTopTop--level domains (TLDs)level domains (TLDs)

HighestHighest--level category used to distinguish domain level category used to distinguish domain namesnames

01/17/08 26TDC363-03

namesnamesA TLD is known as the domain suffixA TLD is known as the domain suffix

Top Level Domain NamesTop Level Domain Names

01/17/08 27TDC363-03

Page 10: Introduction to LAN TDC 363 - DePaul University · 1 Introduction to LAN TDC 363 Week 3 01/17/08 TDC363-03 1 Network Protocols Book: Chapter 4 & 11 Outline The TCP/IP model vs. the

10

Host FilesHost FilesText file that associates TCP/IP host names with IP addressesText file that associates TCP/IP host names with IP addressesAliasAlias

Nickname for a node’s host nameNickname for a node’s host name

01/17/08 28TDC363-03

Host FilesHost Files

On a UNIXOn a UNIX--based computer a host file is:based computer a host file is:Called Called hostshosts

Located in the /etc/hostsLocated in the /etc/hostsO Wi d h filO Wi d h fil

01/17/08 29TDC363-03

On a Windows computer, a host file:On a Windows computer, a host file:Is also called Is also called hostshosts

What is the file What is the file lmhostslmhosts??

Must be located in the c:Must be located in the c:\\windows directory in order windows directory in order to be recognized by the operating systemto be recognized by the operating system

c:c:\\windowswindows\\system32system32\\driversdrivers\\etcetc\\hostshosts

Domain Name System (DNS)Domain Name System (DNS)

Hierarchical way Hierarchical way of tracking of tracking domain names domain names

d h id h i

01/17/08 30TDC363-03

and their and their addresses, addresses, devised in the devised in the midmid--1980s1980s

Page 11: Introduction to LAN TDC 363 - DePaul University · 1 Introduction to LAN TDC 363 Week 3 01/17/08 TDC363-03 1 Network Protocols Book: Chapter 4 & 11 Outline The TCP/IP model vs. the

11

Configuring DNSConfiguring DNS

01/17/08 31TDC363-03

DDNS (Dynamic DNS)DDNS (Dynamic DNS)

RFC 2136RFC 2136DNS is reliable as long as host’s address is staticDNS is reliable as long as host’s address is static

Many Internet users subscribe to Many Internet users subscribe to the type the type of Internet of Internet service in which IP address changes periodicallyservice in which IP address changes periodically

01/17/08 32TDC363-03

g p yg p yIn DDNS, service provider runs program on In DDNS, service provider runs program on user’s computer that notifies service provider user’s computer that notifies service provider when IP address changeswhen IP address changes

DNS record update effective throughout Internet in DNS record update effective throughout Internet in minutesminutes

Zeroconf (Zero Configuration)Zeroconf (Zero Configuration)Collection of protocols designed by IETF to Collection of protocols designed by IETF to simplify setup of nodes on TCP/IP networkssimplify setup of nodes on TCP/IP networks

Assigns IP address (local address)Assigns IP address (local address)Resolves node’s host name and IP address without requiring Resolves node’s host name and IP address without requiring DNS r rDNS r r

01/17/08 33TDC363-03

DNS serverDNS serverDiscovers available servicesDiscovers available servicesEnables directly connected workstations to communicate Enables directly connected workstations to communicate without relying on static IP addressingwithout relying on static IP addressingIP addresses are assigned through IPv4LL (RFC 3927)IP addresses are assigned through IPv4LL (RFC 3927)

Page 12: Introduction to LAN TDC 363 - DePaul University · 1 Introduction to LAN TDC 363 Week 3 01/17/08 TDC363-03 1 Network Protocols Book: Chapter 4 & 11 Outline The TCP/IP model vs. the

12

NetBIOS and NetBEUINetBIOS and NetBEUINetBIOS originally designed to provide NetBIOS originally designed to provide Transport and Session layer services for Transport and Session layer services for applications running on small, homogenous applications running on small, homogenous networksnetworksMicrosoft added standard L2/L3 layer Microsoft added standard L2/L3 layer

01/17/08 34TDC363-03

/ y/ ycomponent called NetBEUIcomponent called NetBEUI

Efficient on small networksEfficient on small networksConsumes few network resourcesConsumes few network resourcesProvides excellent error correctionProvides excellent error correction

Does not allow for good securityDoes not allow for good securityFew possible connectionsFew possible connectionsCannot be routedCannot be routed

DiscussionsDiscussionsWhat is the protocol that supports file sharing and What is the protocol that supports file sharing and printer sharing on Windows?printer sharing on Windows?

Answer: NetBIOSAnswer: NetBIOSNetBIOS is a transport and session layer protocol. NetBIOS is a transport and session layer protocol. What is the L2/L3 protocol for NetBIOS.What is the L2/L3 protocol for NetBIOS.

01/17/08 35TDC363-03

W s / p c N S.W s / p c N S.Answer: NetBUEI originallyAnswer: NetBUEI originally

Is NetBUEI on most Windows today?Is NetBUEI on most Windows today?Answer: NOAnswer: NO

What is the L2/L3 protocol for NetBIOS?What is the L2/L3 protocol for NetBIOS?TCP/IPTCP/IP

How to Transfer FilesHow to Transfer Files

NetBIOS NetBIOSFile Transfer

NetBIOS FTP HTTP TFTP

01/17/08 36TDC363-03

EthernetNetBUEI

EthernetIP

TCP

Q: which one is the best?

UDP

Page 13: Introduction to LAN TDC 363 - DePaul University · 1 Introduction to LAN TDC 363 Week 3 01/17/08 TDC363-03 1 Network Protocols Book: Chapter 4 & 11 Outline The TCP/IP model vs. the

13

Windows Internet Naming Service Windows Internet Naming Service (WINS)(WINS)

Provides a means of resolving NetBIOS names with IP Provides a means of resolving NetBIOS names with IP addressesaddressesWINS offers several advantagesWINS offers several advantages

Guarantees a unique NetBIOS name is used for eachGuarantees a unique NetBIOS name is used for each

01/17/08 37TDC363-03

Guarantees a unique NetBIOS name is used for each Guarantees a unique NetBIOS name is used for each computer on a networkcomputer on a networkSupport for DHCPSupport for DHCPBetter network performanceBetter network performance

Supported but not needed in Windows 2000 (or later)Supported but not needed in Windows 2000 (or later)Where is the setting for WINS in Windows 2000?Where is the setting for WINS in Windows 2000?

ICMPICMP

Internet Control Message ProtocolInternet Control Message ProtocolPacket Internet Groper (PING): utility that can Packet Internet Groper (PING): utility that can verify that TCP/IP is installed, bound to the verify that TCP/IP is installed, bound to the NIC, configured correctly, and communicatingNIC, configured correctly, and communicatingPi iPi i

01/17/08 38TDC363-03

Pinging:Pinging:Echo request and echo reply Echo request and echo reply Can ping either an IP address or a host nameCan ping either an IP address or a host namePinging loopback address, 127.0.0.1, to determine Pinging loopback address, 127.0.0.1, to determine whether workstation’s TCP/IP services are runningwhether workstation’s TCP/IP services are running

Transmission Control Protocol Transmission Control Protocol (TCP)(TCP)

TCPTCPProvides reliable data delivery servicesProvides reliable data delivery servicesConnectionConnection--orientedoriented subprotocolsubprotocol

R q ir t bli hm nt f nn ti n b t nR q ir t bli hm nt f nn ti n b t n

01/17/08 39TDC363-03

Requires establishment of connection between Requires establishment of connection between communicating nodes before protocol will transmit datacommunicating nodes before protocol will transmit data

TCP segmentTCP segmentHolds TCP data fieldsHolds TCP data fieldsBecomes encapsulated by IP datagramBecomes encapsulated by IP datagram

Page 14: Introduction to LAN TDC 363 - DePaul University · 1 Introduction to LAN TDC 363 Week 3 01/17/08 TDC363-03 1 Network Protocols Book: Chapter 4 & 11 Outline The TCP/IP model vs. the

14

Transmission Control Protocol Transmission Control Protocol (TCP)(TCP)

Port: Address on host where application makes itself available to Port: Address on host where application makes itself available to incoming dataincoming data

01/17/08 40TDC363-03

TCP: 3TCP: 3--way handway hand--shaking processshaking process

01/17/08 41TDC363-03

UDPUDP

01/17/08 42TDC363-03

Page 15: Introduction to LAN TDC 363 - DePaul University · 1 Introduction to LAN TDC 363 Week 3 01/17/08 TDC363-03 1 Network Protocols Book: Chapter 4 & 11 Outline The TCP/IP model vs. the

15

TCP/UDP Sockets and PortsTCP/UDP Sockets and Ports

SocketSocketDefined in TCP and UDPDefined in TCP and UDPLogical address assigned to a specific process Logical address assigned to a specific process running on a host computerrunning on a host computerThe socket’s address combines the host computer’sThe socket’s address combines the host computer’s

01/17/08 43TDC363-03

The socket s address combines the host computer s The socket s address combines the host computer s IP address with the IP address with the port numberport number associated with a associated with a processprocess

Socket ::= IP address + Port NumberSocket ::= IP address + Port NumberPort numbers in the range of 0 to 1023 are called Port numbers in the range of 0 to 1023 are called wellwell--known portsknown ports

TCP/UDP Sockets and PortsTCP/UDP Sockets and Ports

01/17/08 44TDC363-03

TCP/UDP Sockets and PortsTCP/UDP Sockets and Ports

01/17/08 45TDC363-03

Page 16: Introduction to LAN TDC 363 - DePaul University · 1 Introduction to LAN TDC 363 Week 3 01/17/08 TDC363-03 1 Network Protocols Book: Chapter 4 & 11 Outline The TCP/IP model vs. the

16

Review: IP Address ShortageReview: IP Address Shortage

Short term solution:Short term solution:CIDR CIDR –– i.e., IP Subnettingi.e., IP SubnettingNetwork Address Translation (NAT)Network Address Translation (NAT)

01/17/08 46TDC363-03

Network Address Translation (NAT)Network Address Translation (NAT)Long term solution:Long term solution:

IPv6IPv6

NAT for Home and SOHO NAT for Home and SOHO NetworksNetworks

ISP

140.192.33.50

192.168.0.10

192.168.0.101

DSL/Cablemodem

01/17/08 47TDC363-03

192.168.0.1192.168.0.102

192.168.0.103

Internet

Question: How can one use a private IP address to surf the public Internet?Answer: Network Address Translation (NAT)

NATRouter

How does NAT work?How does NAT work?140.192.33.50 192.168.0.1

192.168.0.101InternetNAT

Router

FTP

D-port =21

S-port =1234D-port =21

S-port =2001

01/17/08 48TDC363-03

Server D-IP =64.58.76.176

S-IP =192.168.0.10164.58.76.176

D-IP =64.58.76.176

S-IP =140.192.33.50

D-port =2001

S-port =21

D-IP =140.192.33.50

S-IP =64.58.76.176

D-port =1234

S-port =21

D-IP =192.168.0.101

S-IP =64.58.76.176

Note: the sender and receiver do not know anything about NAT.

Page 17: Introduction to LAN TDC 363 - DePaul University · 1 Introduction to LAN TDC 363 Week 3 01/17/08 TDC363-03 1 Network Protocols Book: Chapter 4 & 11 Outline The TCP/IP model vs. the

17

If my web server is behind the NAT router, If my web server is behind the NAT router, can I make it available to the public?can I make it available to the public?

ISP

140.192.33.50

192.168.0.10(web server)

DSL/Cablemodem

192.168.0.20(ftp server)

01/17/08 49TDC363-03

192.168.0.1Internet NAT

Router

(ftp server)

portport Virtual AddressVirtual Address Virtual PortVirtual Port

2121 192.168.0.20192.168.0.20 212180, 8000, 808080, 8000, 8080 192.168.0.10192.168.0.10 80, 8000, 808080, 8000, 8080

IP Address AssignmentIP Address Assignment

Static IP addressStatic IP addressIP address manually assigned to a deviceIP address manually assigned to a deviceServers usually have static IP addresses.Servers usually have static IP addresses.Network device (switches, routers, etc.) also uses static IP Network device (switches, routers, etc.) also uses static IP address.address.

01/17/08 50TDC363-03

Dynamic IP addressDynamic IP addressDHCP and BOOTPDHCP and BOOTPManages dynamic distribution of IP addresses on a networkManages dynamic distribution of IP addresses on a networkWorkstation usually use DHCP.Workstation usually use DHCP.

Dynamic Host Configuration Dynamic Host Configuration Protocol (DHCP)Protocol (DHCP)

Automated means of assigning a unique IP address to Automated means of assigning a unique IP address to every device on a networkevery device on a networkReasons for implementing DHCPReasons for implementing DHCP

Reduce the time and planning spent on IP address Reduce the time and planning spent on IP address

01/17/08 51TDC363-03

p g pp g pmanagementmanagementReduce the potential for errors in assigning IP addressesReduce the potential for errors in assigning IP addressesEnable users to move their workstations and printers without Enable users to move their workstations and printers without having to change their TCP/IP configurationhaving to change their TCP/IP configurationMake IP addressing transparent for mobile usersMake IP addressing transparent for mobile users

Page 18: Introduction to LAN TDC 363 - DePaul University · 1 Introduction to LAN TDC 363 Week 3 01/17/08 TDC363-03 1 Network Protocols Book: Chapter 4 & 11 Outline The TCP/IP model vs. the

18

DHCP Leasing ProcessDHCP Leasing ProcessLeaseLease

Agreement between DHCP server and client on how long the client will borrow Agreement between DHCP server and client on how long the client will borrow a DHCPa DHCP--assigned IP addressassigned IP address

01/17/08 52TDC363-03

Terminating a DHCP LeaseTerminating a DHCP Lease

A DHCP lease may expire based on the period A DHCP lease may expire based on the period established for it in the server configurationestablished for it in the server configurationA DHCP lease may be manually terminated at any A DHCP lease may be manually terminated at any time from either the client’s TCP/IP configuration or time from either the client’s TCP/IP configuration or

01/17/08 53TDC363-03

/ g/ gthe server’s DHCP configurationthe server’s DHCP configurationReleaseRelease

The act of terminating a DHCP leaseThe act of terminating a DHCP lease

Can you do DHCP across LAN Segment?Can you do DHCP across LAN Segment?Answer: Yes, BOOTP Relay.Answer: Yes, BOOTP Relay.

2. BOOTP Relay3. BOOTP Relay

5. BOOTP Relay 6. BOOTP Relay

192.168.1.11 192.168.2.11192.168.2.12

192.168.10.254

01/17/08 54TDC363-03

1. What is my IP address?4. Assign 192.168.10.1007. My IP address is 192.168.10.100

192.168.1.10DHCPServer

DHCP supports BOOTP relay.

Client

Page 19: Introduction to LAN TDC 363 - DePaul University · 1 Introduction to LAN TDC 363 Week 3 01/17/08 TDC363-03 1 Network Protocols Book: Chapter 4 & 11 Outline The TCP/IP model vs. the

19

Addressing in IPv6Addressing in IPv6

Also known as Also known as IP next generationIP next generation or or IPngIPng

Slated to replace the current IP protocol, IPv4Slated to replace the current IP protocol, IPv4Perhaps the most valuable advantage IPv6 offers over IPv4 is its Perhaps the most valuable advantage IPv6 offers over IPv4 is its promise of billions and billions of additional IP addresses promise of billions and billions of additional IP addresses through its new addressing scheme (128 bits)through its new addressing scheme (128 bits)

01/17/08 55TDC363-03

through its new addressing scheme (128 bits)through its new addressing scheme (128 bits)Address format: F:F:0:0:0:0:3012:0CE3 Address format: F:F:0:0:0:0:3012:0CE3

000F:000F:0000:0000:0000:0000:3012:0CE3 000F:000F:0000:0000:0000:0000:3012:0CE3 88××(4(4××4))=128 bits4))=128 bitsF:F::3012:0CE3F:F::3012:0CE3

Representing IPv4 in IPv6: Representing IPv4 in IPv6: ::47.192.4.5::47.192.4.5

Addressing in IPv6Addressing in IPv6Unicast addressUnicast address

Type of IPv6 address that represents a single interface on a Type of IPv6 address that represents a single interface on a devicedevice

Multicast addressMulticast addressType of address in IPv6 that represents multiple interfacesType of address in IPv6 that represents multiple interfaces

01/17/08 56TDC363-03

Type of address in IPv6 that represents multiple interfaces, Type of address in IPv6 that represents multiple interfaces, often on multiple nodesoften on multiple nodesNo Broadcast addressNo Broadcast address

Anycast addressAnycast addressType of address specified in IPv6 that represents a group of Type of address specified in IPv6 that represents a group of interfaces, any of which can accept a transmissioninterfaces, any of which can accept a transmission

TCP/IP Application Layer ProtocolsTCP/IP Application Layer Protocols

Hypertext Transport Protocol (HTTP)Hypertext Transport Protocol (HTTP)Telnet Telnet

Used to log on to remote hosts using TCP/IP protocol suite Used to log on to remote hosts using TCP/IP protocol suite

File Transfer Protocol (FTP)File Transfer Protocol (FTP)

01/17/08 57TDC363-03

Used to send and receive files via TCP/IPUsed to send and receive files via TCP/IP

Simple Mail Transfer Protocol (SMTP)Simple Mail Transfer Protocol (SMTP)Responsible for moving messages from one eResponsible for moving messages from one e--mail server to mail server to another, using the Internet and other TCP/IPanother, using the Internet and other TCP/IP--based networksbased networks

Simple Network Management Protocol (SNMP)Simple Network Management Protocol (SNMP)Manages devices on a TCP/IP networkManages devices on a TCP/IP network

Page 20: Introduction to LAN TDC 363 - DePaul University · 1 Introduction to LAN TDC 363 Week 3 01/17/08 TDC363-03 1 Network Protocols Book: Chapter 4 & 11 Outline The TCP/IP model vs. the

20

SMTP (Simple Mail Transfer Protocol)SMTP (Simple Mail Transfer Protocol)

Protocol responsible for moving messages between Protocol responsible for moving messages between mail servers over TCP/IPmail servers over TCP/IP--based networksbased networks

Belongs to Application layer of TCP/IP Model Belongs to Application layer of TCP/IP Model Relies on TCP at Transport layerRelies on TCP at Transport layerOperates from port 25Operates from port 25

01/17/08 58TDC363-03

Relies on higherRelies on higher--level programs for instructionslevel programs for instructionsCan only transport or hold mailCan only transport or hold mail

When configuring clients to use Internet eWhen configuring clients to use Internet e--mail, must mail, must identify user’s SMTP serveridentify user’s SMTP server

MIME (Multipurpose Internet Mail MIME (Multipurpose Internet Mail Extensions)Extensions)

Standard SMTP message format allows for lines Standard SMTP message format allows for lines that contain 1000 ASCII characters maxthat contain 1000 ASCII characters max

Cannot handle pictures or formatted textCannot handle pictures or formatted textMIME t d d f di d i t tiMIME t d d f di d i t ti

01/17/08 59TDC363-03

MIME: standard for encoding and interpreting MIME: standard for encoding and interpreting binary files, images, video, and nonbinary files, images, video, and non--ASCII ASCII character sets within echaracter sets within e--mail messagesmail messages

Identifies each element of a message according to Identifies each element of a message according to content typecontent typeWorks in conjunction with SMTPWorks in conjunction with SMTP

POP (Post Office Protocol)POP (Post Office Protocol)Application layer protocol used to retrieve Application layer protocol used to retrieve messages from mail serversmessages from mail serversPOP3 is most current and commonly used POP3 is most current and commonly used versionversion

il d li d d d il ilil d li d d d il il

01/17/08 60TDC363-03

Mail delivered and stored on mail server until user Mail delivered and stored on mail server until user connects (via econnects (via e--mail client) to retrieve messagesmail client) to retrieve messagesMail deleted from server after retrieval Mail deleted from server after retrieval

Minimizes use of server resourcesMinimizes use of server resources

Best suited to users who retrieve mail from same Best suited to users who retrieve mail from same workstation all the timeworkstation all the time

Page 21: Introduction to LAN TDC 363 - DePaul University · 1 Introduction to LAN TDC 363 Week 3 01/17/08 TDC363-03 1 Network Protocols Book: Chapter 4 & 11 Outline The TCP/IP model vs. the

21

IMAP (Internet Message Access Protocol)IMAP (Internet Message Access Protocol)

Developed as sophisticated alternative to POP3Developed as sophisticated alternative to POP3IMAP4 is most current versionIMAP4 is most current versionUsers can store messages on mail serverUsers can store messages on mail server

IMAP4 provides the following features:IMAP4 provides the following features:

01/17/08 61TDC363-03

Retrieve all or only a portion of any mail messageRetrieve all or only a portion of any mail messageReview messages and delete them while the Review messages and delete them while the messages remain on the servermessages remain on the serverCreate sophisticated methods of organizing Create sophisticated methods of organizing messages on the servermessages on the serverShare mailboxes in a central locationShare mailboxes in a central location

Hypertext Transport Protocol Hypertext Transport Protocol (HTTP)(HTTP)

Protocol that Web clients and servers use to Protocol that Web clients and servers use to communicatecommunicateF h b kb f h W bF h b kb f h W b

01/17/08 62TDC363-03

Forms the backbone of the WebForms the backbone of the WebOn TCPOn TCPHypertext Markup Language (HTML)Hypertext Markup Language (HTML)

Language that defines formatting standards for Language that defines formatting standards for Web documentsWeb documents

Hypertext Transport Protocol Hypertext Transport Protocol (HTTP)(HTTP)

01/17/08 63TDC363-03

Figure 11-18: Web client/server transmission using HTTP

Page 22: Introduction to LAN TDC 363 - DePaul University · 1 Introduction to LAN TDC 363 Week 3 01/17/08 TDC363-03 1 Network Protocols Book: Chapter 4 & 11 Outline The TCP/IP model vs. the

22

FTP and TFTPFTP and TFTP

FTP: FTP: File transfer over TCPFile transfer over TCP

01/17/08 64TDC363-03

TFTPTFTPFile transfers over UDPFile transfers over UDPNo loginNo loginSimple acknowledgement and sequence controlSimple acknowledgement and sequence control

NTPNTP

Network Time Protocol (NTP): Application Network Time Protocol (NTP): Application layer protocol used to synchronize clocks of layer protocol used to synchronize clocks of computerscomputers

01/17/08 65TDC363-03

Windows/Linux UtilitiesWindows/Linux Utilities

Commands on Windows to help you configure Commands on Windows to help you configure and trouble shooting network problemsand trouble shooting network problems

ping ping –– check connectivitycheck connectivitynetstat/route netstat/route –– see routing table and TCP sessionssee routing table and TCP sessions

b ( i d l )b ( i d l ) N BIOS i fN BIOS i f

01/17/08 66TDC363-03

nbtstat (windows only) nbtstat (windows only) –– NetBIOS infoNetBIOS infoipconfig/ifconfig ipconfig/ifconfig –– IP address and interface infoIP address and interface infotracert/traceroute tracert/traceroute –– find all routers between src and dstfind all routers between src and dstNslookup/dig Nslookup/dig –– DNS (IP address and hostname DNS (IP address and hostname mapping)mapping)arp arp –– mapping of IP and MAC addressesmapping of IP and MAC addresses

Page 23: Introduction to LAN TDC 363 - DePaul University · 1 Introduction to LAN TDC 363 Week 3 01/17/08 TDC363-03 1 Network Protocols Book: Chapter 4 & 11 Outline The TCP/IP model vs. the

23

Review QuestionsReview QuestionsCompare TCP/IP to the OSI Model Compare TCP/IP to the OSI Model If I give you the IP datagram and leave out 4If I give you the IP datagram and leave out 4--5 data 5 data fields, can you fill in those blank fields in the datagram? fields, can you fill in those blank fields in the datagram? Given an IP address, can you tell its IP address class? Given an IP address, can you tell its IP address class? Class A, B, or C.Class A, B, or C.Describe the problem of IPv4 address shortage. What Describe the problem of IPv4 address shortage. What

01/17/08 67TDC363-03

p gp gare the two short term solutions and one long term are the two short term solutions and one long term solution to address this problem?solution to address this problem?Give a network with multiple IP subnets, can you Give a network with multiple IP subnets, can you populate the routing table on the router?populate the routing table on the router?What are the long term and short term solutions to the What are the long term and short term solutions to the problem of IP address shortage?problem of IP address shortage?

Review Questions (cont.)Review Questions (cont.)

ARP: What is it? How does it work? Is it a ARP: What is it? How does it work? Is it a protocol on IP? Is it a protocol on protocol on IP? Is it a protocol on Ethernet?Ethernet?Pop late the ARP table for a networkPop late the ARP table for a network

01/17/08 68TDC363-03

Populate the ARP table for a network.Populate the ARP table for a network.Trace IP packets and Ethernet frames on a Trace IP packets and Ethernet frames on a network.network.Show three different protocol stacks that Show three different protocol stacks that support file transferssupport file transfers

Review Questions (cont.)Review Questions (cont.)

UDP uses only four data fields in TCP. What are these UDP uses only four data fields in TCP. What are these four fields? four fields? What is DNS? Why do we need it? If your DNS What is DNS? Why do we need it? If your DNS server is down, can you surf the Internet?server is down, can you surf the Internet?If data in the /etc/hosts file isIf data in the /etc/hosts file is hackedhacked how does it affecthow does it affect

01/17/08 69TDC363-03

If data in the /etc/hosts file is If data in the /etc/hosts file is hackedhacked, how does it affect , how does it affect the upper layer services?the upper layer services?What are the port numbers for the FTP, telnet, DNS, What are the port numbers for the FTP, telnet, DNS, SNMP, HTTP, TFTP, and finger?SNMP, HTTP, TFTP, and finger?Given an IPv4 address, can you change it to the IPv6 Given an IPv4 address, can you change it to the IPv6 format?format?

Page 24: Introduction to LAN TDC 363 - DePaul University · 1 Introduction to LAN TDC 363 Week 3 01/17/08 TDC363-03 1 Network Protocols Book: Chapter 4 & 11 Outline The TCP/IP model vs. the

24

Review Questions (cont.)Review Questions (cont.)What is NAT and how is it used?What is NAT and how is it used?

What are the datagram fields changed by NAT?What are the datagram fields changed by NAT?Trace IP packets before and after the NAT router.Trace IP packets before and after the NAT router.What are the differences between BOOTP and What are the differences between BOOTP and DHCP?DHCP?

01/17/08 70TDC363-03

Which one is better and used today?Which one is better and used today?Can DHCP work across multiple LAN segments? How?Can DHCP work across multiple LAN segments? How?

WINS: What is it? What is it for? Is it needed on WINS: What is it? What is it for? Is it needed on today’s network?today’s network?Windows vs. Linux utilities.Windows vs. Linux utilities.

Review Questions (cont.)Review Questions (cont.)How do you find the IP address of How do you find the IP address of www.yahoo.comwww.yahoo.com??How do you find the internet name of 140.192.32.136?How do you find the internet name of 140.192.32.136?How do you find the number of hops (number of How do you find the number of hops (number of routers) from DePaul University to Purdue University?routers) from DePaul University to Purdue University?

01/17/08 71TDC363-03

What are the differences between FTP and TFTP?What are the differences between FTP and TFTP?Give three examples of protocols on TCP.Give three examples of protocols on TCP.Give two examples of protocols on UDP.Give two examples of protocols on UDP.Give a protocol to send eGive a protocol to send e--mail and a protocol to receive mail and a protocol to receive ee--mail. mail.