هيچ تلنگری
و هيچ خاطره ای
آن وقت
می شد تا خود صبح خوابيد و خواب ستاره ديد…
Chapter 7
IOS supplies network services to computers that use networked applications.


The cable from the console to a PC requires a special eight-wire cable, called a rollover cable, in which pin 1 connects to pin 8 on the other end of the cable, pin 2 connects to pin 7, and so on.
The login
command actually tells the router to display a password prompt.
Several concurrent Telnet connections to a router are allowed. The line vty 0 4 command signifies that this configuration applies to vtys (virtual teletypes/terminals) 0 through 4.Originally, IOS allowed for only these five vtys, unless the router was also a dial access server,such as a Cisco AS5300. At IOS Version 12.2, 16 vtys are allowed by default on all models of routers. Regardless, all the configured vtys typically have the same password, which is handy because users connecting to the router through Telnet cannot choose which vty they get. User exec mode is one of two command exec modes in the IOS user interface. Enable mode (also known as privileged mode or privileged exec mode) is the other. Enable mode is so named because the enable command is used to reach this mode, as shown in Figure 7-2; privileged mode earns its name because powerful, or privileged, commands can be executed there.

The key sequences in Table 7-4 are part of what Cisco calls enhanced editing mode. IOS enables enhanced editing mode by default and has for a long time. However, you can turn off these keystrokes with the no terminal editing
exec command, and turn them back on with the terminal editing command. Why would you bother? Well, occasionally, you might be using a scripting language to run commands automatically on the router through a Telnet session, and enhanced editing mode sometimes can interfere with the scripts. For the exam, just remember that you can enable and disable enhanced editing mode.
The debug
command actually tells the router to spend some CPU cycles to do things besides its normal functions…
When you use the debug command, IOS creates messages when different events occur and, by default, sends them to the console. These messages are called syslog messages. If you have used the console of a router for any length of time, you likely have noticed these messages— and when they are frequent, you probably became a little frustrated. You can view these same messages when you have Telnetted to a router by using the terminal monitor
command.

The banner motd (motd stands for “message of the day”) command causes a text banner to display when someone accesses the router from the console, Telnet, or an auxiliary port.
■ RAM—Sometimes called DRAM for dynamic random-access memory, RAM is used by the router just as it is used by any other computer: for working storage. The running or active configuration file is stored here.
■ ROM—This type of memory (read-only memory) stores a bootable IOS image, which typically is not used for normal operation. ROM contains the code that is used to boot the router until the router knows where to get the full IOS image or as a backup bootable image, in case there are problems.
■ Flash memory—Either an EEPROM or a PCMCIA card, Flash memory stores fully functional IOS images and is the default location where the router gets its IOS at boot time. Flash memory also can be used to store any other files, including configuration files.
■ NVRAM—Nonvolatile RAM stores the initial or startup configuration file.


copy {tftp | running-config | startup-config} {tftp | running-config | startup-config}
The copy command always replaces the existing file when the file is copied into NVRAM or into a TFTP server. In other words, it acts like the destination file was erased and the new file completely replaced the old one.
When the copy command copies a configuration file into RAM, the configuration file in RAM is not replaced. Effectively, any copy into RAM works just as if you typed the commands in the “from” configuration file in the order listed in the config file. In other words, it works as if the RAM configuration file and the newly copied files were merged.
Three key commands can be used to erase the contents of NVRAM. The write erase and erase startup-config commands are older, whereas the erase nvram: command is the more recent,


The show flash
command then can be used to verify the contents of Flash memory
Flash memory access time is much slower than RAM’s
In some cases, Flash memory can be in read-only mode. That is the case when a router loads only part of the IOS into RAM, to conserve RAM. Other parts of the IOS file are kept in Flash memory (Flash memory access time is much slower than RAM’s). In this case, if Flash memory must be erased to make room for a new image, the IOS could not continue to run. So, if the router is running from a portion of IOS in Flash memory, the router must be booted using IOS in ROM. Then the Flash memory is in read/write mode and the erase and copy processes can be accomplished. The copy tftp flash command in later releases of the IOS actually performs the entire process for you. In earlier releases, you had to boot the router from ROM and then issue the copy tftp flash command.
When using the limited-function IOS in ROM, the router is in a mode called Rxboot mode. Routers cannot route packets while in Rxboot mode, but it can send and receive IP packets like an IP host. So, one of two things must be true for the router to be capable of sending packets to the TFTP server. First, the TFTP server could reside on the same subnet as one of the interfaces on the router. Alternately, you could configure a default route on the router,
pointing to another router that is on one of the same subnets as the router in Rxboot mode.

Chapter 6: Fundamentals of TCP and UDP
TCP provides error recovery, but to do so, it consumes more bandwidth and uses more processing cycles. UDP does not do error recovery, but it takes less bandwidth and uses fewer processing cycles.
TCP provides:
Multiplexing by TCP and UDP involves the process of how a computer thinks when receiving data.
The ports below 1024 are reserved for well-known applications, such as web servers.
Multiplexing relies on the use of a concept called a socket. A socket consists of three things: an IP address, a transport protocol, and a port number. So, for a web server application on Jessie, the socket would be (10.1.1.2, TCP, port 80) because, by default, web servers use the well-known port 80.
In Figure 6-3, Hannah and Jessie used three applications at the same time—hence, there were three socket connections open.
A socket on a single computer should be unique.
The window starts small and then grows until errors occur. The window then “slides” up and down based on network performance.
Notice that the web server must wait after sending the third segment because the window is exhausted.
This three-way connection-establishment flow must complete before data transfer can begin.

■ Connection-oriented protocol—A protocol either that requires an exchange of messages
before data transfer begins or that has a required pre-established correlation between two endpoints
■ Connectionless protocol—A protocol that does not require an exchange of messages and
that does not require a pre-established correlation between two endpoints
Many people confuse the real meaning of connection-oriented with the definition of a reliable, or error-recovering, protocol. TCP happens to do both, but just because a protocol is connection-oriented does not mean that it also performs error recovery. Table 6-4 lists some popular protocols and tells whether they are connected or reliable.

Ethernet included, the MTU is 1500 bytes.
IP and TCP headers are 20 bytes each, TCP typically segments large data into 1460 byte.
UDP data transfer differs from TCP data transfer in that no reordering or recovery is accomplished.

Chapter 5
ARP is used to dynamically learn the data-link address of an IP host connected to a LAN.
Each of the decimal numbers in an IP address is called an octet.
TCP/IP defines Class D (multicast) addresses and Class E (experimental) addresses as well.
Table 5-3 Sizes of Network and Host Parts of IP Addresses with No Subnetting


The TCP/IP network layer uses several utility protocols to help it complete its task.

ICMP does not rely on any application, so it really just tests basic IP connectivity—Layers 1, 2, and 3 of the OSI model.
Over the years, three protocols have been popular to allow a host computer to discover the IP address it should use:

Both RARP and BOOTP were created with the motivation to allow a diskless workstation to come up and start operating.
With RARP, the creators of the protocol just wanted to get the machine an IP address so that a knowledgeable user could type in commands and copy the correct files from a server onto the diskless computer’s RAM memory so that they could be used. The creators of BOOTP, anticipating a less sophisticated user in the future, wanted to automate as much of the process as possible—including the dynamic assignment of a default gateway (router) IP address.
BOOTP’s name really comes from the feature in which BOOTP supplies the name of a file to the BOOTP client. Typically, the diskless workstations had enough permanent memory to boot a very simple operating system, with the expectation that the computer would use a simple protocol, such as the Trivial File Transfer Protocol (TFTP), to transfer a file containing a more sophisticated operating system into RAM. So, with the ultimate goal being to let a
diskless computer complete the processing of initializing, or booting, a full operating system,BOOTP was aptly named.