Networking in Linux

advertisement
Networking in
Windows 2000
NT Layered Network
Architecture
7. Application
User Mode
6. Presentation
Kernel Mode
NetBIOS driver
5. Session
4. Transport
3. Network
Redirectors
Servers
Transport Driver Interface
WinSock driver
Streams
Transport Protocols
2. Data Link
LLC
MAC
1. Physical
NDIS Interface
Streams
Network Adapter Card Drivers
Network Interface Card
Some basic
concepts

NDIS Interface: Network Driver Specification
Interface, wraps NIC drivers and allow
communication with multiple protocols, binds a
NIC to a protocol.

Streams: multiple channels allowing broader
bandwidth for data transfer, envelop the
protocols.

Transport Driver Interface: allows software
drivers (server, redirector, etc) to communicate
with protocols.

Redirectors: software in WS that redirect
network drives, printers requests to network I/O
requests.
Standard NT
protocols

NetBEUI - NetBIOS Extended User
Interface, “native” Windows protocol, not
routable.

TCP/IP - implemented through WinSock,
routable, supports SNMP, DHCP, WINS.

NWLink (IPX/SPX) - used to connect to
Novell NetWare, just a protocol, not
access.

DLC - Data Link Control, used to connect
to IBM mainframes and HP printers
directly connected to a network (server).
Network Resource
Access

UNC - Universal Naming Convention

machine name: \\mname
<= 15 digits
share name: \sname
<= 12 digits
example: \\AL200\HP6
sharing: net share public= c:\temp
using: net use lpt2: \\Al200\public

also graphical





Master Browsers - allow to see what resources
are available


Win NT/2000 use Network Neighborhood
MUP driver - Multiple Universal Naming
Convention Provider
Workgroup and Domain

Peer to Peer





a machine joins a group by declaring (Control Panel)
group names <= 15 digits
peer-to-peer and guest, should not be allowed
shares require username and password
Concept: a group of NT/2000 machines that
share “a security server” - the domain controller





Windows 9x may join by selecting as workgroup the
domain name
user name <= 20 digits, password <= 14 digits
users have permissions and rights in groups
SAM - Security Account Manager, keep user information
Naming a machine and joining a domain: right-click on
MyComputer, select properties, Network identification
and properties.
Addresses

Ethernet address (MAC address )

48-bit unique addresses hard wired in NICs (280
trillion)
12 hex numbers, e.g. 00-A0-C9-9F-00-07
first three identify company, Intel in the example

how to see: System Information, Network Adapter



IP address (number)


32-bit value, not hard coded (4 billion), assigned
manually or by DHCP
four dotted quads, each quad a decimal from 0-255,
corresponding to eight bits, e.g. UBMAIL IP address
is 198.202.0.25
Interneting




Station A wants to send message to station D, but IP
number is not in the same subnet -- no can do!
Sends the message to the default IP router -- default
gateway
All stations belonging to the same subnet share the first
three dotted quads.
204.52.128.67 and 204.52.128.147 are in the same subnet,
while 198.202.0.25 is not.
A,B and C-Class Networks

A-class networks




B-class networks




first 8 bits fixed, from 0-126 (only 127)
very large companies like IBM, BBN, DEC,HP
can assign 3 dotted quads - up to 16.7 million hosts
first 16 bits fixed, first quad 128-191 and second 0-255
(16,384)
Medium-sized companies like Microsoft, Exxon
can assign 2 dotted quads - up to 65,536 hosts
C-class networks


first 24 bits fixed, first quad 192-223, second and third 0255 (2,097,152)
can assign 1 dotted quad - up to 253 hosts, 0 is the
subnet address., 1 default router address, 255
Sockets and WinSock

Special addresses





Sockets are the basic TCP requirement
Socket address




Network address: first address in subnet (0)
Router address: second address in subnet (1)
Broadcast address: last address in subnet (255)
IP address of the receiver
Port number of the receiving program (80,21,23)
Type of port TCP or UDP
WinSock is an adaptation of sockets to the
PC

part of the OS (Windows, Linux, etc.)

an application programming interface
Setting static IP addresses

Go to Control Panel and select Network and Dialup connections







In the first time select Make New Connection, local area
network.
After the first time right-click on Local Area Connection
and select properties.
In both cases you will see the properties dialog,
which allows you to install/uninstall client,
service or protocol.
Select the Internet Protocol and click on
properties
Fill in IP number, Subnet Mask, Default Gateway,
DNS
Use ping to test your setup.
Dynamic IP addresses: use DHCP (Dynamic Host
How does DHCP work?
(1)
IP scope
DHCP discover
DHCP
CLIENT
(0)
MAC address
DHCP offer
IP#, lease time
DHCP
SERVER
(2)
DHCP request
DHCP
CLIENT
DHCP
DATABASE
IP#, MAC address
DHCP ack
MAC address, IP#,
lease time
IP#, lease time
• Scope - a range of IP addresses
• IP lease - the IP# is assigned temporarily
• Reserved IP - servers are assigned fixed IP addresses
Download