Docsity

Understanding IP Address Reuse and File Sharing with NAT and Samba, Slides of Web Application Development

Partial preview of the text

Download Understanding IP Address Reuse and File Sharing with NAT and Samba and more Slides Web Application Development in PDF only on Docsity!

NAT, Samba

Network Address Translation (NAT)

  • Enables reuse of IP addresses, gets around IP’s

limited 32-bit address space

  • TCP-level semantic knowledge is required
  • TCP/IP source
    • Wants to send to cnn.com
    • creates packet <IP sender, TCP sender port, IP dest, TCP dest port>
  • NAT has a local IP LAN address and an external IP

address

NAT

Network Addr Trans

TCP/IP

destination cnn.com

TCP/IP

source

LAN External

NAT (3)

  • When a reply packet is received from cnn.com on

NAT TCP src port

  • NAT substitutes the original sender’s IP sender address and TCP sender port
  • Even if two sources on same LAN choose the same

TCP sending port, they’ll differ in their IP addresses

  • input/output mapping still unique
  • Extends IP address spaces by qualifying addresses

with TCP port #’s

NAT

Network Addr Trans

TCP/IP

destination cnn.com

TCP/IP

source

LAN External

NAT (4)

  • NAT needs to modify IP address and TCP port and

TCP/IP checksums

  • Adds latency
  • The type of NAT described thus far is called a

“Dynamic” NAT

  • Internal hosts can use any non-reserved IP address to connect to external hosts
  • External hosts don’t know about internal IP addresses – NAT’s as “masquerading” firewalls!

NAT

Network Addr Trans

TCP/IP

destination

TCP/IP

source

LAN External

NAT (6)

  • Static NAT’s work with FTP and other application

layer protocols as well

  • Static NAT’s introduce security risk – allowing

unknown outsiders to connect into a local computer

  • Configure your NAT router to have two Ethernet LAN ports with separate IP addresses
  • Place machines you wish to be public on one IP addresses, and keep private hosts on 2nd^ IP address

NAT

Network Addr Trans

TCP/IP

source/ client

TCP/IP

destination Web server

LAN External

NAT (7)

  • NAT’s can be used as load balancers too
    • TCP/IP Packets into a NAT are rewritten with the IP address and TCP port of the most lightly loaded destination
    • Reply packets from destination also rewritten by NAT on way back to source

NAT

Network Addr Trans

TCP/IP

TCP/IP destination source

LAN

TCP/IP

destination

Samba/SMB

  • Server Message Block (SMB) Protocol
    • File sharing protocol that ships with Microsoft OS’s
      • Basis for Network Neighborhood
    • Application-layer protocol over TCP/UDP/IP
  • Open-source SAMBA Server suite enables other

OS’s such as Linux to speak SMB

  • Enables an MS client to access files on a UNIX server – very useful!

Samba/SMB

  • For historical reasons, SMB first ran across the

NETBIOS API, which then ran across various

network protocols, e.g. TCP/UDP, IPX, SNA,

DECnet, etc.

  • SMB packets can be framed in NETBIOS packets which are encapsulated by TCP/UDP
  • NETBIOS over TCP/UDP is called NBT

SMB

NETBIOS

TCP/UDP, IPX, SNA or …

Domain

• A domain is a concept used in NT server

operating systems whereby a user may be

granted access to a number of computer

resources with the use of a single username

and password combination.

Primary Domain Controller

  • A Primary Domain Controller (PDC) is a server

computer in a pre-Windows 2000 NT server Domain

  • The PDC has the master copy of the user accounts

database to which it can access and modify.

  • The PDC will replicate its account database to the

BDCs on a regular basis.

  • Backup Domain Controllers (BDCs) have a copy of

this database, but these copies are read-only.

Forests, Trees and Domains

  • At the top of the structure is the Forest
    • the collection of every object, its attributes and rules (attribute syntax) in the AD.
  • The forest holds one or more transitive trust linked

Trees.

  • A tree holds one or more Domains and domain trees, again, linked in a transitive trust hierarchy.
  • Domains are identified by their DNS name structure, the namespace. A domain has a single DNS name.

Windows NT version 4

Master domain model Uses a single domain to exert control over user account information Separate resource domains manage resources such as networked printers