Escolar Documentos
Profissional Documentos
Cultura Documentos
com
LAN Concepts
What Is a Network?
A Network is a series of devices interconnected by communication pathways. Local Area Networks (LANs) span relatively small geographic areas. Wide Area Networks (WANs) span relatively large geographic areas.
WAN
H3065S C.01
Transport
3 2
Physical
What kinds of cabling are supported? What kinds of connectors are supported? Whats the longest supported cable segment?
H3065S C.01
0x0060B07ef226
Following number is in hex ... These six hex digits identify the card manufacturer
4
H3065S C.01
Network bits within the IP determine which network the host is on.
Host bits within the IP distinguish each host from all other hosts on the network. Hosts with identical network bits are said to be on the same IP network.
128.1.1.1
Which network is the host on?
128.1.1.1
128.1.1.2
128.1 Network
H3065S C.01
IP Network Classes
The IP address network/host bit boundary varies from network to network. Networks with more host bits may have more hosts. Networks with fewer host bits may have fewer hosts.
/8 Network
/16 Network
/24 Network
8 Host Bits
H3065S C.01
The IP Netmask
100000000 00000001 00000001 00000001
IP Address: 128.1.1.1/16
Netmask: 255.255.0.0 or 0x ff ff 00 00
111111111
11111111
00000000
00000000
Q: How many bits in my IP are network bits? A: The netmask has the answer!
H3065S C.01
H3065S C.01
128.1.1.1
128.1.1.2
128.1.1.3
Packets sent to the network broadcast address are received by ALL hosts on the network. Formulate the broadcast address by setting all host bits to "1".
# ping 128.1.255.255
H3065S C.01 9 2001 Hewlett-Packard Company
128.1.1.1
128.1.1.2
128.1.1.3
# ping 127.0.0.1
H3065S C.01
10
Obtaining an IP Address
Private Intranet
Firewall
Public Internet
Obtaining an IP address on a Private Intranet allows limited access to the Internet via a network Firewall.
Obtaining an IP address on the Public Internet allows direct connectivity to millions of hosts worldwide.
H3065S C.01
11
IP Address Examples
IP Address 192.66.123.4/24 Netmask Network Broadcast
148.10.12.14/16
9.12.36.1/8 163.128.19.9/16
123.45.65.23/8
199.66.55.4/24
H3065S C.01
12
Host Names
/etc/hosts I can reference nodes by host name and let HP-UX automatically determine the IP addresses for me!
H3065S C.01
13
Example: System sanfran pings system oakland 1. Resolve hostname oakland to an IP address. 2. Lookup the MAC address in the ARP cache corresponding to oakland's IP address. 3. Send the packet to oakland's MAC address.
H3065S C.01
14
Broadcast Packet
4 2
128.1.1.1 128.1.1.2 128.1.1.3 128.1.1.4 128.1.1.4 080009-000001 080009-000002 080009-000003 incomplete! 080009-23EF45
128.1.1.2 (oakland)
128.1.1.3 (la)
128.1.1.4 (sandiego)
$ ping sandiego
sanfran pings sandiego. sanfran resolves sandiego's IP address via /etc/hosts. Search for sandiego's IP in the arp cache the IP address is not found in ARP cache. Send ARP broadcast on the local network to find the MAC address for 128.1.1.4. System with the specified IP address responds with a packet containing its MAC. The MAC address and corresponding IP address are added to sanfran's ARP cache. The frame specifically addressed to sandiego's MAC address is sent.
15
H3065S C.01
IP address
No
Yes
Send a broadcast requesting the MAC for the destination IP. Destination machine responds with its MAC address.
Yes, on local network
No
Use the MAC address found in ARP cache as the destination MAC.
Record the found MAC address in the ARP cache for later reference. Send the packet out on the wire with the source and destination MAC and IP addresses.
H3065S C.01
16
4
3 1 2 2
Data Packets
3
1
Send Packet
Acknowledgements
1 6
Reassemble
2
Segment Data
1 2 3
Open Close
sanfran 128.1.1.1
oakland 128.1.1.2
Sending a packet with TCP: 1. Open connection to remote node. 2. Segment data into datagram packets. 3. Send datagrams to destination node.
2
1
1
128.1.1.1 (sanfran)
3
128.1.1.2 (oakland)
Sending a packet with UDP: 1. Packets cannot be segmented or streamed; a packet is always sent as a single message. 2. No connection is opened with the node; the packet is simply sent to the node. 3. No acknowledgement is sent back to the original sender. Since the original sender never knows if packet is received, sender never retransmits. The receiver doesnt know if it received all of the intended packets. With UDP, the application is responsible for ensuring data transmission is complete.
H3065S C.01
18
ftpd
port 21
rlogind
port 513
128.1.1.2 (oakland)
$ telnet sanfran
128.1.1.3 (la)
$ ftp sanfran
128.1.1.4 (sandiego)
$ rlogin sanfran
128.1.1.1 (sanfran)
128.1.1.1 (sanfran) Problem: Which network application gets the data when multiple instances are present? Multiple clients can be executing the same network application. Multiple instances of the network application can be running on the same client. Solution: Create a unique socket for each process which runs a network application. A socket is a port number combined with a nodes IP address. A socket connection is the coupling of a client socket address with a server socket address.
H3065S C.01 20 2001 Hewlett-Packard Company
telnet 128.1.1.2.50001
telnet 128.1.1.2.50002
128.1.1.2 (oakland)
128.1.1.1 (sanfran)
128.1.1.2 . 50001
128.1.1.2 . 50002 Socket
128.1.1.1 . 23
128.1.1.1 . 23
Socket
Communications between two processes over the network are uniquely defined by their socket connection.
21
H3065S C.01
Transport
TCP requires that a socket connection be established; UDP does not. TCP requires packets be acknowledged; UDP does not. TCP is streams-based; UDP is message-based.
IP addresses define a systems network and host number. MAC addresses uniquely identify a LAN card. Ultimately, packets are sent from one MAC address to another. ARP caches map IP addresses to MAC addresses. The type of media used to connect the machines together. The type of cabling used for the network.
3 2
Physical
H3065S C.01
22