Você está na página 1de 4

Bits Borrowed Range of Hosts Subnet Mask

1 128 128 128

2 64 192 128+64 =192

3 32 224 192+32 =224

4 16 240 224+16 =240

5 8 248 240+8 =248

6 4 252 248+4 =252

7 2 254 252+2 =254

8 1 255 254+1 =255

The Fastest way to calculate hosts/subnet/broadcast Example: IP 192.168.10.34 subnet mask 255.255.255.224 or CIDR (Classless Inter-Domain Routing) :/27 (8+8+8+3)
To find subnet and broadcast address. 256 224(subnet mask last octet) = 32 First subnet is 32. Second subnet is 32 x 2 = 64 Third subnet is 32 x 3 = 96 Since our IP (192.168.10.34) is fall between 32 64 subnet, so the subnet address is 192.168.10.32 and the broadcast address is 192.168.10.63. Find Host range: Valid hosts range is 192.168.10.33 192.168.10.62 - as 192.168.10.32 is subnet, 192.168.10.63 is broadcast Find total valid hosts 1) 32 27(CIDR) = 5 2y = 25 2 = 30 2 = 28

----------------------------------------------------------------------------------------------------------------------------- ----------For example: ip 192.168.33.72 mask 255.255.255.192 11111111.11111111.11111111.11000000 (subnet mask) 11000000.10101000.00100001.01001000 (ip address) The bolded parts is the HOST bits (the rest are network bits). If you turn all the host bits to 0 on the IP, you get the first possible IP: 11000000.10101000.00100001.01000000 (192.168.33.64) If you turn all the host bits to 1's, then you get the last possible IP (aka the broadcast address): 11000000.10101000.00100001.01111111 (192.168.33.127) So for my example: the network is "192.168.33.64/26": Network address: 192.168.33.64 First usable: 192.168.33.65 (you can use the network address, but generally this is considered bad practice) Last useable: 192.168.33.126 Broadcast address: 192.168.33.127

How to subnet in your head.


Subnet Patterns

Step One left to right Count 1 2 3 4 5 6 7 8 Step two Right to left Binary 2^7 2^6 2^5
Place Value

2^4 16 +16 240

2^3 8 +8 248

2^2 4 +4 252

2^1 2 +2 254

2^0 1 +1 255

128 264

32 +32 224

Step Three left to right Add 128 +64 Equals 128 192
Equals 128

ADD 128 "+64" "+32" "+16" "+8" "+4" "+2" "+1"

192 224 240 248 252 254 255

Step Four Close your eyes and Repeat steps 1-3 Bits 1 2 3 4 5 6
Borrowed Range of Hosts Subnet Mask

7 2 254

8 1 255

128 64 128 192

32 224

16 240

8 248

4 252

What is the difference between Layer 2 switch and Layer 3 switch? Basically a layer 2 switch operates utilizing Mac addresses in it's caching table to quickly pass information from port to port. A layer 3 switch utilizes IP addresses to do the same. While the previous explanation is the "What", for folks in networking the following "How" is far more interesting. Essentially, A layer 2 switch is essentially a multiport transparent bridge. A layer 2 switch will learn about MAC addresses connected to each port and passes frames marked for those ports. It also knows that if a frame is sent out a port but is looking for the MAC address of the port it is connected to and drop that frame. Whereas a single CPU Bridge runs in serial, todays hardware based switches run in parallel, translating to extremly fast switching. Layer 3 switching is a hybrid, as one can imagine, of a router and a switch. There are different

types of layer 3 switching, route caching andtopology-based. In route caching the switch required both a Route Processor (RP) and a Switch Engine (SE). The RP must listen to the first packet to determine the destination. At that point the Switch Engine makes a shortcut entry in the caching table for the rest of the packets to follow. Due to advancement in processing power and drastic reductions in the cost of memory, today's higher end layer 3 switches implement a topology-based switching which builds a lookup table and and poputlates it with the entire network's topology. The database is held in hardware and is referenced there to maintain high throughput. It utilizes the longest address match as the layer 3 destination. Now when and why would one use a l2 vs l3 vs a router? Simply put, a router will generally sit at the gateway between a private and a public network. A router can perform NAT whereas an l3 switch cannot (imagine a switch that had the topology entries for the ENTIRE Internet!!). In a small very flat network (meaning only one private network range for the whole site) a L2 switch to connect all the servers and clients to the internet is probably going to suffice. Larger networks, or those with the need to contain broadcast traffic or those utilizing VOIP, a multi network approach utilizing VLANs is appropriate, and when one is utilizing VLANs, L3 switches are a natural fit. While a router on a stick scenario can work, it can quickly overtax a router if there is any significant intervlan traffic since the router must make complicated routing decisions for every packet that it recieves.
Simple answer: Layer 2 works with the Data-Link Layer and MAC addresses / Broadcast domains. Layer 3 is the Netwrok Layer and works with IP addressing and Routing... A number of layer management protocols, a function defined in the Management Annex, ISO 7498/4, belong to the network layer. These include routing protocols, multicast group management, network layer information and error, and network layer address assignment. It is the function of the payload that makes these belong to the network layer, not the protocol that carries them. Layer 2: Data Link layer The data link layer provides the functional and procedural means to transfer data between network entities and to detect and possibly correct errors that may occur in the physical layer. Originally, this layer was intended for point-to-point and point-to-multipoint media, characteristic of wide area media in the telephone system. Local area network architecture, which included broadcast-capable multiaccess media, was developed independently of the ISO work, in IEEE Project 802. IEEE work assumed sublayering and management functions not required for WAN use.

Você também pode gostar