1 / 20

Agenda

Agenda. Internet Address Pair IP Address Port Address Network Address Translation (NAT) Domain Name. Internet Address. Part I Two Parts. 2=1. IP Address 0.0.0.0 255.255.255.255 Port 0-64 k The full Internet Address pair <IP>:<Port> 10.10.125.5:80 Type in your web browser (demo).

ranee
Download Presentation

Agenda

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Agenda • Internet Address Pair • IP Address • Port Address • Network Address Translation (NAT) • Domain Name

  2. Internet Address Part I Two Parts

  3. 2=1 • IP Address • 0.0.0.0 • 255.255.255.255 • Port • 0-64 k • The full Internet Address pair • <IP>:<Port> • 10.10.125.5:80 • Type in your web browser (demo)

  4. IP Address P.O.er There

  5. IP AddressSize & Form • IPv4 – Current Standard - Legacy • 32 bits total • 8 bit sections (base10 = 0-255) • 255.255.255.255 • IPv6 – Emerging Standard • 128 bits total (4 x IPv4) • 16 bit sections (hex = 0-FFFF) • FFFF:0000:FFFF:0000:FFFF:0000:FFFF:0000

  6. IP AddressFormatting • Convert IP address to network format • Inet_addr (char * stringFormat) • Returns: struct in_addr • Fails if not an IP address • Some confusing number completion intelligence • “125.126.4”  125.126.0.4 • “125.4”  125.0.0.4 • “125.126.12844”  125.126.128.44 • Inet_ntoa (struct in_addr) • Returns an ASCII string • htons (short HostOrderShort) • Returns the short in network byte order (i.e., swapped for Windows) • Example SOCKADDR_IN addr; addr.sin_family = AF_INET; addr.sin_addr.s_addr = inet_addr(“159.151.11.3”); addr.sin_port = htons(80);

  7. IP AddressPositional Meaning • 35.1.9.7 • Network Prefix • 35 • Subnet • 1 • 9 • Host • 7

  8. IP AddressingSpecial Addresses • 255.255.255.255 • INADDR_NONE == INADDR_BROADCAST • Must setup a DATAGRAM for limited broadcast • 0 • INADDR_ANY == ADDR_ANY • sin_addr.s_addr set to this before bind() so it assigns default. • 127.0.0.1 • INADDR_LOOPBACK • Send to self • *.*.*.{240-255} • Directed Broadcast to a specific subnet • *.*.*.{224-239} • Multicast group IP

  9. IP AddressingTypes of addresses • Unicast • Address assigned to an individual • Static • You assign your own (uncommon these days) • DHCP (Dynamic Host Configuration Protocol) • Server assigned address • APIPA (Automatic Private IP Addressing) • Used by routers servicing a single DHCP assigned address • Default if DHCP not available • This is NOT your MAC address on your NIC • Multicast • Address to a list of addresses • Temporary groups • Broadcast • Limited = everyone on your local net • Directed = send to a subnet

  10. Port Not your ordinary desert wine.

  11. PortsThe other half of the address • 16 bit number = 0 - 65,536 • Receiving Port • Must specify a specific port to listen on • Sending Port • Send on any available port (sockets decides) • Can specify send port, but may conflict

  12. PortsKnown & Not So Known • Well Known Ports • 0-1024 • Internet Assigned Number Authority (IANA) – The Registrar • Reserved for standard services (FTP, WWW, SMTP, Telnet, …) • Can use for anything (not recommended) • Often filtered by network hardware • IP address ignored and packet redirected to specific protocol server • Examples • HTTP = Port 80 (web server) • FTP = Port ? (check answer at www.iana.net) • Registered Port Numbers • 1024-65,536 • Not controlled by IANA • Some common services use 1024-10,000 • Be safe, stay high • Hippie Slogan or Good Advice? • 10k-64k

  13. Firewalls Keep Out!

  14. Types of Firewalls • Packet Filter • Proxies • Circuit Gateways

  15. NAT A baby Mosquito?

  16. Network Address Translation • What is it for? • Multiple NIC’s share the same IP Address • Who does this? • Routers at work/home sharing one IP Address • How does it do it? • Each NIC assigned an APIPA address • APIPA + Portα converted to Shared IP + Portβ • Router maintains the translation table and redirects incoming traffic accordingly.

  17. NAT in action Figure 1 Network Address Translation at work.

  18. NAT Traversal • Port Forwarding • Port always assigned to 1 computer • Port Triggering • Starting application temporarily forwards port • DMZ • All traffic also goes to specific computer • Determining WAN IP • From computer on the other side of router • IP Helper API, router config table

  19. Domain Name www.yahoo.com chuck.toonedin.com

  20. Domain Name ResolutionFacilities • Local Host Table (i.e. a cache) • <win>\SYSTEM32\DRIVERS\ETC\HOSTS (demo) • Fast, customizable • Doesn’t scale, gets out of synch with changes • Domain Name Service (DNS) Server • Off site server • Faster updates, hands off, scales • Slower, no control on updates, not always available • Propagation takes time (hrs – weeks) • Case Study • Use DNS if available • Store last used and defaults when not • Ping Demo • Plethora of other custom services • Network Information Service (unix) • NetBIOS over TCP/IP • Windows NLA: Network Location Awareness (mobile computing)

More Related