Network Services

Hotspot Mikrotik 777

Technology has been used Bootstrap Compatible Mobile.

Design Hotspot-12 beautiful Server Mikrotik

Design Hot Spot Mikrotik Free

Hotspot login server free

Hotspot login server free.

Merge 2 lines in server Pfsense?

Merge 2 lines in server Pfsense server free.

setup squid cahce in Ubuntu

How to setup squid cahce in Ubuntu ?

Tuesday, November 19, 2013

The Transport Layer




The Transport Layer
The Transport layer defines the protocols for structuring messages and checks the validity of transmissions.

Transport Layer Concepts
The Transport layer is remenescent of the old saying Net Tech instructors used to pound into their students’ heads: “Reliable end-to-end error and flow control.” The Transport layer does other
things as well, but the protocols that operate at the Transport layer mainly ensure reliable communications between upper peer layers. That’s not to say there are no Transport layer protocols
that provide none of this. In fact, UDP, as you will see, is a stripped-down protocol that has one job only, to connect the upper layers with the Network layer. It doesn’t concern itself with such
things as reliability, connection establishment, and flow control. Nevertheless, if those things are to be offered, the Transport layer is generally where you need to look for such support. The following sections strive to demystify the intricacies of one of the more complex layers in the OSI model. Discussions center around connection orientation and caomparisons of the
best-known Transport layer protocols.

The Connection Type
To provide error and flow control services, protocols at the Transport layer use connection services. There are two types of connection services:

  • Connection-oriented
  • Connectionless


Connection-oriented services use acknowledgments and responses to establish a virtual circuit between sending and receiving end devices. The acknowledgments are also used to ensure
that the connection is maintained. Alternatively, as in the case of protocols such as Frame Relay and ATM, virtual circuits may be configured manually by administrators or engineers at each
switch along a path from one end device to the other. The one thing all connection-oriented protocols have in common, however, is that no user data will be sent into the network without a virtual circuit already having been established. 
    Connections are similar to phone calls. You dial the intended recipient and the recipient picks up and says hello. You then identify yourself and say that you’d like to talk about something,
and the conversation begins. If you hear silence for a while, you might ask, “Are you still there?” to make sure the recipient is still on the line. When finished, you both agree to end the connection by hanging up. Connection-oriented services work in the same way, except that instead of mouths, phones, and words, they use computers, NICs, and special datagrams.
Figure 2.18 shows an example of the beginning of communications between two computers using connection-oriented services.
      Connectionless services, on the other hand, don’t have error recovery or flow control because most connectionless services are also unreliable.They do have one simple advantage:
speed. Because connectionless services don’t have the overhead of maintaining the connection, the sacrifice in error control is more than made up for in speed. To make another analogy, connectionless services are similar to a postcard. Each message is considered singular and not related to any other by the receiving peer layer. The error control and delivery confirmation are
left up to higher layers.

Transport Layer Implementations
Before we discuss the other layers of the OSI model, let’s take a look at the IPX/SPX, TCP/IP, and NetBEUI implementations of the Transport layer.

Note:
We will look closer at these protocols, as well as AppleTalk and AppleTalk over
IP, in the section “Networking Protocols” later in this chapter.

The IPX/SPX Protocol
As far as the connection services of IPX/SPX are concerned, there are two transport protocols:

  • Internetwork Packet Exchange (IPX))
  • Sequenced Packet Exchange (SPX)


FIGURE 2 . 1 8 Initiating communications using a connection-oriented service 

IPX is connectionless and thus enjoys the benefits of connectionless transports, including increased speed. SPX, on the other hand, uses connection-oriented services. SPX always uses the Network layer services of IPX. IPX, however, can operate independently of SPX, as if it were both a Network and Transport layer entity, as represented in Figure 2.19. Notice the way IPX wraps around SPX, taking up space in both the Network and Transport layers, able to interact with higher-layer protocols and services, without the use of SPX. In this way, IPX without SPX is similar to the combination of UDP and IP, in contrast to TCP with IP, which is more akin to
the combination of SPX and IPX. While IP will always answer to TCP or UDP, never taking on Transport layer functionality on its own, IPX is capable of just such a feat.

FIGURE 2 . 1 9 The IPX/SPX protocol model

IPX/SPX has no name resolution system by default. That functionality is employed when a NetWare server is running Novell Directory Services (NDS) and the NDS directory requester (which runs at the Session, Presentation, and Application layers) can make requests of an NDS database.

Noet:
Directory services databases fall into two broad categories: hierarchical and
nonhierarchical. NDS, unlike the NetWare Bindery it was intended to replace,
is a hierarchically designed directory service, as is the Active Directory (AD)
of Microsoft Windows. Another example of a hierarchical database is the
password shadow file of Linux, which contains more information than a standard
world-readable password file and is only readable by the root account,
making it more secure. The Novell NetWare Bindery is a flat database that
contains definitions for objects, such as users, groups, and workgroups.
Other nonhierarchical databases are non-AD NT domains and non-shadow
Linux password files.


The TCP/IP Protocol
Like the IPX/SPX protocol stack, the TCP/IP protocol stack has two Transport layer protocols:

  • Transmission Control Protocol (TCP)
  • User Datagram Protocol (UDP)

TCP is connection oriented, and UDP is connectionless. Some upper-layer protocols, such as FTP and HTTP, require reliable connection-oriented service and, therefore, use TCP. Other
upper-layer protocols, such as Trivial File Transfer Protocol (TFTP) and Network File System (NFS), require increased speed and will trade reliability for that speed. They, therefore, use UDP.

Noet:
A Fully Qualified Domain Name (FQDN) is the type of name that you use when surfing the Web. It consists of a top-level domain name, such as .com, for example, preceded by a second-level domain name, such as comptia, preceded by a server name or subdomain string, such as www. For FQDN-to-IP address resolution, TCP/IP uses Domain Name Service (DNS). Many operating systems use DNS for name resolution, but Unix (whose networking is based on TCP/IP) uses DNS almost exclusively, and today, so does Microsoft Windows. DNS is probably the most cross-platform name resolution method available. Chapter 4 discusses the function and operation of DNS.

The NetBEUI Protocol
Because it is based on the NetBIOS protocol, NetBIOS Extended User Interface (NetBEUI) has datagram support and, thus, has support for connectionless transmission. It doesn’t, however,
have support for connection-oriented services. NetBIOS does allow hosts to have logical names, but the naming service, as with NDS and DNS, functions at the upper layers of the OSI model. 

The OSI Model’s Middle Layers




The OSI Model’s Middle Layers

As you move up the OSI model, the protocols at each successive layer get more complex and have more responsibilities. At the middle are the Network and Transport layers, which perform
the bulk of the work for a protocol stack. You’ll see why in the sections to follow.

The Network Layer



The Network Layer
The Network layer of the OSI model defines protocols that ensure that the data arrives at the correct destination. This is probably the most commonly discussed layer of the OSI model.

Network Layer Concepts
The following concepts are the most important Network layer concepts:
  • Logical network addressing
  • Routing
Logical Network Addressing
Earlier, you learned that every communicating LAN interface has an address (the MAC address) assigned at the factory and that this address is protocol independent. But as you know, most networks
communicate using protocols that must have their own addressing scheme. If the MAC address is the Data Link layer physical address, the protocol-addressing scheme at the Network
layer defines the logical address.
    Each logical network address is protocol dependent, which is why you may have heard them referred to generically as protocol addresses. For example, a TCP/IP address is not the same as
an IPX address. Additionally, the two protocols can coexist on the same interface without conflict, each simultaneously binding itself to the protocol-independent MAC address for the associated
interface. However, two different interfaces using the same protocol cannot have the same logical network address on the same network. If that happens, neither interface can be seen on the network (see Figure 2.16).

FIGURE 2 . 1 6 Address conflicts on a network





ـــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ
Understanding Network Address Formats
ـــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ

Whenever you have to set up a network or add a device, it is important to have an understanding of how network addresses work. Every network address in either TCP/IP or IPX has both a

network portion and a node, or host, portion. The network portion is the number that is assigned to the network segment to which one of the device’s interfaces is connected. The node portion is the unique number that identifies that device on the segment. Together, the network portion and the node portion of an address ensure that a network address will be unique across the entire network.

IPX addresses use a 32-bit value represented as an eight-digit hexadecimal number for the network portion. This number, called the IPX network address, can be assigned randomly by the
installation program or manually by the network administrator. The node portion is the 12-digit hexadecimal MAC address assigned by the manufacturer. A colon separates the two portions.
Here is a sample IPX address:


TCP/IP addresses, on the other hand, use a dotted decimal notation in the format xxx.xxx.xxx.xxx as shown in the following:


The address is a 32-bit value represented as four groups of eight-digit binary numbers (or, more commonly, up to three decimal digits, depending on the value of the bits) called octets, separated by periods. Each decimal number in an IP address can range from 0 through 255. Which portion is the network and which portion is the node depends on the class of the address if the default separation is used, but the subnet mask assigned with the address configures that

separation, which may not adhere to the default classful boundary. A subnet mask is also a dotted decimal number with numbers in the range of 0 through 255. If a subnet mask contains 255 in any position (corresponding to a binary number of all ones), the corresponding part of the IP address is the network address. For example, if you have the mask 255.255.255.0, the first three octets are the network portion and the last portion is the node. It is possible to have one octet in the mask set to one of a small choice of other values, but that’s beyond the scope of this
study guide. The term subnetwork, or subnet for short, is generally used to mean network
(when only default subnetting is used), segment, or immediate link, when IP routing is used.

ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ

Note:
Address conflicts can be common with TCP/IP because an administrator often
needs to assign IP addresses. IPX addresses don’t suffer from conflict nearly as
often because the MAC address is used as part of the IPX address. The MAC
address is unique and normally can’t be changed (although some utilities are
available on some systems). For more information on network addresses, see
Chapter 4, “TCP/IP Utilities.”



Packets
At the Network layer, data coming from upper-layer protocols are divided into logical chunks called packets. A packet is a unit of data transmission. The size and format of these packets depend on the
Network layer protocol in use. In other words, IP packets differ greatly from IPX packets and Apple- Talk DDP packets, and the three are not compatible. Refer back to Table 2.1, which shows the
names of the protocol data units (PDUs) at the layers that have distinctive data structures.


Routing

Routing is the process of moving data throughout an internetwork, passing through several network segments using devices called routers, which select the path the data takes. Placing routers in
a network to break the network into several smaller subnets turns a network into an entity known as an internetwork. Routers determine which paths to take from internal databases called routing tables. These tables contain information about which router network interface (or port) to place information on in order to send it to a particular subnet. Routers will not pass unknown or broadcast packets by default. A router will route a packet only if it has a specific destination. Even if a default route is configured, the default route is, in fact, a specific destination where the router simply sends everything that doesn’t match any other entry in the routing table to the default route address. Figure 2.17 illustrates conceptual views of routers and their interconnection.

FIGURE 2 . 1 7 An internetwork


Information gets into routing tables in two ways:
  • Through static routing
  • Through dynamic routing
In static routing, the network administrator manually updates the router’s routing table. The administrator enters every subnet into the routing table and selects the port on which the router
should place data when the router receives data destined for that subnet from any other port. Unfortunately, on networks with more than a few segments, manually updating routing tables is time intensive and prohibitive.

Note:
When using a Windows serveras a router, use the ROUTE command at a command prompt in order to add, change, or remove static routes. This same utility is available for non-server Windows devices in case you would prefer to use individual static routes or manually set up a default route. For assistance using this command, simply open a command prompt and enter ROUTE /?.
    Dynamic routing, on the other hand, uses route discovery protocols (better known as routing protocols) to talk to other routers and find out which networks they are attached to. Routers
that use dynamic routing send out special packets to request updates of the other routers in the internetwork as well as to send their own updates.
     With dynamic routing, the two categories of routing protocols are distance vector and link state. Older routing protocols, such as Routing Information Protocol (RIP) for TCP/IP and RIP
for IPX, use the distance vector method. In distance vector routing, a router sends out its routing table when the router is brought online and every minute or so thereafter. When another router
receives the contents of the first router’s table, it adds 1 to the hop count of each route in the list of routes and then re-advertises the list. A hop is one pass through a router. The main downside
to distance vector routing is the overhead required in advertising the entire routing table every 30 seconds, in the case of IP RIP.
    Link state routing is more efficient than distance vector routing. Routers using link state routing protocols send out their routing table updates via multicast or unicast, not broadcast, and then only when necessary. If there is an update, only the update is sent. In the worst case, Open Shortest Path First (OSPF) performs a database synchronization about every 30 minutes, hardly a bandwidth hit.

Note:
NetWare Link Services Protocol (NLSP) for IPX and OSPF for TCP/IP are two link state routing protocols.
Several protocols can be routed, but a few protocols can’t be routed. It is important to know which protocols are routable and which aren’t so that you can choose the appropriate protocol
when it comes time to design an internetwork. Table 2.4 shows a few of the most common routable and nonroutable protocols and the routing protocols they use, if any.

TABLE 2 . 4 Routable and Nonroutable Protocols


Note:
When setting up routing on your network, you may have to configure a default
gateway. A default gateway, when configured on a workstation, is the router
interface on the workstation’s subnet that a packet is sent to when the workstation
doesn’t know the specific path to the intended recipient. TCP/IP subnets
sometimes have multiple routers as well and must use this parameter to specify
which router is the default.

One important topic to understand is how to configure a default gateway address when configuring TCP/IP. This involves setting up both the router to actually be the default gateway, and set up the workstation to use that address as the default gateway. The following will walk you through setting up a default gateway on a Windows workstation and a Cisco router, switch, or other device running Cisco Internetwork Operating System (IOS). Occasionally, you will need to be able to establish or change this feature on one of these devices. You’ll find, by going through these steps on live equipment, that you become more comfortable with an array of
other tasks as well, such as altering the routing table and creating static routes. 
     Microsoft Windows allows manual adjustment of the computer’s routing table, which can be quite advanced depending upon such factors as routing protocols being enabled on the computer
and any manual configurations that have been made. The following steps establish a default gateway that forwards all traffic that does not otherwise match any entries in the routing table to the IP address you configure
  1. Open up a command prompt session. One way to do this is to click the Start button and then click Run. Type in cmd and press Enter.
  2. At the command prompt, enter the command route print to view the current routing table.
  3. Make a note of the current default gateway, if any. The default gateway appears on the line that says, “Default Gateway: current_default_gateway.”
  4. In order to minimize disruption of service, use the same IP address from step 3 in the command route add 0.0.0.0 mask 0.0.0.0 current_default_gateway. If none existed, any address will be fine, although for production configuration, you would want to use the actual IP address of the device to which traffic destined for unknown networks should be forwarded. If you receive an error message, it is probably because you chose an IP address that is not on your local IP subnet. Microsoft requires that the default gateway reside on the same IP subnet as your computer’s interface.
  5. To remove a default route, enter the command route delete 0.0.0.0 mask 0.0.0.0 current_default_gateway. Receiving the error message “The route specified was not found” means that you entered the wrong IP address for the current default gateway or that you likely received an error, as described in step 4.
    Cisco’s (IOS) allows you to create a default gateway for the device you are configuring in much the same way you did for Microsoft Windows, with minor differences. A Cisco router (an example of a device that runs Cisco’s IOS) maintains a potentially more complex routing table because the use of dynamic routing protocols tends to be more prevalent on these devices. The following steps establish a gateway of last resort (Cisco’s term for a default gateway) out the serial interface Serial0 toward whatever device lies across the serial link from the router being configured. One caveat: if your router currently has no interface called, or no configuration on, Serial0, then the following procedure will create an entry in your running configuration but no result will be seen
in the routing table. It is still necessary to perform the removal in the last step or else when and if the interface does become active, the default gateway will activate as well. Feel free to substitute
an actual live serial interface for Serial0, if need be, such as Serial1, Serial0/0, and so on. The privileged EXEC mode command show ip interface brief can help you determine the available IP interfaces your device possesses. Choose one with an IP address. One more thing: this procedure assumes you are able to find your way to privileged EXEC mode on a Cisco device and begins with the command to enter global configuration mode:

1. Issue the command show ip route and make sure you see the line Gateway of last resort is not set after the codes and before the routing entries begin.

2. If step 1 did not give the expected results, it would be best to find a device that does give such results. Once you get the results requested for step 1, issue the following command to enter global configuration mode:
Router#configure terminal
Router(config)#

3. Enter the following commands to establish the default gateway through interface Serial0 and return to privileged EXEC mode, noting the space in the middle of the series of zeros:
Router(config)#ip route 0.0.0.0 0.0.0.0 serial0
Router(config)#end
Router#

4. Enter the command show ip route and confirm that the line described in step 1 has changed to Gateway of last resort is 0.0.0.0 to network 0.0.0.0.

5. Enter the following sequence of commands to remove the default gateway you just created:
Router#configure terminal
Router(config)#no ip route 0.0.0.0 0.0.0.0 serial0
Router(config)#end

Router#

     In both Windows and the Cisco IOS, the default gateway was created with a routing table entry of network 0.0.0.0 with a mask of 0.0.0.0. The reason this entry works as the least desirable
routing table entry is because the last series of 0s (zeros) ANDs with any IP address and produces 0.0.0.0, which matches the network number 0.0.0.0 for the default route. Because this
works for any IP address, this entry will never fail, but because the number of 1s in the mask is zero, it will be the least desirable entry in the routing table, with matched entries having masks with one or more 1s being preferred. Nevertheless, if the default route is the only matching entry, then it will be used. The AND operation is a Boolean algebra operand that produces a 0 when any pair of bits other than two 1s are ANDed. This means that with a mask of all 0s, the result will always be all 0s, and that will always match the network entry of all 0s, making the default gateway work in every case as long as a better match does not exist.

Network Layer Devices
Two devices operate at the Network layer:

  • Routers
  • Layer 3 Switches

The Router

Routers are Network layer devices that connect multiple networks or segments to form a larger internetwork. They are also the devices that facilitate communication within this internetwork. They make the choices about how best to send packets within the internetwork so that they arrive at their destination. Routers do not propagate broadcasts from one of their ports to another, meaning that each port on a router is in a different broadcast domain. A broadcast
domain is the collection of all devices that will receive each others’ broadcast frames.
      Several companies manufacture routers, but probably three of the biggest names in the business are Nortel Networks, Juniper Networks, and Cisco Systems. Nortel Networks is the resulting
corporation from the merger of Nortel and Bay Networks, which itself was once separately Welfleet and Synoptics. Cisco has always been a built-from-the-ground-up router company.
These companies make other products as well, and even though Nortel Networks concentrates on large-scale telephony equipment, it manages to provide adequate competition for Cisco and
Juniper in the router and switch market. Cisco has even moved into Nortel Networks’s arena by using its AVVID product line to compete in the growing Voice over IP (VoIP) market.
     Routers have many functions other than simply routing packets. They can connect many small segments into an internetwork as well as connect internetworks to a much larger network, such as a corporate intranet or the Internet. Routers can also connect dissimilar lower-layer topologies. For example, you can connect an Ethernet and a Token Ring network using a router. Additionally,
with added software, routers can perform firewall functions and packet filtering.

Routers are some of the most complex devices on a network today. Consequently, they are likely to be some of the most expensive But simple low-end routers that make Internet connectivity more affordable have been introduced by Nortel Networks, Cisco, and other companies.


Layer 3 Switches
A Network layer device that has received much media attention of late is the Layer 3 Switch. The Layer 3 part of the name corresponds to the Network layer of the OSI model. It performs
the multiport, virtual LAN, data-pipelining functions of a standard Layer 2 Switch, but it can also perform basic routing functions between virtual LANs.