0% found this document useful (0 votes)
13 views31 pages

On Tap - Updated

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views31 pages

On Tap - Updated

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

ÔN TẬP

MẠNG MÁY TÍNH CƠ BẢN


ThS. NGÔ MINH NGHĨA
Email: [email protected]
CÁC NỘI DUNG ĐÃ HỌC
Chapter Nội dung

Chapter 01 Networking Today

Protocol and Model


Chapter 02 + 03
Physical Layer
Data Link Layer
Chapter 04 + 05 THI GIỮA KÌ
Ethernet Switching
Network Layer
Chapter 06 + 07 THI CUỐI KÌ
Address Resolution

Chapter 08 IPv4 Addressing

IPv6 Addressing
Chapter 09 + 10
Transport Layer

Application Layer
Chapter 11 + 12
IP Static Routing
CẤU TRÚC ĐỀ THI CUỐI KÌ

• 20 CÂU TRẮC NGHIỆM (7 điểm) CHIA SUBNET


• 01 CÂU BÀI TẬP TỰ LUẬN (3 điểm) Hoặc

• THỜI GIAN: 60 PHÚT VLSM


• ĐƯỢC SỬ DỤNG TÀI LIỆU GIẤY
CHAPTER 01 – NETWORKING TODAY
• All computers that are connected to a network and participate directly in network communication are classified as hosts.
• Diagrams of networks often use symbols to represent the different devices and connections that make up a network.
• The two types of network infrastructures are Local Area Networks (LANs), and Wide Area Networks (WANs).
• SOHO internet connections include cable, DSL, Cellular, Satellite, and Dial-up telephone.
• Business internet connections include Dedicated Leased Line, Metro Ethernet, Business DSL, and Satellite.
• Network architecture refers to the technologies that support the infrastructure and the programmed services and rules, or
protocols, that move data across the network.
• There are four basic characteristics of network architecture: Fault Tolerance, Scalability, Quality of Service (QoS), and
Security.
• Recent networking trends that affect organizations and consumers: Bring Your Own Device (BYOD), online collaboration,
video communications, and cloud computing.
• There are several common external and internal threats to networks.
• Larger networks and corporate networks use antivirus, antispyware, and firewall filtering, but they also have other
security requirements: Dedicated firewall systems, Access control lists (ACL), Intrusion prevention systems (IPS), and
Virtual private networks (VPN)
CHAPTER 02 – PROTOCOL AND MODEL
The Rules
• Protocols must have a sender and a receiver.
• Common computer protocols include these requirements: message encoding, formatting and encapsulation, size, timing, and delivery
options.
Protocols
• To send a message across the network requires the use of several protocols.
• Each network protocol has its own function, format, and rules for communications.
Protocol Suites
• A protocol suite is a group of inter-related protocols.
• TCP/IP protocol suite are the protocols used today.
Standards Organizations
• Open standards encourage interoperability, competition, and innovation.
Reference Models
• The two models used in networking are the TCP/IP and the OSI model.
• The TCP/IP model has 4 layers and the OSI model has 7 layers.
Data Encapsulation
• The form that a piece of data takes at any layer is called a protocol data unit (PDU).
• There are five different PDUs used in the data encapsulation process: data, segment, packet, frame, and bits
Data Access
• The Network and Data Link layers are going to provide addressing to move data through the network.
• Layer 3 will provide IP addressing and layer 2 will provide MAC addressing.
• The way these layers handle addressing will depend on whether the source and the destination are on the same network or if the
destination is on a different network from the source.
CHAPTER 03 – PHYSICAL LAYER
• Before any network communications can occur, a physical connection to a local network, either wired or wireless, must
be established.
• The physical layer consists of electronic circuitry, media, and connectors developed by engineers.
• The physical layer standards address three functional areas: physical components, encoding, and signaling.
• Three types of copper cabling are: UTP, STP, and coaxial cable (coax).
• UTP cabling conforms to the standards established jointly by the TIA/EIA. The electrical characteristics of copper cabling
are defined by the Institute of Electrical and Electronics Engineers (IEEE).
• The main cable types that are obtained by using specific wiring conventions are Ethernet Straight-through and Ethernet
Crossover.
• Optical fiber cable transmits data over longer distances and at higher bandwidths than any other networking media.
• Wireless media carry electromagnetic signals that represent the binary digits of data communications using radio or
microwave frequencies. Wireless does have some limitations, including coverage area, interference, security, and the
problems that occur with any shared medium.
• Wireless standards include the following: Wi-Fi (IEEE 802.11), Bluetooth (IEEE 802.15), WiMAX (IEEE 802.16), and
Zigbee (IEEE 802.15.4).
• Wireless LAN (WLAN) requires a wireless AP and wireless NIC adapters.
CHAPTER 04 – DATA LINK LAYER
• The data link layer of the OSI model (Layer 2) prepares network data for the physical network.
• The data link layer is responsible for network interface card (NIC) to network interface card communications.
• The IEEE 802 LAN/MAN data link layer consists of the following two sublayers: LLC and MAC.
• The two types of topologies used in LAN and WAN networks are physical and logical.
• Three common types of physical WAN topologies are: point-to-point, hub and spoke, and mesh.
• Half-duplex communications exchange data in one direction at a time. Full-duplex sends and receives data
simultaneously.
• In contention-based multi-access networks, all nodes are operating in half-duplex.
• Examples of contention-based access methods include: CSMA/CD for bus-topology Ethernet LANs and CSMA/CA for
WLANs.
• The data link frame has three basic parts: header, data, and trailer.
• Frame fields include: frame start and stop indicator flags, addressing, type, control, data, and error detection.
• Data link addresses are also known as physical addresses.
• Data link addresses are only used for link local delivery of frames.
CHAPTER 05 – ETHERNET SWITCHING
• Ethernet operates in the data link layer and the physical layer. Ethernet standards define both the Layer 2 protocols and
the Layer 1 technologies.
• Ethernet uses the LLC and MAC sublayers of the data link layer to operate.
• The Ethernet frame fields are: preamble and start frame delimiter, destination MAC address, source MAC address,
EtherType, data, and FCS.
• MAC addressing provides a method for device identification at the data link layer of the OSI model.
• An Ethernet MAC address is a 48-bit address expressed using 12 hexadecimal digits, or 6 bytes.
• When a device is forwarding a message to an Ethernet network, the Ethernet header includes the source and destination
MAC addresses. In Ethernet, different MAC addresses are used for Layer 2 unicast, broadcast, and multicast
communications.
• A Layer 2 Ethernet switch makes its forwarding decisions based solely on the Layer 2 Ethernet MAC addresses.
• The switch dynamically builds the MAC address table by examining the source MAC address of the frames received on a
port.
• The switch forwards frames by searching for a match between the destination MAC address in the frame and an entry in
the MAC address table.
• Switches use one of the following forwarding methods for switching data between network ports: store-and-forward
switching or cut-through switching. Two variants of cut-through switching are fast-forward and fragment-free.
• Two methods of memory buffering are port-based memory and shared memory.
• There are two types of duplex settings used for communications on an Ethernet network: full-duplex and half-duplex.
CHAPTER 06 – NETWORK LAYER
• IP is connectionless, best effort, and media independent.
• IP does not guarantee packet delivery.
• IPv4 packet header consists of fields containing information about the packet.
• IPv6 overcomes IPv4 lack of end-to-end connectivity and increased network complexity.
• A device will determine if a destination is itself, another local host, and a remote host.
• A default gateway is router that is part of the LAN and will be used as a door to other networks.
• The routing table contains a list of all known network addresses (prefixes) and where to forward the packet.
• The router uses longest subnet mask or prefix match.
• The routing table has three types of route entries: directly connected networks, remote networks, and a default route.
CHAPTER 07 – ADDRESS RESOLUTION
• Layer 2 physical addresses (i.e., Ethernet MAC addresses) are used to deliver the data link frame with the encapsulated
IP packet from one NIC to another NIC on the same network.
• If the destination IP address is on the same network, the destination MAC address will be that of the destination device.
• When the destination IP address (IPv4 or IPv6) is on a remote network, the destination MAC address will be the address
of the host default gateway (i.e., the router interface).
• An IPv4 device uses ARP to determine the destination MAC address of a local device when it knows its IPv4 address.
• ARP provides two basic functions: resolving IPv4 addresses to MAC addresses and maintaining a table of IPv4 to MAC
address mappings.
• After the ARP reply is received, the device will add the IPv4 address and the corresponding MAC address to its ARP
table.
• For each device, an ARP cache timer removes ARP entries that have not been used for a specified period of time.
• IPv6 does not use ARP, it uses the ND protocol to resolve MAC addresses.
• An IPv6 device uses ICMPv6 Neighbor Discovery to determine the destination MAC address of a local device when it
knows its IPv6 address.
CHAPTER 08 – IPV4 ADDRESSING
• The IP addressing structure consists of a 32-bit hierarchical network address that identifies a network and a host portion.
Network devices use a process called ANDing using the IP address and associated subnet mask to identify the network
and host portions.
• Destination IPv4 packets can be unicast, broadcast, and multicast.
• There are globally routable IP addresses as assigned by the IANA and there are three ranges of private IP network
addresses that cannot be routed globally but can be used on all internal private networks.
• Reduce large broadcast domains using subnets to create smaller broadcast domains, reduce overall network traffic, and
improve network performance.
• Create IPv4 subnets using one or more of the host bits as network bits. However, networks are most easily subnetted at
the octet boundary of /8, /16, and /24.
• Larger networks can be subnetted at the /8 or /16 boundaries.
• Use VLSM to reduce the number of unused host addresses per subnet.
• VLSM allows a network space to be divided into unequal parts. Always begin by satisfying the host requirements of the
largest subnet. Continue subnetting until the host requirements of the smallest subnet are satisfied.
• When designing a network addressing scheme, consider internal, DMZ, and external requirements. Use a consistent
internal IP addressing scheme with a set pattern of how addresses are allocated to each type of device.
CHAPTER 09 – IPV6 ADDRESSING
• The IETF has created various protocols and tools to help network administrators migrate their networks to IPv6. The
migration techniques can be divided into three categories: dual stack, tunneling, and translation.
• IPv6 addresses are 128 bits in length and written as a string of hexadecimal values.
• The preferred format for writing an IPv6 address is x:x:x:x:x:x:x:x, with each “x” consisting of four hexadecimal values.
• There are three types of IPv6 addresses: unicast, multicast, and anycast.
• An IPv6 unicast address uniquely identifies an interface on an IPv6-enabled device.
• IPv6 global unicast addresses (GUAs) are globally unique and routable on the IPv6 internet.
• An IPv6 link-local address (LLA) enables a device to communicate with other IPv6-enabled devices on the same link and
only on that link (subnet).
• The command to configure an IPv6 GUA on an interface is ipv6 address ipv6-address/prefix-length.
• A device obtains a GUA dynamically through ICMPv6 messages. IPv6 routers periodically send out ICMPv6 RA
messages, every 200 seconds, to all IPv6-enabled devices on the network.
• RA messages have three methods: SLAAC, SLAAC with a stateless DHCPv6 server, and stateful DHCPv6 (no SLAAC).
• The interface ID can be created using the EUI-64 process or a randomly generated 64-bit number.
• The EUIs process uses the 48-bit Ethernet MAC address of the client and inserts another 16 bits in the middle of MAC
address to create a 64-bit interface ID.
• Depending upon the operating system, a device may use a randomly generated interface ID.
• All IPv6 devices must have an IPv6 LLA. An LLA can be configured manually or created dynamically.
• Cisco routers automatically create an IPv6 LLA whenever a GUA is assigned to the interface.
• IPv6 was designed with subnetting in mind. A separate subnet ID field in the IPv6 GUA is used to create subnets.
CHAPTER 10 – TRANSPORT LAYER
• The transport layer is the link between the application layer and the lower layers that are responsible for network
transmission.
• The transport layer includes TCP and UDP.
• TCP establishes sessions, ensures reliability, provides same-order delivery, and supports flow control.
• UDP is a simple protocol that provides the basic transport layer functions.
• UDP reconstructs data in the order it is received, lost segments are not resent, no session establishment, and UPD does
not inform the sender of resource availability.
• The TCP and UDP transport layer protocols use port numbers to manage multiple simultaneous conversations.
• Each application process running on a server is configured to use a port number.
• The port number is either automatically assigned or configured manually by a system administrator.
• For the original message to be understood by the recipient, all the data must be received and the data in these segments
must be reassembled into the original order.
• Sequence numbers are assigned in the header of each packet.
• Flow control helps maintain the reliability of TCP transmission by adjusting the rate of data flow between source and
destination.
• To avoid and control congestion, TCP employs several congestion handling mechanisms.
CHAPTER 11 – APPLICATION LAYER
• Application layer protocols are used to exchange data between programs running on the source and destination
hosts. The presentation layer has three primary functions: formatting, or presenting data, compressing data, and
encrypting data for transmission and decrypting data upon receipt. The session layer creates and maintains dialogs
between source and destination applications.
• In the client/server model, the device requesting the information is called a client and the device responding to the
request is called a server.
• In a P2P network, two or more computers are connected via a network and can share resources without having a
dedicated server.
• The three common HTTP message types are GET, POST, and PUT.
• Email supports three separate protocols for operation: SMTP, POP, and IMAP.
• DNS protocol matches resource names with the required numeric network address.
• DHCP for IPv4 service automates the assignment of IPv4 addresses, subnet masks, gateways, and other IPv4 networking
parameters. The DHCPv6 messages are SOLICIT, ADVERTISE, INFORMATION REQUEST, and REPLY.
• An FTP client is an application which runs on a computer that is being used to push and pull data from an FTP server.
• Three functions of SMB messages: start, authenticate, and terminate sessions, control file and printer access, and allow
an application to send or receive messages to or from another device.
CHAPTER 12 – ROUTING CONCEPTS - IP STATIC ROUTING
• The primary functions of a router are to determine the best path to forward packets based on the information in its
routing table, and to forward packets toward their destination.
• The best path in the routing table is also known as the longest match. The longest match is the route in the routing table
that has the greatest number of far-left matching bits with the destination IP address of the packet.
• Directly connected networks are networks that are configured on the active interfaces of a router. A directly connected
network is added to the routing table when an interface is configured with an IP address and subnet mask (prefix length)
and is active (up and up).
• Routers learn about remote networks in two ways: static routes and with dynamic routing protocols.
• After a router determines the correct path, it can forward the packet on a directly connected network, it can forward the
packet to a next-hop router, or it can drop the packet.
• Routers support three packet forwarding mechanisms: process switching, fast switching, and CEF.
• There are several configuration and verification commands for routers, including show ip route, show ip interface, show
ip interface brief and show running-config.
• A routing table contains a list of routes known networks (prefixes and prefix lengths). The source of this information is
derived from directly connected networks, static routes, and dynamic routing protocols.
• Every router makes its decision alone, based on the information it has in its own routing table. The information in a
routing table of one router does not necessarily match the routing table of another router.
• Routing table entries include the route source, destination network, AD, metric, next-hop, route timestamp, and exit
interface.
• Static routes are manually configured and define an explicit path between two networking devices.
CHAPTER 12 – ROUTING CONCEPTS - IP STATIC ROUTING
• Dynamic routing protocols can discover a network, maintain routing tables, select a best path, and automatically discover
a new best path if the topology changes.
• The default route specifies a next-hop router to use when the routing table does not contain a specific route that matches
the destination IP address. A default route can be either a static route or learned automatically from a dynamic routing
protocol.
• IPv4 routing tables still have a structure based on classful addressing represented by levels of indentation. IPv6 routing
tables do not use the IPv4 routing table structure.
• Cisco IOS uses what is known as the administrative distance (AD) to determine the route to install into the IP routing
table. The AD represents the "trustworthiness" of the route. The lower the AD, the more trustworthy the route source.
• Static routes are commonly used as a default route forwarding packets to a service provider, for routes outside the
routing domain and not learned by the dynamic routing protocol, when the network administrator wants to explicitly
define the path for a specific network, or for routing between stub networks.
• Dynamic routing protocol are commonly used in networks consisting of more than just a few routers, when a change in
the network topology requires the network to automatically determine another path, and for scalability. As the network
grows, the dynamic routing protocol automatically learns about any new networks.
• The main components of dynamic routing protocols are data structures, routing protocol messages, and algorithms.
• The best path is selected by a routing protocol based on the value or metric it uses to determine the distance to reach a
network. The best path to a network is the path with the lowest metric.
• When a router has two or more paths to a destination with equal cost metrics, then the router forwards the packets using
both paths equally. This is called equal cost load balancing.
CHAPTER 12 – ROUTING CONCEPTS - IP STATIC ROUTING
• Static routes can be configured for IPv4 and IPv6. Both protocols support the following types of static routes: standard
static route, default static route, floating static route, and summary static route.
• When configuring a static route, the next hop can be identified by an IP address, exit interface, or both. How the
destination is specified creates one of the three following types of static route: next-hop, directly connected, and fully
specified.
• IPv4 static routes are configured using the following global configuration command: ip route network-address subnet-
mask { ip-address | exit-intf [ip=address] } [distance].
• IPv6 static routes are configured using the following global configuration command: ipv6 route ipv6-prefix/prefix-
length { ipv6-address | exit-intf [ipv6-address]} [distance].
• In a next-hop static route, only the next-hop IP address is specified. The exit interface is derived from the next hop.
• When configuring a static route, another option is to use the exit interface to specify the next-hop address. Directly
connected static routes should only be used with point-to-point serial interfaces.
• In a fully specified static route, both the exit interface and the next-hop IP address are specified. This form of static route
is used when the exit interface is a multi-access interface and it is necessary to explicitly identify the next hop. The next
hop must be directly connected to the specified exit interface.
• In a fully specified IPv6 static route, both the exit interface and the next-hop IPv6 address are specified.
CHAPTER 12 – ROUTING CONCEPTS - IP STATIC ROUTING
• A default route is a static route that matches all packets.
• Default static routes are commonly used when connecting an edge router to a service provider network, and a stub
router.
• The command syntax for an IPv4 default static route is similar to any other IPv4 static route, except that the network
address is 0.0.0.0 and the subnet mask is 0.0.0.0.
• The command syntax for an IPv6 default static route is similar to any other IPv6 static route, except that the ipv6-
prefix/prefix-length is ::/0, which matches all routes.
• Floating static routes are static routes that are used to provide a backup path to a primary static or dynamic route in the
event of a link failure.
• The floating static route is configured with a higher administrative distance than the primary route. By default, static
routes have an administrative distance of 1, making them preferable to routes learned from dynamic routing protocols.
• IP floating static routes are configured by using the distance argument to specify an administrative distance.
• A host route is an IPv4 address with a 32-bit mask or an IPv6 address with a 128-bit mask.
CHAPTER 12 – ROUTING CONCEPTS - IP STATIC ROUTING
• There are three ways a host route can be added to the routing table: automatically installed when an IP address is
configured on the router, configured as a static host route, or automatically obtained through other methods not covered
in this module.
• Cisco IOS automatically installs a host route, also known as a local host route, when an interface address is configured
on the router.
• A host route can be a manually configured static route to direct traffic to a specific destination device.
• For IPv6 static routes, the next-hop address can be the link-local address of the adjacent router; however, you must
specify an interface type and an interface number when using a link-local address as the next hop. To do this, the original
IPv6 static host route is removed, then a fully specified route is configured with the IPv6 address of the server and the
IPv6 link-local address of the ISP router.
BÀI TẬP CHIA SUBNET
Cho địa chỉ đường mạng 192.168.128.0/18, hãy chia thành 4 đường mạng con (NET 1 tới NET 4)
Xác định:
a. Dãy địa chỉ IP hợp lệ của NET 1.
b. Địa chỉ hợp lệ nhỏ nhất (địa chỉ hợp lệ đầu tiên) của NET 2.
c. Địa chỉ hợp lệ lớn nhất (địa chỉ hợp lệ cuối cùng) của NET 3.
d. Địa chỉ hợp lệ thứ 50 của NET 4.
e. Số địa chỉ IP hợp lệ trong các đường mạng con vừa tìm được.

Hướng dẫn:
- Địa chỉ đường mạng: 192.168.128.0/18
11000000 10101000 10000000 00000000

Ban đầu: /18  18 bit phần network, 14 bit phần host


11000000 10101000 10000000 00000000
Chia thành 4 đường mạng => mượn 2 bit (22 = 4) ở phần host
11000000 10101000 10000000 00000000
Lúc sau: /20  20 bit phần network, 12 bit phần host
1100000 10101000 10000000 00000000
BÀI TẬP CHIA SUBNET
Cho địa chỉ đường mạng 192.168.128.0/18, hãy chia thành 4 đường mạng con (NET 1 tới NET 4)
Xác định:
a. Dãy địa chỉ IP hợp lệ của NET 1.
b. Địa chỉ hợp lệ nhỏ nhất (địa chỉ hợp lệ đầu tiên) của NET 2.
c. Địa chỉ hợp lệ lớn nhất (địa chỉ hợp lệ cuối cùng) của NET 3.
d. Địa chỉ hợp lệ thứ 50 của NET 4.
e. Số địa chỉ IP hợp lệ trong các đường mạng con vừa tìm được.
Với 2 bit mượn thì sẽ có 4 trường hợp, tương ứng với 4 subnet.
NET 1: 00
11000000 10101000 10000000 00000000 NET 1: 192.168.128.0/20

NET 2: 01
11000000 10101000 10010000 00000000 NET 2: 192.168.144.0/20

NET 3: 10
11000000 10101000 10100000 00000000 NET 3: 192.168.160.0/20
NET 4: 11
11000000 10101000 10110000 00000000 NET 4: 192.168.176.0/20
BÀI TẬP CHIA SUBNET
Cho địa chỉ đường mạng 192.168.128.0/18, hãy chia thành 4 đường mạng con (NET 1 tới NET 4)
Xác định:
a. Dãy địa chỉ IP hợp lệ của NET 1.
NET 1: 00
11000000 10101000 10000000 00000000 192.168.128.0/20 Địa chỉ đường mạng
11000000 10101000 10000000 00000001 192.168.128.1/20 Địa chỉ hợp lệ thứ 1/ đầu tiên
11000000 10101000 10000000 00000010 192.168.128.2/20 Địa chỉ hợp lệ thứ 2
11000000 10101000 10000000 00000011 192.168.128.3/20 Địa chỉ hợp lệ thứ 3

11000000 10101000 10000000 00000100 192.168.128.4/20 Địa chỉ hợp lệ thứ 4


...
11000000 10101000 10001111 11111101 192.168.143.253/20
11000000 10101000 10001111 11111110 192.168.143.254/20 Địa chỉ hợp lệ lớn nhất / cuối cùng

11000000 10101000 10001111 11111111 192.168.143.255/20 Địa chỉ broadcast

Dãy địa chỉ IP hợp lệ của NET 1: 192.168.128.1 – 192.168.143.254/20


BÀI TẬP CHIA SUBNET
Cho địa chỉ đường mạng 192.168.128.0/18, hãy chia thành 4 đường mạng con (NET 1 tới NET 4)
Xác định:
b. Địa chỉ hợp lệ nhỏ nhất (địa chỉ hợp lệ đầu tiên) của NET 2.
NET 2: 01
11000000 10101000 10010000 00000000 192.168.144.0/20 Địa chỉ đường mạng
11000000 10101000 10010000 00000001 192.168.144.1/20 Địa chỉ hợp lệ thứ 1/ đầu tiên
11000000 10101000 10010000 00000010 192.168.144.2/20 Địa chỉ hợp lệ thứ 2
11000000 10101000 10010000 00000011 192.168.144.3/20 Địa chỉ hợp lệ thứ 3

11000000 10101000 10010000 00000100 192.168.144.4/20 Địa chỉ hợp lệ thứ 4


...
11000000 10101000 10011111 11111101 192.168.159.253/20
11000000 10101000 10011111 11111110 192.168.159.254/20 Địa chỉ hợp lệ lớn nhất / cuối cùng

11000000 10101000 10011111 11111111 192.168.159.255/20 Địa chỉ broadcast

Địa chỉ hợp lệ nhỏ nhất (địa chỉ hợp lệ đầu tiên) của NET 2: 192.168.144.1/20
BÀI TẬP CHIA SUBNET
Cho địa chỉ đường mạng 192.168.128.0/18, hãy chia thành 4 đường mạng con (NET 1 tới NET 4)
Xác định:
c. Địa chỉ hợp lệ lớn nhất (địa chỉ hợp lệ cuối cùng) của NET 3.
NET 3: 10
11000000 10101000 10100000 00000000 192.168.160.0/20 Địa chỉ đường mạng
11000000 10101000 10100000 00000001 192.168.160.1/20 Địa chỉ hợp lệ thứ 1/ đầu tiên
11000000 10101000 10100000 00000010 192.168.160.2/20 Địa chỉ hợp lệ thứ 2
11000000 10101000 10100000 00000011 192.168.160.3/20 Địa chỉ hợp lệ thứ 3

11000000 10101000 10100000 00000100 192.168.160.4/20 Địa chỉ hợp lệ thứ 4


...
11000000 10101000 10101111 11111101 192.168.175.253/20
11000000 10101000 10101111 11111110 192.168.175.254/20 Địa chỉ hợp lệ lớn nhất / cuối cùng

11000000 10101000 10101111 11111111 192.168.175.255/20 Địa chỉ broadcast

Địa chỉ hợp lệ lớn nhất (địa chỉ hợp lệ cuối cùng) của NET 3: 192.168.175.254/20
BÀI TẬP CHIA SUBNET
Cho địa chỉ đường mạng 192.168.128.0/18, hãy chia thành 4 đường mạng con (NET 1 tới NET 4)
Xác định:
d. Địa chỉ hợp lệ thứ 50 của NET 4.
NET 4: 111
11000000 10101000 10110000 00000000 192.168.176.0/20 Địa chỉ đường mạng
11000000 10101000 10110000 00000001 192.168.176.1/20 Địa chỉ hợp lệ thứ 1/ đầu tiên
11000000 10101000 10110000 00000010 192.168.176.2/20 Địa chỉ hợp lệ thứ 2
11000000 10101000 10110000 00000011 192.168.176.3/20 Địa chỉ hợp lệ thứ 3
...
11000000 10101000 10110000 00110010 192.168.176.50/20 Địa chỉ hợp lệ thứ 50
...
11000000 10101000 10111111 11111110 192.168.191.254/20 Địa chỉ hợp lệ lớn nhất / cuối cùng

11000000 10101000 10111111 11111111 192.168.191.255/20 Địa chỉ broadcast

Địa chỉ hợp lệ thứ 50 của NET 4: 192.168.176.50/20


BÀI TẬP CHIA SUBNET
Cho địa chỉ đường mạng 192.168.128.0/18, hãy chia thành 4 đường mạng con (NET 1 tới NET 4)
Xác định:
e. Số địa chỉ IP hợp lệ trong các đường mạng con vừa tìm được.

Lúc sau: /20  20 bit phần network, 12 bit phần host


11000000 10101000 10000000 00000000

Số địa chỉ IP hợp lệ trong các đường mạng con vừa tìm được: 212 – 2
BÀI TẬP CHIA VLSM
Cho một hệ thống mạng gồm 200 host và địa chỉ IP 172.24.0.0/17. Hãy chia hệ thống mạng này thành 04 mạng con thỏa mãn
yêu cầu sau:
Net 1: 120 Host
Net 2: 50 Host
Net 3: 2 Host
Net 4: 28 Host
Xác định dãy địa chỉ IP hợp lệ trong từng mạng con.

Bước 1: Xác định thứ tự các đường mạng cần chia sắp theo thứ tự từ lớn đến nhỏ.
Net 1 cần 120 địa chỉ IP  Cần 7 bit ở phần host
Net 2 cần 50 Địa chỉ IP  Cần 6 bit ở phần host
Net 4 cần 28 địa chỉ IP  Cần 5 bit ở phần host
Net 3 cần 2 địa chỉ IP  Cần 2 bit ở phần host
BÀI TẬP CHIA VLSM Net 1 cần 120 địa chỉ IP  Cần 7 bit ở phần host

Bước 2: Để đường mạng phù hợp với yêu cầu của NET 1. Ta chia đường mạng ban đầu 172.24.0.0/17 thành các đường
mạng có 7 bit ở phần host. Vậy các đường mạng đó có 25 bit ở phần network  /25
Đường mạng ban đầu: /17  17 bit ở phần network, 15 bit ở phần host
10101100 000110000 00000000 00000000

Các đường mạng mới được chia ra có 25 bit ở phần network, như vậy từ đường mạng có Subnet Mask /17 ta đã chia ra
được 28 đường mạng mới với Subnet Mask /25 (mượn 8 bit).
Lấy đường mạng đầu tiên chia ra được là đường mạng cho NET 1.

10101100 000110000 00000000 00000000


Đường mạng đầu tiên:
10101100 000110000 00000000 00000000 172.24.0.0/25 NET 1

Bước 3: Từ 28 đường mạng vừa chia được, ta lấy đường mạng kế tiếp để chia VLSM cho các đường mạng còn lại theo
yêu cầu của đề.
Đường mạng kế tiếp của NET 1:
10101100 000110000 00000000 10000000 172.24.0.128/25
Như vậy bài toán trở thành chia đường mạng 172.24.0.128/25 cho 3 NET 2, NET 3, NET 4
BÀI TẬP CHIA VLSM Net 2 cần 50 Địa chỉ IP  Cần 6 bit ở phần host

Bước 4: Để đường mạng phù hợp với yêu cầu của NET 2. Ta chia đường mạng 172.24.0.128/25 thành các đường mạng
có 6 bit ở phần host. Vậy các đường mạng đó có 26 bit ở phần network  /26
Từ đường mạng 172.24.0.128/25: /25  25 bit ở phần network, 7 bit ở phần host
10101100 000110000 00000000 10000000

Các đường mạng mới được chia ra có 26 bit ở phần network, như vậy từ đường mạng có Subnet Mask /25 ta đã chia ra
được 21 đường mạng mới với Subnet Mask /26 (mượn 1 bit).
Lấy đường mạng đầu tiên chia ra được là đường mạng cho NET 2.

10101100 000110000 00000000 10000000


Đường mạng đầu tiên:
10101100 000110000 00000000 10000000 172.24.0.128/26 NET 2

Bước 5: Từ 21 đường mạng vừa chia được, ta lấy đường mạng kế tiếp để chia VLSM cho các đường mạng còn lại theo
yêu cầu của đề.
Đường mạng kế tiếp của NET 2:
10101100 000110000 00000000 11000000 172.24.0.192/26
Như vậy bài toán trở thành chia đường mạng 172.24.0.192/26 cho 2 NET 3, NET 4
BÀI TẬP CHIA VLSM Net 4 cần 28 địa chỉ IP  Cần 5 bit ở phần host

Bước 6: Để đường mạng phù hợp với yêu cầu của NET 4. Ta chia đường mạng 172.24.0.192/26 thành các đường mạng
có 5 bit ở phần host. Vậy các đường mạng đó có 27 bit ở phần network  /27
Từ đường mạng 172.24.0.192/26: /26  26 bit ở phần network, 6 bit ở phần host
10101100 000110000 00000000 11000000

Các đường mạng mới được chia ra có 27 bit ở phần network, như vậy từ đường mạng có Subnet Mask /26 ta đã chia ra
được 21 đường mạng mới với Subnet Mask /27 (mượn 1 bit).
Lấy đường mạng đầu tiên chia ra được là đường mạng cho NET 4.

10101100 000110000 00000000 11000000


Đường mạng đầu tiên:
10101100 000110000 00000000 11000000 172.24.0.192/27 NET 4

Bước 7: Từ 21 đường mạng vừa chia được, ta lấy đường mạng kế tiếp để chia VLSM cho các đường mạng còn lại theo
yêu cầu của đề.
Đường mạng kế tiếp của NET 4:
10101100 000110000 00000000 11100000 172.24.0.224/27
Như vậy bài toán trở thành chia đường mạng 172.24.0.224/27 cho NET 3
BÀI TẬP CHIA VLSM Net 3 cần 2 địa chỉ IP  Cần 2 bit ở phần host

Bước 8: Để đường mạng phù hợp với yêu cầu của NET 3. Ta chia đường mạng 172.24.0.224/27 thành các đường mạng
có 2 bit ở phần host. Vậy các đường mạng đó có 30 bit ở phần network  /30
Từ đường mạng 172.24.0.224/27: /27  27 bit ở phần network, 5 bit ở phần host
10101100 000110000 00000000 11100000

Các đường mạng mới được chia ra có 30 bit ở phần network, như vậy từ đường mạng có Subnet Mask /27 ta đã chia ra
được 23 đường mạng mới với Subnet Mask /30 (mượn 3 bit).
Lấy đường mạng đầu tiên chia ra được là đường mạng cho NET 3.

10101100 000110000 00000000 11100000


Đường mạng đầu tiên:
10101100 000110000 00000000 11100000 172.24.0.224/30 NET 3

Như vậy,
Net 1: 172.24.0.0/25 Số IP hợp lệ: 27 - 2
Net 2: 172.24.0.128/26 Số IP hợp lệ: 26 - 2
Net 4: 172.24.0.192/27 Số IP hợp lệ: 25 - 2
Net 3: 172.24.0.224/30 Số IP hợp lệ: 22 - 2

You might also like