Вы находитесь на странице: 1из 71

Networking Basic

Topics

What is a LAN ? MAC ? MAC Address ? The growing of LAN the problems of growing LAN

Physical distance Congestion Locality Scalability Repeater, Hub Bridge, Switch Router

Way to solve problem


LAN Topology Router and IP address ARP

LAN

LANs make it possible for businesses that use computer technology to locally share files and printers efficiently, and make internal communications possible. LANs consist of the following components: Computers. Network Interface Cards (NIC) Peripheral devices. Networking media Nework devices

Data Link

LAN contains a group of devices connected by a common, shared medium, or datalink. This medium can be twisted-pair wire, coaxial cable, optical fiber, infrared light, or whatever. All devices attach to the datalink through some network interface.( i.e: interface for twisted-pair wire is different from interface for coaxial cable).
4

Data Link MAC


For

a Local Area Network (LAN), this set of rules, or protocol, is generally called Media Access Control (MAC). MAC, as the name implies, dictates (ra lnh) how each machine will access and share a given medium.
5

The

Data Link Addresses

A LAN has been defined as being a group of devices such as PCs, printers, and servers coexisting on a common communications medium and following a common protocol that regulates (quy nh) how they access on the medium. But there is one large requirement: As in any community (cng ng), each individual must be uniquely identifiable. For example, in a certain company in Viet Nam, there are two individuals (c nhn) named Nguyen, and it is very hard for a telephone receiver to forward when there is a phone call to Mr Nguyen.

Data Link Addresses (cont)


Devices on a LAN must also be uniquely and individually identified. When data is delivered on a LAN , it is encapsulated within an entity called a frame. Think of data encapsulation as being the equivalent of placing a letter inside an envelope.

Data Link Addresses (cont)

Return Address Destination Address

As in the figure, destination address and a return (source) address are written on the outside of the envelope. Without a destination address, the postal service would have no know where to deliver the letter.
8

Data Link Addresses (cont)

DATA

Return Address Destination Address

Destination Address

Source Address

DATA

Likewise, when a frame is placed on a data link, all devices attached to the link "see" the frame; therefore, some mechanism must indicate which device should pick up the frame and read 9 the enclosed data.

Data Link Addresses (cont)


IEEE 802.3
Preamble

Destination Address

Source Address

length

DATA

Frame Check Sequence

IEEE 802.5 /Token Ring


Destination SD AC FC Address Source Address length DATA Frame Check ED Sequence

SD = Start Delimiter AC = Access Control FC = Frame Control

FDDI
Preamble SD FC Destination Address Source Address length DATA Frame Check ED FS Sequence

ED = End Delimiter FS = Frame Status

The three most common data links currently used in LANs are Ethernet, Token Ring, and FDDI (Fiber Distributed Data Interface). Although each link is drastically (trm trng) different from the others, they share a common format for addressing devices on the network. 10

Data Link Addresses (cont)


IEEE 802.3
Preamble

Destination Address

Source Address

length

DATA

Frame Check Sequence

IEEE 802.5 /Token Ring


Destination SD AC FC Address Source Address length DATA Frame Check ED Sequence

SD = Start Delimiter AC = Access Control FC = Frame Control

FDDI
Preamble SD FC Destination Address Source Address length DATA Frame Check ED FS Sequence

ED = End Delimiter FS = Frame Status

Figure above shows the format of most common LAN frames. Notice that every case includes a destination address and a source address. The format of the address depends on the particular MAC protocol, but all the addresses serve the same purpose: to uniquely identify the machine for which the frame is destined and 11 the device from which it was sent.

Data Link MAC Address


48 BITS

000000000000000000001100 000100101000101001111101

0000.0c12.8a7d

The MAC address is a 48-bit number, which, as Figure below shows, is designed so that every device anywhere on the planet should be uniquely identifiable. 12

Data Link MAC Address


48 BITS

000000000000000000001100 000100101000101001111101

0000.0c12.8a7d

It is now administered by the Institute of Electrical and Electronics Engineers (IEEE), is variously called the burned-in address, the physical address, the machine address, or most commonly, the MAC address.

13

Data Link MAC Address


48 BITS

000000000000000000001100 000100101000101001111101

0000.0c12.8a7d

MAC addresses have no structure, and are considered flat address. Example: 0000.0c12.3456 or 00-00-0c-12-34-56.
14

Data Link MAC Address Format


Organizational Unique Identifier (OUI)
Vendor Assigned (NIC, interface)

TheThe remaining six first six hexadecimal hexadecimal digits comprise digits, which are administered the NIC number or interface by the IEEE, identify the serial number. manufacturer or vendor.

15

Data Link MAC Address Format


Organizational Unique Identifier (OUI)
24 bits 6 hex digits 00 60 2F Cisco

Vendor Assigned (NIC, interface)


24 bits 6 hex digits 00 DF 25 particular device
16

Data Link MAC Address

Although the MAC addresses are referred by convention as "addresses," they are really names. Think about it: Because the identifier is burned in, or permanently assigned to a device, it is a part of that device and goes wherever the device goes. ( )
Mc d quy c MAC address nh addresses, n tht ra l ci tn m thi, b73i v n c ghi c nh vo thit b
17

The growing of LAN

Now we have a resource-sharing tool called LAN Its so wonderful, so everyone wants to be connected to it. But as a LAN grows, new problems present. The first is one of physical distance. The second problem associated with growing LANs is congestion The third problem is one of locality. The fourth problem is one of scalability.

18

The Physical Distance problem


There are three factors that may decrease or eliminate any intelligence the signal represents: ( Attenuation (S suy yu)

3 yu t c th lm gim hoc hn ch bt k kh nng hiu tn hiu:

Interference : (noise).

Distortion : Tnh trng khng r v khng chnh xc

19

The Repeater

As the distance the signal must travel down the wire increases, so do the degrading (lm gim gi tr) effects of these three factors. Repeaters are added to the wire at certain intervals to alleviate (gim bt) the difficulties associated with excessive distance. A repeater is placed on the media some distance from the signal source but still near enough to be able to correctly interpret the signal. (Repeater t vo phi gn c th hiu signal chnh xc)

Repeater

A repeater may be thought of as part of the physical medium. It has no real intelligence, but merely regenerates a signal. (Repeater c th c coi nh mi trng physical. N khng thng minh nhng ch n thun l to li Signal
20

The Repeater problem

The repeater can extend the network. But it has only 1 in and 1 out port. Because of that it is not flexible to attach more networks.

Repeater

21

The Repeater problem

To solve the problem, a hub is used to replace the repeater. A hub has the same function as a repeater but it has multi ports, so we can attach many to networks to extend LAN. A hub is also called a multi-port repeater.

22

The Congestion problem


The second problem with growing LAN is congestion. Repeaters and Hubs are added to extend the distance of the wire and to add devices. However, the fundamental reason for having LAN is to share resources. When too-large population (dn s) tries to share limited resource, the rules of behavior begin to be conflicts erupt.

23

The Congestion problem (cont)


On Ethernet networks, collisions deplete the available bandwidth. (Collision lm suy yu bng thng) In a LAN like below, when a host (a pc, or a server) sends a packet, every others on the LAN have to wait until the host finish then one of them can begin transmit and others continue to wait or a collision will occurs.

Collision

24

The Bridge and Switch

Drawing boundaries between populations of LAN devices is a solution to overcrowding. (V ranh gii gia nhng thit b LAN l 1 gii php n tnh trng
qu nhiu ngi ti mt ni )

This task is accomplished by the use of bridges and switches.

25

The Locality problem

Bridges and switches allow the distance of a LAN to extended, but only within a certain geographic limitation.

26

The Locality problem

Bridges and switches allow the distance of a LAN to extended, but only within a certain geographic limitation. Extending a LAN across the city or across the continent.

Viet Nam

Thailand

27

The Locality problem

Such distances require the use of a Wide Area Network (WAN).

Viet Nam

Thailand

28

The Scalability problem

Bridges and Switches allow a network to be divided into smaller populations of stations; in this way station-to-station traffic is localized.(khoanh vng)

29

The Scalability problem

Certain types of frames cannot be localized (khoanh vng), though. Some applications require data to be broadcast - that is, the data must be delivered to all stations on a network.

30

The Scalability problem

Bridges must forward a broadcast frame out all ports to ensure that all stations receive a copy.

31

The Scalability problem

As a bridged network becomes larger and larger, more and more stations will be originating broadcast traffic; soon, broadcasted frames cause the network to become congested again.

Company A

Company B

32

The Scalability problem

To manage broadcast traffic and other scaling challenges, another kind of boundary is necessary. This kind of networks is better known as an internetwork. The device that makes internetworks possible is a router.

Company A

Company B Company B

33

LAN Topology

So far, The information presented may be summary into a few brief statements: A data communication network (LAN) is a group of two or more devices connected by a common, shared medium. These devices have an agreed-upon set of rules, usually called the Media Access Control (MAC) , that govern how the media is shared. Each device has an identifier, and each identifier is unique to only one device. Using these identifiers, the devices communicate by encapsulating the data they need to send within a virtual envelope called a frame.

34

Physical vs. Logical Topologies

In networking terminology, the physical layout of a networks devices is the physical topology. The way in which data accesses media and transmits packets across it is the logical topology of a network. The logical topology you choose will influence the physical layout of the cable and vice-versa(ngc li). The decisions you make will be difficult to change later on. So you need to consider both the physical and logical implications (s dnh lu) before you make any decisions about the type of network to install. The physical and logical topologies depend on the way the cabling is installed, the network connection devices used, and the protocols used to transmit data.
35

Physical vs. Logical Topologies

For example, a physical star topology usually uses a logical bus topology. A physical ring topology uses a logical ring topology.

36

Types of Physical Topologies

These are several popular type of LAN topology:


Bus Ring Star Extended Star Mesh

37

LAN Topology (Bus)

A bus topology uses a single backbone cable that is terminated at both ends by a terminator. All the hosts connect directly to this backbone. Networks that have a bus topology usually use thin coaxial cable that connects to the NIC using a BNC connector. As you can see above, this connector can be used to connect two or more computers together in a daisy-chain (chui cnh hoa) 38 fashion.

LAN Topology (Bus)

The Institute of Electrical and Electronics Engineers (IEEE) 802.3 standard has set the length of a cable segment and the number of device on an Ethernet bus network For a Thinnet network, also referred to as 10BASE2 and Thin Ethernet, the maximum segment length is about 200 meters (185m) connecting a maximum of 30 devices. Another kind of Bus Ethernet is Thicknet, which is also known as Thick Ethernet and 10BASE5. Thicknet uses a thicker-gauge coaxial cable than Thinnet. The cable segment limitation is 500 39 meters with a maximum of 100 nodes.

LAN Topology (Ring)

A ring topology is connected in the form of a ring or circle. It has no beginning or end that needs to be terminated. This allows every device to have an equal advantage accessing 40 the media.

LAN Topology (Ring)


The most common implementation of the ring is in a Token Ring network

When the first ring networks were installed, they used a singlering topology. In a single-ring network, a single cable is shared by all the devices, and the data travels in one direction. Each device waits its turn and transmits. When the data reaches41 its destination, another device can transmit.

LAN Topology (Ring)

As technology evolved, a dual-ring topology was developed. This topology allows two rings to send data, each in a different direction. Not only does this let more packets travel over the network; it also creates redundancy.

42

LAN Topology (Ring)

FDDI

Fiber Distributed Data Interface (FDDI) is a technology similar to Token Ring.(FDDI l mt cng ngh ging nh Token Ring nhng n dng light) But it uses light instead of electricity to transmit data. FDDI networks use two rings for redundancy.
43

LAN Topology (Star)

A star topology connects all cables to a central point of concentration. This central point can be a hub or a switch. Each device in a star network is connected to the central hub with its suitable cable. (Mi thit b trong mng Star ni vi Hub trung tm vi cable thch hp)

44

LAN Topology (Extended Star)

An extended star topology links individual stars together by connecting the hubs and/or switches. This topology can extend 45 the scope of the network.

LAN Topology (Mesh)

In Mesh topology, each host has its own connections to all other hosts. This allows all the devices to continue to communicate if one 46 connection goes down.

Types of Logical Topologies


Now that youve learned all of the options for physically connecting the media and devices in your LAN, You need to understand the different ways in which the devices in a LAN communicate and transmit data. These are the logical topologies. There are only two types: Logical Bus and Logical Ring

47

Logical Bus vs. Logical Ring

When a network is physically cabled in a bus, it is easy to understand that it is sending data in a logical bus throughout the network. That is the data moves from device to other device in a linear fashion. 48

Logical Bus vs. Logical Ring

Likewise, a physical ring is easily interpreted as a logical ring


49

Logical Bus vs. Logical Ring

When a network uses a physical star topology, media can be accessed and data sent in either a logical bus or a logical ring. It is what happens inside that hub will defines the logical topology. And that will depend on the network connection devices used, such as a NIC and a hub or MAU(Multistation Access Unit), and 50 the layer 2 protocol implemented.

Logical Bus (Star)

Ethernet Hub

An Ethernet hub uses a logical bus topology inside to transmit data to all the segments of its star. The advantages of a logical bus topology are

If a node is down, it does not bring down the entire network. Its the most widely implemented of the logical topologies. Additions and changes can be made easily without affecting other workstations Collisions can occur easily. Only one device may access the media at a time

The disadvantages of a logical bus topology are:



51

Logical Ring (Star)

MAU

It is also possible for a network with a physical star topology to transmit data in a logical ring. A device called a MAU ( short for Multistation Access Unit) is the central device in this type of Token Ring network. The MAU may look just like a regular hub. But the way it works is 52 different from Ethernet Hub.

Logical Bus (Star)


MAU

Inside the MAU, the data is passed from device to device using a logical ring.

The advantage of a logical ring topology are: The amount of data that can be carried in one message is much greater than on a logical bus. A broken ring will stop all transmissions. A device must wait for an empty token to be able to transmit.
53

The disadvantages of a logical ring topology area:

Router
Y 4.3 X A 1.1 Network 1

FDDI
Network 2

Network 3

Token Ring

Network 4

Just as a data link may directly connect two devices, a router also creates a connection between two devices. The difference is that, as Figure above shows, whereas the communication path between two devices sharing a common data link is a physical path, the communication path provided by routers between two devices on different networks is a higher54 level, logical path.

Router (packet)
Y 4.3 X A 1.1 Network 1

FDDI Network 2

Network 3

Token Ring

Network 4

Notice that the logical path, or route, between the devices in Figure above traverses several types of data links: an Ethernet, an FDDI ring, a serial link, and a Token Ring. As noted earlier, to be delivered on the physical path of a data link, data must be encapsulated within a frame, as a sort of digital envelope. (Data phi c encapulate trong 1 frame)
55

Router (packet)
Y 4.3 X A 1.1 Network 1 FDDI Network 2
Token Ring

Network 3

Network 4

Likewise, to be delivered across the logical path of a routed internetwork, data must also be encapsulated; the digital envelope used by routers is a packet.

56

Router (packet)
(2) FDDI (1) Ethernet Data from X to Y Token Ring (3) Data from X to Y (4)

Data from X to Y

Serial

Data from X to Y

Y 4.3

X A

FDDI Network 2

1.1 Network 1

Network 3

Token Ring

Network 4

As noted earlier, each type of data link has its own unique frame format. So the frame changes from data link to data link The internetwork route depicted in Figure above crosses several data links, but the packet remains the same from end to end.
(internetwork route m t trong hnh trn i qua vi data link, nhng packet vn gi nguyn t end to end)
57

Router (packet)
(2) FDDI (1) Ethernet Data from X to Y Serial Data from X to Y Token Ring (3) Data from X to Y Y Data from X to Y (4)

4.3
X FDDI
Token Ring

A
1.1 Network 1

Network 2

Network 3

Network 4

1)

The originating host encapsulates the data to be delivered within a packet. The packet must then be delivered across the host's data link to the local routerthat host's default gatewayso then host encapsulates the packet within a frame.

58

Router (packet)
(2) FDDI (1) Ethernet Data from X to Y Serial Data from X to Y Token Ring (3) Data from X to Y Y Data from X to Y (4)

4.3
X FDDI
Token Ring

A
1.1 Network 1

Network 2

Network 3

Network 4

This operation is the same as placing an envelope inside of a larger envelope, for example, inserting an envelope containing a letter into a Federal Express envelope. The destination data link identifier of the frame is the identifier of the interface of the local router, and the source data link identifier 59 is the host's.

Router (packet)
(2) FDDI (1) Ethernet Data from X to Y Serial

Data from X to Y

Token Ring (3)

Data from X to Y
(4)

Data from X to Y

Y 4.3

X
A 1.1 Network 1

FDDI Network 2

Network 3

Token Ring

Network 4

2)

That router (router A in Figure below) removes the packet from the Ethernet frame; router A knows that the next-hop router on the path is router B, out its FDDI interface, so router A encapsulates the packet in an FDDI frame. Now the destination identifier in the frame is the FDDI interface of router B, and the source identifier is the FDDI interface of 60 router A.

Router (packet)
(2) FDDI
(1) Ethernet Data from X to Y Serial Data from X to Y Token Ring (3) Data from X to Y Y 4.3 X FDDI Network 2
Token Ring

Data from X to Y (4)

A
1.1 Network 1

Network 3

Network 4

3)

Router B removes the packet from the FDDI frame, knows that the next-hop router on the path is router C across the serial link. Router B then sends the packet to C encapsulated in the 61 proper frame for the serial link.

Router (packet)
(2) FDDI (1) Ethernet Data from X to Y Serial Data from X to Y Token Ring (3) Data from X to Y Y Data from X to Y (4)

4.3
X A 1.1 Network 1 FDDI
Token Ring

Network 2

Network 3

Network 4

4)

Router C removes the packet and recognizes that the station for which the packet is destined is on its directly connected Token Ring network. Router C encapsulates the packet in a Token Ring frame with the destination identifier of the destination station and the 62 source identifier of its Token Ring interface.

Router (packet)
(2) FDDI (1) Ethernet Data from X to Y Serial Data from X to Y Token Ring (3) Data from X to Y Y Data from X to Y (4)

4.3
X A 1.1 Network 1 FDDI
Token Ring

Network 2

Network 3

Network 4

The packet has been delivered.


63

Router (packet)
(2) FDDI Data from X to Y Token Ring Data from X to Y (4)

(1)
Ethernet Data from X to Y Serial

(3)
Data from X to Y Y 4.3

X A 1.1 Network 1

FDDI
Network 2

Network 3

Token Ring

Network 4

When station Y receive the packet, there are two questions: How does station Y knows that packet is from station X. How does router A know that station Y is on network 64 attached to FDDI interface (the same with router B).

Router (network address)


152.1.4.3 Y 4.3 152.1.4.1
Token Ring

172.16.1.1 X

11.1.1.1

11.1.1.2
FDDI Network 2

A 1.1 172.16.1.254 Network 1

B C Network 124.1.1.1 3 124.1.1.2

Network 4

For devices to correctly communicate on a LAN, they must be uniquely identified by means of a data link identifier. If a routed internetworka network of networksis to be created, then each member network must likewise be uniquely identifiable. And that network identifier is network address (IP address) 65

Router (network address)


152.1.4.3 Y 4.3 152.1.4.1
Token Ring

172.16.1.1 X

11.1.1.1

11.1.1.2
FDDI Network 2

A 1.1 172.16.1.254 Network 1

B C Network 124.1.1.1 3 124.1.1.2

Network 4

Ethernet

152.1.4.3 172.16.1.1

Data

Now that the two questions can be answered: The router A and B can route packet to the destination because station X has put the network address (IP address) of station Y to the packet. Station Y know the packet is from station X because it read the source network address (station Xs IP address) in the packet. 66

ARP

Network devices in the same local network communicate using MAC addresses. So there is a question: Why network devices in the same local network still using IP address to communicate ? The answer is that the applications such as ping, telnet, http, ftp are designed for IP address. So in the same local network, network devices still have to use IP address to communicate. That is why there is a mechanism to map IP address to MAC address. It is called ARP.

67

ARP
PC A 192.168.1.1 PC B 192.168.1.2 MAC B

MAC A

PC C
192.168.1.3 MAC C

For example, on PC A we enter the command ping 192.168.1.2. ARP running on PC A will find MAC address of PC that has IP address of 192.168.1.2 to communicate. ARP will create a ARP request message and broadcast to the data link. PC B after receive the message will create a ARP reply message in response to the ARP request message. ARP reply message then is sent to PC A using unicast.
68

ARP
ARP Request
192.168.1.1 MAC A 192.168.1.2 FF-FF-FF-FF-FF-FF

ARP Reply
192.168.1.2 MAC B 192.168.1.1 MAC A

PC A

PC B 192.168.1.2 MAC B PC C 192.168.1.3 MAC C


69

192.168.1.1
MAC A

ARP

When PC A receives ARP reply message from PC B, it will using that MAC address to send data to PC B.

PC A 192.168.1.1
ARP request reply data ARP ARP request data ARP reply

PC B 192.168.1.2 MAC B

MAC A
ARP request

PC C
192.168.1.3 MAC C
70

End of Network Basic

71