0% found this document useful (0 votes)
34 views49 pages

Ccna 1 - 49

The document provides information about CCNA certification including what it is, benefits of networking, basic network components, differences between switch and hub, private IP addresses, and other common networking terms and concepts.

Uploaded by

Naweed Behbud
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)
34 views49 pages

Ccna 1 - 49

The document provides information about CCNA certification including what it is, benefits of networking, basic network components, differences between switch and hub, private IP addresses, and other common networking terms and concepts.

Uploaded by

Naweed Behbud
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/ 49

CCNA (Cisco Certified Network Associate)

Cisco CCNA Certification Information


Cisco is a networking solutions company that comprises over 80% of the Internet backbone. Cisco
technology includes the designing and building of networks used in today's business world.

What is CCNA Certification?


The Cisco certified Network Associate (CCNA) credential is the premium certification for
professionals who design and develop custom business solutions with Cisco routers and
switches. Cisco Certifications focus on both routing and switching, as well as WAN switching
solutions in network design and network support, providing you with flexible options for career
development. One may advance to CCIE status by first achieving Associate certification in these
tracks

What is a Network?
There are many types of networks that provide us with different kinds of services. In the course of a
day, a person might make a phone call, watch a television show, listen to the radio, look up something
on the Internet, or even play a video game with someone in another country. All of these activities
depend on robust, reliable networks. Networks provide the ability to connect people and equipment no
matter where they are in the world. People use networks without ever thinking about how they work
or what it would be like if the networks did not exist.

What is a Network?
Communication technology in the 1990s, and before, required separate, dedicated networks for voice,
video and computer data communications. Each of these networks required a different type of device
in order to access the network. Telephones, televisions, and computers used specific technologies and
different dedicated network structures, to communicate. But what if people want to access all of these
network services at the same time, possibly using a single device?

New technologies create a new kind of network that delivers more than a single type of service.
Unlike dedicated networks, these new converged networks are capable of delivering voice, video and
data services over the same communication channel or network structure.

New products are coming to market that take advantage of the capabilities of converged information
networks. People can now watch live video broadcasts on their computers, make a telephone call over
the Internet, or search the Internet using a television. Converged networks make this possible.

Benefits of Networking
Networks come in all sizes. They can range from simple networks consisting of two computers, to
networks connecting millions of devices. Networks installed in small offices, or homes and home
offices, are referred to as SOHO networks. SOHO networks enable sharing of resources, such as
printers, documents, pictures and music between a few local computers.

1
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
In business, large networks can be used to advertise and sell products, order supplies, and
communicate with customers. Communication over a network is usually more efficient and less
expensive than traditional forms of communication, such as regular mail or long distance phone calls.
Networks allow for rapid communication such as email and instant messaging, and provide
consolidation, storage, and access to information on network servers.

Business and SOHO networks usually provide a shared connection to the Internet. The Internet is
considered a "network of networks" because it is literally made up of thousands of networks that are
connected to each other.

Here are other uses of a network and the Internet:

 Sharing music and video files


 Research and on-line learning
 Chatting with friends
 Planning vacations
 Purchasing gifts and supplies
Basic Network Components
There are many components that can be part of a network, for example personal computers, servers,
networking devices, and cabling. These components can be grouped into four main categories:

 Hosts
 Shared peripherals
 Networking devices
 Networking media

The network components that people are most familiar with are hosts and shared peripherals. Hosts
are devices that send and receive messages directly across the network.

Shared peripherals are not directly connected to the network, but instead are connected to hosts. The
host is then responsible for sharing the peripheral across the network. Hosts have computer software
configured to enable people on the network to use the attached peripheral devices.

The network devices, as well as networking media, are used to interconnect hosts.

Some devices can play more than one role, depending on how they are connected. For example, a
printer directly connected to a host (local printer) is a peripheral. A printer directly connected to a
network device and participates directly in network communications is a host.

1. What is deference between Switch and Hub


Answer
Hub is a multiport repeater it broadcast information (it receives on any port)
to all ports hence is called non-intelligent or dumb.

HUB works on Physical layer where as SWITCH works on data link


layer,HUB based networks are on one collision domain where as in Switch
based network switch divides networks into multiple collision domains.Switch
also maintains MAC address tables.

A Simple Similie

2
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
Hub - Think of a postman with a letter to deliver in a row of houses, none of
the houses have numbers so he has to visit each house and ask the owner if the
letter is for them.

Switch - All the houses are numbered, so the postman knows where to go, and
doesn't have to bother any other home owners.
2. What is deference between Switch and repeater
3. MAC is stand for what
Answer:
A Mac address is short for media access control address. It is used to identify
a computer on a network
4. Explain the range of private IP addresses
Answer:
Private IP address ranges

The ranges and the amount of usable IP's are as follows:

10.0.0.0 - 10.255.255.255
Addresses: 16,777,216

172.16.0.0 - 172.31.255.255
Addresses: 1,048,576

192.168.0.0 - 192.168.255.255
Addresses: 65,536

5. What is NIRA
Answer:
NIRA
National Internet Registry of Afghanistan (NIRA) is not-for-profit,
Government organization responsible for providing the service of allocating
and registering Internet resources in Afghanistan.
6. What is network
A network consists of two or more computers that are linked in order to share
resources (such as printers and CDs), exchange files, or allow electronic
communications. The computers on a network may be linked through cables,
telephone lines, radio waves, satellites, or infrared light beams
7. Why we use the computer network
File sharing
E-mail
E-business
E-Learning
Printer Sharing
Centralized Administration & Support
Remote Access
8. Network is divided in to how many parts
In public network divided in 2 Parts
-geographical area
-Network component
9. What is bandwidth

3
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
Bandwidth is the amount of space that is used to transfer data and information through the Internet.
Bandwidth may also refer to the amount of space a person has for their own website and data
10. What is through put
The quantity or amount of raw material processed within a given time, esp. the work done by an
electronic computer in a given period of time
11. Where do we use the router
A router is specialized computer connected to more than one network. A router runs
software that allows the device to move data from one network to another. Routers operate
at the network layer (OSI Model's layer 3).

Why do I need a Router?

Routers used in networks perform the following functions:

1. Restrict network broadcasts to the LAN


2. Act as the default gateway.
3. Move data between networks

12. What is APNIC


Short for the Asia Pacific Network Information Centre, one of four non-profit
organizations that register and administer IP addresses

13. What is connecting devices and explain one by one


Connecting devices is used for connection in Network.
14. Explain the internetworking devices
Internetworking devices is used for connection two or more network in Internet .
15. What is deference between FAT32 and NTFS
FAT32 is File allocation table it is old file system type NTFS is stand for New
Technology File system
16. What is TCP
TCP is Transition control protocol it is communication oriented protocol it is used
for transition data.
17. How many parts have IP address and explain one by one by description
IP Address has two parts
-Network ID not changeable
-Host ID is changeable (0-255)
18. How many ports have a router
Router Have 3 Interfaces
-LAN Interface is used for LAN connection
-WAN Interface is use WAN connection
-Management Interface is used for router administration
19. How many modes have a router
Router has in public 4 modes
-User Mode
-Privileged Mode
-global Configuration Mode
-Interface Mode
20. Explain every mode of router
User mode accessing information
Privileged mode is using for changes
Global configuration mode is using for public changes
Interface mode is using for Interface configuratio

4
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
21. What is a Network
Answer before
22. Why use a Computer Network
Answer before
23. Categories of LAN Network
There are 2 categories of network
Peer to Peer Network
Client Server Network

24. Local area Network


Local Area Network is a computer network that interconnects computers in a
limited area such as a home, school, computer, laboratory or office building

25. Wide area Network


Wide Area Network is a large network covering cities, countries, and continents, A
WAN is also called an Internetwork, and made up of many networks

26. Metropolitan area Network


MAN short for Metropolitan area network is one of number of types of networks ,a
data network designed for a town or city .MANs are larger than LAN Networks

IP address
Class Rang Default subnet mask Network(N) and host(H) parts
Class A 1--- 126 255.0.0.0 N.H.H.H
Class B 128--- 191 255.255.0.0 N.N.H.H
Class c 192---223 255.255.255.255.0 N.N.N.H
Class D 224---239 Reserved for multicast
Class E 140---255 Reserved for experimental ,used for research
IP Address
.‫ بوجود آمد‬ISO ‫ آدرس توسط‬IP ‫ ها‬Computer ‫برای اولین باربرای شناختن‬
IP address (IPV4)
‫ دارای‬IP Address ‫ میباشد که هر‬32bit ‫ دارای‬IP Address ‫ میباشد که هر‬IP‫ عبارت از‬IPV4
.‫ میباشد‬8bit ‫ ما دارای‬octet ‫ که هر‬4octed
IPV4 = 32bi t= 4 octet
1octed = 8bit
IP Address are divided in two parts
.‫ قابل تغییر نمیباشد‬IP‫ این بخش از‬is no changeable :Network ID )1
. (0—255)‫ قابل تغییر میباشد‬IP ‫ این بخش‬is changeable :Host ID )2
‫ استفاده میگردد‬NIC ‫ مشاهیده نمیشود دراین صورت آن برای چک نمودن‬127 Class A ‫در‬
‫ های‬SIGNAL ‫ عبارت از وسیله میباشد که‬NIC .‫ درکمبیوتر درست است ویا نه‬NIC ‫که آیا‬
.‫ یاد میگردد‬loopback ‫ تبدیل میکند که بنام‬Digital ‫ را به‬Analog‫ و‬Analog ‫ به‬Digital
.‫ رفته دستور ذیل را نوشته نماید‬run ‫در‬

5
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
‫‪Run>cmd>nslookup‬‬
‫اگر‪ 127‬را نشان داد دراین صورت ‪ NIC‬ما مشکل ندارد درصورت خراب بودن شبکه‬
‫مشکل در جاهای دیگری میباشد مانند کیبل و یا دیگر وسایل شبکه میباشد‪.‬‬
‫‪ Class‬های ‪ C,B,A‬درشبکه های ‪ internet‬فعلی در جهان مورد استفاده قرار میگیرد و‬
‫‪ class‬های ‪ E,D‬برای تحقیقات و‪ research‬مورد استفاده قرار میگیرد‪.‬‬

‫‪Kinds of IP addresses‬‬
‫‪ :Private IP addresses‬عبارت از آدرس های میباشد که تکرار میگردد ودرشبکه های محلی مورد‬
‫استفاده قرارمیگیرد وضرورت به راجستر نمودن نمیباشد‪.‬‬
‫‪ :Public IP addresses‬عبارت از آدرس های میباشد که تکرار نمیگردد وهمچنان باید این نوع‬
‫آدرس ها باید راجستر شود درغیر آن کارنمیکند‪.‬‬
‫‪ Public‬آدرس ها را کی راجستر میکند؟‬
‫برای باراول اگر کدام کمپنی بیخواهد ‪ internet‬بیگیرد اول میرود به ‪ ISP‬که یکی از ارایه کنندگان‬
‫‪ internet‬میباشد بعد آن به ‪ NIRA‬که اداره ملی راجستر نمودن ‪ internet‬درکشورما افغانستان‬
‫میباشد وآن میرود به ‪ APNIC‬که عبارت ازاداره کنترول نمودن ‪ internet‬درسطح آسیا میباشد وبعد‬
‫ازآن میرود به ‪ ICAN‬که اداره کنترول نمودن ‪ internet‬در تمام جهان میباشد بعد از این همه این‬
‫مراحل به آن ‪ internet‬ارایه میگردد یعنی یک ‪ IP address‬میدهد‪.‬‬
‫‪ISP‬‬ ‫‪=> Internet Service Provider.‬‬
‫‪NIRA =>National Internet Registry of Afghanistan.‬‬
‫‪APNIC => Asia Pacific Network Information Center.‬‬
‫‪ICANN => Internet Corporation for Assigned Names and Numbers.‬‬
‫معلوم نمودن‪ IP‬که آیا ‪private‬میباشد ویا ‪public‬‬
‫اگراعداد ذیل درآغاز یک ‪ IP‬بود بدانید که آن ‪ Private‬میباشد درآن صورت به هیچ صورت ‪public‬‬
‫شده نمیتواند‪.‬‬
‫‪Class A 10.0.0.0‬‬ ‫‪TO 10.255.255.255‬‬
‫‪Class B 172.16.0.0‬‬ ‫‪TO‬‬ ‫‪172.31.255.255‬‬
‫‪Class C 192.168.0.0 TO‬‬ ‫‪192.168.255.255‬‬
‫توسط این ویب سایت میتوانیم بیدانیم که آیا ‪ Private‬میباشد ویا ‪:public‬‬
‫‪www.whatismyipaddress.com‬‬
‫?‪What is subnet mask‬‬
‫‪ Subnet mask‬فیصله میکند که کدام بخش از‪ IP‬آدرس مربوط به ‪ network‬و کدام بخش آن مربوط‬
‫به ‪ host‬میگردد‪.‬‬

‫‪6‬‬
‫‪Prepared by: Ahmad Farzad Mawlayee‬‬
‫‪Ghazni University Computer Science Department‬‬
‫‪Class A 255.0.0.0‬‬ ‫‪N.H.H.H‬‬
‫‪Class B 255.255.0.0‬‬ ‫‪N.N.H.H‬‬
‫‪Class C 255.255.255.0‬‬ ‫‪N.N.N.H‬‬
‫‪Subneting‬‬
‫چرا ما به ‪ subneting‬میرویم چی ضرورت است ما و شما ‪ subneting‬را انجام دهیم وهمین ‪IP‬‬
‫آدرس ها را چرا ‪ subnet‬میکنیم و خود ‪ subnet‬چی میباشد اصال ‪ subnet‬و ‪ subneting‬یک‬
‫پروسه میباشد که توسط آن پروسه ‪ IP‬آدرس ها به بخش ها تقسیم بندی میکنیم وتوسط آن میتوانیم ‪IP‬‬
‫های که دریک شبکه مزاهمت میکند و ازدهام ترافیک به وجود میاورد ‪ Broadcast‬به وجود میاورد‬
‫میخواهیم آن آدرسها را ازلیست بیرون میکشیم توسط ‪ subneting‬این کار راانجام میدهیم‪.‬‬

‫چی ضرورت است که ‪ subneting‬به وجود میآوریم بخاطراین به وجود میآوریم که اگرما وشما این‬
‫رابیخواهیم دریک دفتر دوهزار مامورین داریم میخواهیم برای دوهزار‪ client‬باید ‪ internet‬توزیع‬
‫کنیم در آن صورت ضرورت به ‪ subneting‬داریم و یک یک پروسه تقسیم بندی ‪ IP‬آدرس ها میباشد‬
‫که ‪ IP‬را به بخش های مختلف تقسیم بندی میکنیم بخاطریکه زیاد ‪ USER‬را ‪ support‬کند‬
‫ودیگر‪IP‬آدرس های مزاهم را ازلیست بیرون کنیم پس مت ضرورت به ‪ Subneting‬داریم یا این همه‬
‫کار های را انجام دهیم و این یکی از مسایل مهم واساسی وظایف مدیران ‪ IT‬میباشد‪.‬‬
‫طریقه دانستن اینکه دریک ‪ class‬چند ‪ user‬را ‪ support‬کرده میتوانیم که با استفاده ازفورمول ذیل‬
‫میتوان دریافت‪.‬‬
‫?= ‪2h- 2‬‬
‫‪Class A‬‬ ‫‪0 -- 126‬‬ ‫‪224- 2 =16777214 user‬‬
‫‪Class B 128 -- 191‬‬ ‫‪216- 2 =65534 user‬‬
‫‪Class C 192-- 223‬‬ ‫‪28-2 =254 user‬‬
‫قبل از‪ Subneting‬باید تبدیل نمودن ‪ binary‬را به ‪ decimal‬را یادداشته باشیم باید بیداند ‪binary‬‬
‫و‪decimal‬چی میباشد‪.‬‬

‫‪7‬‬
‫‪Prepared by: Ahmad Farzad Mawlayee‬‬
‫‪Ghazni University Computer Science Department‬‬
‫مثال‪1.1.1.1 :۱‬‬
‫‪128‬‬ ‫‪64‬‬ ‫‪32‬‬ ‫‪16‬‬ ‫‪8‬‬ ‫‪4‬‬ ‫‪2‬‬ ‫‪1‬‬
‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪1‬‬
‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪1‬‬
‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪1‬‬
‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪1‬‬

‫‪1.1.1.1 = 00000001.00000001.00000001.00000001‬‬
‫مثال‪192.168.1.1 :۲‬‬
‫‪128‬‬ ‫‪64‬‬ ‫‪32‬‬ ‫‪16‬‬ ‫‪8‬‬ ‫‪4‬‬ ‫‪2‬‬ ‫‪1‬‬
‫‪1‬‬ ‫‪1‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬
‫‪1‬‬ ‫‪0‬‬ ‫‪1‬‬ ‫‪0‬‬ ‫‪1‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬
‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪1‬‬
‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪1‬‬

‫‪191.168.1.1 = 11000000.10101000.00000001.00000001‬‬
‫هر ‪ IP‬که اخیر آن صفر باشدآن عبارت از ‪ IP‬مربوط به ‪ network‬میباشد‪ .‬اولین بخش یک ‪ IP‬بنام‬
‫‪ Network id‬بخش اخیر آن را بنام ‪ broadcast id‬وبخش بین ‪ network id‬و‪ broadcast id‬را‬
‫بنام ‪ host id‬یادمیگردد‪.‬بخش ‪ network‬و ‪ broadcast‬قابل استفاده نمیباشد اما بخش ‪ host‬قابل‬
‫استفاده میباشد‪.‬درهر ‪ class‬تا اندازه های ذیل ‪ bit‬قرض میتوانیم‪:‬‬
‫‪Class A 10.0.0.0/24 – 2 = 22‬‬
‫‪Class B 172.16.0.0/16 – 2 = 14‬‬
‫‪Class C 192.168.0.0/8 – 2 = 6‬‬
‫‪IP Address subneting‬‬
‫‪172.16.0.0‬‬ ‫‪= IP address class B‬‬ ‫مثال‪:۱‬‬
‫‪255.255.0.0‬‬ ‫‪= Default subnet mask‬‬
‫میخواهیم به ‪ network 100‬تقسیم نمایم یعنی ضرورت به ‪ 100‬داریم‪.‬پس ‪ 2‬را بتوانی باالبرده که‬
‫ازهمان عدد یعنی ‪ 100‬کم نشود ازآن بزرگتر باشد وزیاد نزدیک به همان عدد باشد‪27 – 2 = 126 .‬‬
‫پس به همان اندازه یا همان توان گرفته شده ‪ bit‬های ‪ off‬را ‪ on‬میکنیم‪.‬‬
‫‪172.16.0.0‬‬
‫‪255.255.0.0‬‬
‫‪255.255.11111110.00000000‬‬
‫‪255.255.254.0 custom subnet mask‬‬

‫‪8‬‬
‫‪Prepared by: Ahmad Farzad Mawlayee‬‬
‫‪Ghazni University Computer Science Department‬‬
‫تعداد ‪ host‬های خود را ازاین طریق پیداکرده میتوانیم یعنی به هر تعداد که صفر است به همان تعداد‬
‫‪ 2‬را بتوان باال برده‪.‬‬

‫‪29 – 2 = 510 user‬‬


‫‪172.16.0.0 = = > network‬‬
‫‪172.16.0.255‬‬
‫‪.‬‬
‫‪.‬‬ ‫‪Hosts‬‬
‫‪.‬‬
‫‪172.16.1.0‬‬
‫‪172.16.1.255 = = > broadcast‬‬
‫مثال‪:۲‬‬
‫‪165.100.0.0 IP‬‬ ‫‪Address class B‬‬
‫‪255.255.0.0‬‬ ‫‪Default subnet mask‬‬
‫میخواهیم به ‪ network 1000‬تقسیم نمایم یعنی ضرورت به ‪ 1000‬داریم‪.‬پس ‪ 2‬را بتوانی باالبرده که‬
‫ازهمان عدد یعنی ‪ 1000‬کم نشود ازآن بزرگتر باشد وزیاد نزدیک به همان عدد باشد‪210 – 2 = .‬‬
‫‪ 1022‬پس به همان اندازه یا همان توان گرفته شده ‪ bit‬های ‪ off‬را ‪ on‬میکنیم‪.‬‬

‫‪255.255.0.0‬‬
‫‪255.255.11111111.11000000‬‬
‫‪255.255.255.192‬‬ ‫‪custom subnet mask‬‬

‫‪26 – 2 = 62 user‬‬
‫‪165.100.0.0 = = > network‬‬
‫‪165.100.0.1‬‬
‫‪.‬‬
‫‪Hosts‬‬
‫‪.‬‬
‫‪165.100.0.62‬‬
‫‪165.100.0.63 = = > broadcast‬‬

‫‪9‬‬
‫‪Prepared by: Ahmad Farzad Mawlayee‬‬
‫‪Ghazni University Computer Science Department‬‬
‫‪165.100.0.65 = = > network‬‬
‫‪165.100.0.66‬‬
‫‪.‬‬
‫‪Hosts‬‬
‫‪.‬‬
‫‪165.100.0.128‬‬
‫‪165.100.0.129 = = > broadcast‬‬

‫‪Switch configuration‬‬
‫‪ Switch‬یکی ازوسایل میباشد که برای وصل نمودن چندین کمپیوتر استفاده میگردد ‪ switch‬دارای ‪ port‬های مختلف‬
‫میباشد که از‪ 96, 48, 16, 8, 4‬میباشد‪.‬‬
‫‪ Switch‬های ‪ cisco‬یا ‪ device‬های ‪ cisco‬ازیک آدرس استفاده میکند که بنام )‪MAC (media access control‬‬
‫یاد میگردد همه ‪ mac‬آدرس های ‪ switch‬در‪ COM table‬ثبت وذخیره میگردد‪.‬‬
‫وقتیکه یک کس یک کمپیوتررا ‪ communication‬مینماید با یک کمپیوتر دیگر در آن صورت معلومات میرود به‬
‫‪ switch‬بعد میرود به ‪ COM table‬وزمانیکه یک کمپیوتر ‪ communication‬میکند به کمپیوتر ضرورت به ‪COM‬‬
‫‪ table‬دارد ومکمل ‪ MAC‬آدرس ها ثبت و ذخیره میباشد در‪. COM table‬‬

‫‪ Switch‬های ‪ cisco‬عموما به سه بخش تقسیم میگردد‪:‬‬


‫‪Access layer device .1‬‬
‫‪Distribution layer device .2‬‬
‫‪Core layer device .3‬‬
‫‪ :Access layer device‬عبارت از ‪ device‬های میباشد که معموال برای ادارات کوچک مورد استفاده قرار میگیرد‪.‬‬
‫‪ :Distribution layer device‬معموال توسط ‪ ISP‬های مخابراتی مورد استفاده قرار میگیرد‪.‬‬
‫‪ :Core layer device‬توسط ‪ ISP‬های جهانی مورد استفاده قرار میگیرد‪.‬‬
‫در‪ Switch‬های ‪ cisco‬امکانات وجود دارد که بعضی از‪ port‬های آن سرعت انتقال آن از‪ 1000,100,10‬میگابات‬
‫برثابیه میرسد ودر‪ witch‬های ‪ cisco‬دو ‪ port‬وجود دارد که قابلیت انتقال ‪ 1000‬میگابات را دریک ثانیه دارد و‪port‬‬
‫های ‪ cisco‬امکانات ‪ full-duplex‬و ‪ half-duplex‬را دارد و شما میتوانید طوری ‪ configuration‬نماید که به‬
‫طور‪ full-duplex‬و ‪ half-duplex‬کار کند‪.‬‬
‫‪ Switch‬ها را زمانیکه پیکربندی یا ‪ configuration‬میکنیم ما ضرورت به ‪ security‬داریم که کدام ‪ port‬ها ‪secure‬‬
‫باشد و کدام های آن ‪ secure‬نباشد‪.‬زمانیکه به ‪ switch‬برق میدهیم ‪ configuration‬میکنیم درآن مرحله بنام ‪POST‬‬
‫)‪ (power- on- self-test‬یادمیگردد این مرحلی میباشد که مکمل ‪ component‬ها ‪ test‬میگردد که کدام ‪ device‬ها‬
‫کارمیکند و کدام ‪ device‬ها درآن ‪ switch‬کار نمیکند‪.‬‬
‫بخاطر ‪ configuration‬یک ‪ switch‬ما ضرورت به یک کیبل ‪ rollover‬داریم توسط آن ‪ pc‬را ازطریق ‪port‬‬
‫‪ console‬که در‪ switch‬میباشد آن را به ‪ switch‬وصل میکنیم‪.‬زمانیکه ‪ configuration‬دریک ‪ switch‬میکنیم‬
‫ضرورت به مطالعه نمودن ‪ documentation‬قبلی داریم یعنی در‪ documentation‬قبلی کدام چیزها درآن‬
‫‪ available‬میباشد درآن ‪ step‬های ‪ configuration‬و ‪ guide‬وجود دارد ما ازآن ‪ guide‬ها مربوط استفاده میکنیم‪.‬‬

‫‪10‬‬
‫‪Prepared by: Ahmad Farzad Mawlayee‬‬
‫‪Ghazni University Computer Science Department‬‬
:‫ وپیکربندی نمود‬configuration ‫ را‬switch ‫ازطریقه های ذیل میتوانیم‬

 Cisco ISO command line interface (CLI)


 Cisco network assistant
 Cisco device manager
 Cisco view management software
 SNMP network management products

Configuration of switch
‫ را‬switch ‫ تا‬pc ‫ به‬port console ‫ توسط‬switch ‫ میباشد برای وصل نمودن‬rollover ‫باراول ضرورت به کیبل‬
.‫ نمایم‬configuration

Interface of switch:

 LAN interface
 Management interface
 Console interface
 AXL interface
‫ کارمیکند امکان دارد مثل‬layer3‫ های که در‬switch ‫کارمیکند‬layer3 ‫ و هم در‬layer2‫های داریم هم در‬Switch
‫ کارمیکند و همچنان درشبکه محلی‬switch ‫ استفاده میکند مثل یک‬layer2 ‫ های که از‬switch‫ کارکند و‬router ‫یک‬
.‫کار میکند‬
‫ به این معنا که‬console.‫ یادمیگردد‬AXL ‫ و‬console ‫ استفاده میگردد بنام‬configuration ‫ های که برای‬Interface
‫ را‬switch ‫ که میتواند از راه دور یک‬AXL‫ کرد و‬configuration ‫ رامیتواند از راه نزدیک‬switch
.‫ نمایم‬configuration
.‫ یادمیگردد‬network layer ‫ رابنام‬layer 3 ‫ یادمیکند و‬data link layer ‫ را بنام‬Layer 2

‫ ها داریم‬mode ‫ ضرورت به‬switch ‫ نمودن‬configuration ‫برای‬

Switch mode
 User interface mode
 Privileged mode
 Global configuration mode
 Interface mode
‫ ها را مشاهیده مینمایم ونمیتوانیم توسط‬configuration ‫ میتوانیم‬mode ‫ توسط این‬:User interface mode
.‫آن تغییرات بیاوریم‬
.‫ بیاوریم‬switch ‫ یک‬configuration‫ میتوانیم تغییرات در‬mode ‫ توسط این‬:Privileged mode
‫ یک‬configuration‫ میتوانیم تغییرات عمومی در‬mode ‫ توسط این‬:Global configuration mode
.‫ بیاوریم‬switch
login ‫ دست رسی پیدامیکنیم یا‬device ‫ های‬interface ‫ میتوانیم به‬mode ‫ توسط این‬:Interface mode
.‫میشویم‬

11
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
:‫ دارای یک عالمه میباشد‬mode ‫هر‬

Mode symbol
User mode Switch>
Privileged mode Switch#
Global configuration mode Switch(config)#
Interface mode Switch(config-if)#

:‫ دیگر‬mode ‫ به یک‬mode ‫رفتن از یک‬


Switch> enable
Switch# configure terminal
Switch (config) #interface number
Switch(config-if)#exit
.‫ رفته‬user interface ‫ نموده که مستقیم به‬enter ‫ رفته یک‬CLI ‫ در صفحه‬switch‫در‬

Mode Explanation
Switch>enable privileged ‫رفتن به‬
Switch# configure terminal global ‫رفتن به‬
Switch(config)# interface fast Ethernet 0/1 port ‫تعین نمودن نمبر‬
Switch(config-if)#exit ‫خارج شدن‬
Switch(config)#exit ‫خارج شدن‬
Switch# exit ‫خارج شدن‬
Security switch
. security ‫ داریم برای‬procedure ‫ما سه نوع‬
1. Console password
2. telnet password
3. enable password
‫ آنرا‬console ‫ را ازطریق کیبل‬switch ‫ میباشدکه چطورمیتوانیم یک‬password‫ عبارت از‬:Console
.‫ ما درامن باشد‬switch ‫ بدهیم تا‬password
‫ را‬password ‫ برای وی بیگوید که‬switch ‫ اگر کسی از راه دور درشبکه بیخواهد داخل شود و‬:Telnets
.‫وارید کنید‬
‫ بیرود‬privileged mode ‫ به‬user mode ‫ میباشد اگر کسی بیخواهد از‬password ‫ عبارت از‬:Enable
.‫ بیخواهد‬password ‫از آن‬
Console password:
Switch>enable
Switch# configure terminal
Switch (config) #line console 0
Switch (config-line) #password123
Switch (config-line) #login
Switch (config-if) #exit
Switch (config) #exit
Switch# exit
.‫ ازصفر شروع میباشد‬port console ‫بخاطری صفر نوشته کردیم که‬

12
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
Telnets password:
Switch>enable
Switch# configure terminal
Switch (config) #line vty 0 4
.‫ شود‬switch ‫ وارید‬remote ‫ میتواند ازساحات‬4 user ‫ به این معنا که‬4 ‫دراینجا‬
Switch (config-line) #password1234
Switch (config-line) #login
Switch (config-if) #exit
Switch (config) #exit
Switch# exit
‫ درآن عالمه سوالیه (؟) را‬4 ‫ شود به جای‬login ‫ میتواند‬switch ‫اگربیخواهید که بیدانید که چند نفردراین‬
.‫شود‬login ‫ نفر میتواند‬15‫ به تعداد‬cisco ‫ های‬switch‫نوشته نماید که عموما در‬

Enables password:
Switch>enable
Switch# configure terminal
Switch (config) #enable password 12345
Switch (config-if) #exit
Switch (config) #exit
Switch# exit
switch# copy running-config start- ‫داریم بنام‬command ‫ ما یک‬switch ‫ یک‬configuration ‫برای ثبت نمودن‬
. config

‫ که‬command ‫ استفاده نموده یک بارحروف اول همان‬switch help‫ را نوشته کنیم از‬command ‫اگربیخواهیم یک‬
‫ دیگر را یاد ندارید عالمه‬command ‫ را یاد دارید‬command ‫ را فشارداده واگریک‬tab ‫بیخواهیم نوشته نمود بعد‬
‫ را که ضرورت دارید نوشته کرده وبعد ازآن عملیه را خودش‬command ‫سوالیه دراخیر آن نوشته لیست میدهد همان‬
‫( میباشد‬wr) ‫ که عبارت از‬configuration ‫ دیگر برای ذخیره نمودن‬command ‫ وهم میتواند ازیک‬.‫انجام میدهد‬
.‫اسفاده کرد‬
Switch# wr

:Switch ‫ به یک‬IP ‫دادن‬


Switch (config) # interface vlan 1
Switch (config-if) # ip address 192.168.1.1 255.255.255.0
‫ مورد استفاده قرار میگیرد اگرما‬security ‫ وجودارد برای‬switch‫ منطقی میباشد که در‬virtual ‫ یک شبکه‬Vlan1
.‫ داریم‬virtual local area network ‫وشما بیخواهیم یک شبکه را به بخش های مختلف تقسیم نمایم ما ضرورت به‬
‫ مدیریتی‬vlan ‫ یادمیگردد یا‬administrative vlan ‫ میگردد که بنام‬vlan1 ‫ مربوط به‬switch ‫ های‬port ‫مکمل‬
.‫یادمیگردد‬
.no shutdown ‫ داریم بنام‬command ‫ ما‬switch ‫ ها‬port ‫ نمودن‬on ‫برای‬
Switch(config-if)#no shutdown
.‫ میدهیم‬IP ‫ هم‬pc ‫بعد به‬
IP 192.168.1.2
Subnet 255.255.255.0

13
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
‫بعد در‪ CMD‬رفته نوشته میکنید برای وارید شدن به ‪ switch‬توسط ‪. telnet‬‬
‫‪Telnet 192.168.1.1‬‬

‫?‪What is VLAN‬‬
‫‪ Virtual local area network‬به این معنا ومفهوم که دربین یک شبکه چندین شبکه دیگر را به وجود میاوریم‪.‬‬
‫بصورمثال اگر بیخواهیم دریک دفتر یک شبکه را به دیپارتمنت هاای دیگار تقسایم نماایم درآن صاورت از‪ vlan‬اساتفاده‬
‫میکنیم ویا اگر بیخواهیم ساحه ‪ broadcast‬راکم بیسازیم ازاین دستور استفاده میکنیم‪ .‬دریک شبکه بعضی اوقاات ‪late‬‬
‫‪ and see‬زیاد به وجود میآید وقفاه هاا بسایار باه وجاود میآیاد درآ ن صاورت ضارورت باه ‪ vlan‬داریام‪ .‬اگار‪ vlan‬نباشاد‬
‫شاابکه بااا مشااکل یااا ‪ problem‬روبااررو میگااردد خااوبی آن درایاان میباشااد کااه آن باارای ‪ security‬یااا امنیاات شاابکه مااورد‬
‫استفاده قرارمیگرد که درشبکه های ‪ internet‬کی بتواند دست رسی داشته باشد و کی دست رسی نداشته باشد‪.‬‬
‫‪ Vlan‬هااا ن اار بااه ور ن هااای مختلااف تعااداد ‪ vlan‬هااا راتشااکیل میدهااد بطورمثااال ‪ switch1900‬میتوانااد ‪64 vlan‬‬
‫راتشکیل دهد و همچنان ور ن ‪ 2950‬و‪ 2960‬میتواند ‪ 8000 vlan‬را به وجود میآورد مکمل پورت های یک ‪switch‬‬
‫مرباوط ‪ vlan1‬میگاردد و هماین ‪ vlan1‬بناام ‪ administrative vlan‬یاا ‪ vlan‬مادیریتی یاادمیگردد ‪administrative‬‬
‫‪ vlan‬حذف یا ‪ delete‬نمیگردد ‪ change‬نمیگردد وهمچنان نامش تغییر نمیکند‪.‬‬
‫‪VLAN characteristics:‬‬
‫‪1. switch forward frames between devices in the same VLAN‬‬
‫‪2. They cannot forward frames between different VLANs‬‬
‫‪3. Routers can be used to essentially route packets between VLANs‬‬
‫‪Benefits of VLAN:‬‬
‫‪Broadcast control‬‬
‫‪Security‬‬
‫‪Performance‬‬
‫‪Network management‬‬
‫‪Types of VLANs:‬‬
‫‪1. Static VLAN‬‬
‫‪2. Dynamic VLAN‬‬
‫‪ :Static vlan‬عبارت از‪ vlan‬میباشد که توسط مدیران ‪ IT‬این ‪ configuration‬میشود توسط مدیران ‪ IT‬ایارسازی‬
‫‪ configuration‬صورت میگیرد معلومات به ‪ switch‬میدهد‪.‬‬
‫‪ :Dynamic vlan‬این توسط مدیران ‪ IT‬صورت نمیگیرد به شکل اتومانیک ‪ configuration‬توسط ‪ protocol‬ها‬
‫صورت میگیرد‪.‬‬
‫مثال‪ :۱‬میخواهم دریک دفتر یک ‪ switch‬را به بخش های مختلف تقسیم نمایم‪.‬‬
‫‪Switch>enable‬‬
‫‪Switch# vlan database‬‬
‫‪Switch (vlan)# vlan 2 name ICT‬‬
‫‪Switch (vlan)# vlan 3 name FIN‬‬
‫‪Switch(vlan)#exit‬‬

‫‪14‬‬
‫‪Prepared by: Ahmad Farzad Mawlayee‬‬
‫‪Ghazni University Computer Science Department‬‬
vlan ‫ ها را معرفی میکنیم برای هر‬port ‫حال‬
Switch# config terminal
Switch (config) #interface fast Ethernet 0/3
Switch (config-if) #switch port access vlan 2
Switch (config-if) #exit
Switch (config-if) # interface fast Ethernet 0/4
Switch (config-if) #switch port access vlan 2
Switch (config-if) # exit
Switch (config) #exit
Switch# wr
Switch# config terminal
Switch(config)# interface fastEthernet 0/2
Switch(config-if)# switchport access vlan 3
Switch(config-if)#exit
Switch(config)#exit
Switch# wr
‫ اضافه نمایم دراین صورت آن ها با همه کمپیوترها یعنی با تمام‬switch‫اگربیخواهیم که یک دوکمپیوتر رادر‬
.‫ میگردد‬vlan 1 ‫دیمارتمنت ها گفتگومیکند چرا که همه آنها مربوط‬
.‫ اضافه میکنیم‬ICT ‫ را در دیپارتمنت‬6 ‫حاالمیخواهیم کمپیوتر‬
Switch# config terminal
Switch (config)# interface fast Ethernet 0/6
Switch (config-if)#switch port access vlan 2
Switch (config-if)# exit
Switch (config-if)# exit
Switch# wr
‫ در همان جاکه وی میباشد مربوط دفترمالی میباشد چی‬switch0 ‫اگریک نفردریک منزل دیگرباشد بیخواهد که در‬
vlan2 ‫ آنرا معرفی میکنیم ومربوط‬port‫ جور میکنیم‬vlan ‫ میرود‬switch 1‫در‬.‫طورمیتواند این کاررا انجام دهد‬
‫ با‬vlan 2 ‫ میدهیم که آن بدون کمپیوتر های مربوط‬ip ‫کمپیوتر را‬.‫میسازیم تا که همرای دفتر مربوطه گفتگوکند‬
‫ یک‬switch1‫ ها گفتگو نمیکند پس اگر بیخواهیم مربوط دفتر مالی آن را بیسازیم اول باید در‬vlan ‫کمپیوتر های دیگر‬
.‫ بیسازیم‬vlan
Switch>enable
Switch# vlan database

15
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
Switch (vlan) # vlan 2 name ICT
Switch (vlan) # vlan 3 name FIN
Switch (vlan) #exit
Switch# config terminal
Switch (config) #interface fast Ethernet 0/2
Switch (config-if) #switch port access vlan 2
Switch (config –if) # exit
Switch (config) # exit
Switch# wr
‫ را‬vlan ‫ رامعرفی میکنیم اگربیخواهیم یک‬switch ‫بازهم اگردریک دیپارتمنت میباشد گفتگونمیکند درآن صورت‬
‫است‬procedure ‫ یک‬Trunk .‫ استفاده میکنیم‬vlan trunking ‫ های مختلف وصل نمایم درآن صورت از‬switch‫در‬
‫ میزند ترافیک را مهر میزند و همچنان آن رانشانی میکند وقتیکه از‬trunk ‫که زمینه این را مساعد میسازد ترافیک را‬
.‫ انجام میدهد‬trunk ‫یک شبکه به شبکه دیگر میرود این همه امکانات را‬
Type of trunk:
1. Access links
2. Trunk links
single vlan ‫ یعنی توسط‬single vlan ‫ ها را توسط‬device ‫ نیم‬connect ‫ توسط این میتوانیم‬:Access links
.‫ارتباطات را اجرا میکند‬
‫ ها میخواهد که معلومات انتقال بدهد بین انواع‬switch ‫ ها میباشد که این‬switch ‫ به این معناکه انواع‬:Trunk links
.‫ میگابات دریک ثانیه باشد‬1000,100 ‫ ها سرعت آن میشود‬vlan‫مختلف‬
‫ این همه امکانات را‬server ‫ و‬switch ‫ بین‬router‫ و‬switch ‫ بین‬switch‫ وصل میگردد بین دو‬Point to point
.‫ بوجود میآورد‬trunk vlan

VLAN trunk configuration


.‫ میروم دستور ذیل را مینوسیم‬switch ‫ درهر دو‬trunk ‫برای فعال نمودن‬
Swtich-1(config-if) # trunk on
Switch-1(config-if) # trunk?
‫ میکند‬support ‫ را‬command ‫ این‬switch 1900 ‫ نمیکند‬support‫ را‬command ‫ ها این‬switch ‫بعضی‬
‫ ودستورهای مختلف‬trunk mode access ‫ درآن ها‬2960,2950,3565 ‫ ها مانند‬switch ‫اما دربعضی‬
.‫دیگر کارمیکند‬
:Switch0
Switch# config terminal
Switch (config) #interface fast Ethernet 0/1
Switch (config-if) # switch port mode trunk

16
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
Switch (config-if) #exit
Switch (config) #exit
Switch# wr
:Switch1
Switch>enable
Switch# config terminal
Switch (config) # interface fast Ethernet 0/7
Switch (config-if) # switch port mode trunk
Switch (config-if) # exit
Switch (config) # exit
Switch# wr
.‫ میسازیم‬ICT‫ معرفی نمایم یعنی مربوط دیپارتمنت‬vlan2 ‫ را به‬switch1 ‫ مربوط‬pc ‫میخواهیم‬
Switch>enable
Switch# config terminal
Switch (config) # interface fast Ethernet 0/1
Switch (config-if) #switch port access vlan 2
Switch (config-if) #exit
Switch (config) #exit
Switch# wr
Switch# exit

17
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
First test:
Name

F/name

Class: CCNA

Time: 5-6 PM

1. What is a network and write types of network?

2. What are private and public IP addresses?

3. Write difference between switch and router?

4. What is difference between User mode and Privileged mode?

5. How configure console password for switch?

6. What is sub netting, and sub net the following IP address?

a. 172.16.16.0 need network = 30


b. 10.0.0.0 need network = 60
c. 192.168.0.0 need network = 20

7. What is protocol?

8. What is network topology and write types of network topology?

9. What is VLAN and write types of VLAN?

10. What is difference between Telnets and Console password?

18
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
‫‪Configuration of two VLAN‬‬
‫چیگونه ‪ VLAN‬ها مختلف بین خاود ‪ communication‬در یاک ‪ switch‬مینمایاد درآن صاورت ماا ضارورت باه یاک‬
‫‪ device‬داریم که مربوط به ‪ layer 3‬میباشد یعنی به ‪ layer 3‬کارمیکناد نقطاه یاا ‪ device‬مرباوط ‪ layer 3‬را کاه درآن‬
‫جااا نصااب میکناایم بنااام ‪ Router‬میباشااد ویااا ‪ Switch‬بنااام ‪ Internet exchange point‬یااادمیگردد کااه نقطااه تبادلااه‬
‫معلومات میباشد پس این یک پرو ک خوب برای اداره نمودن یک شبکه میباشد‪.‬‬
‫زمانیکه یک شخص یک معلومات را روان میکند به ‪ destination‬و زمانیکه به ‪ router‬میرسد ‪ router‬چیگونه میداند‬
‫که این معلومات به ‪ destination‬میرود این به اساس دو پروتوکل ‪ 802.1Q‬و‪ ICL‬صورت میگیرد‪.‬‬
‫قبل ازاینکه ما یک ‪ project‬را آغاز میکنیم باید ‪ documentation‬داشته باشیم بعد دیگرکارهای آن صورت گیرد‪.‬‬
‫‪Switch> enable‬‬
‫‪Switch# vlan database‬‬
‫‪Switch# vlan 10‬‬
‫‪Switch # vlan 30‬‬
‫‪Switch (vlan) #exit‬‬
‫‪Switch# exit‬‬
‫‪ Command‬ذیل به ما نشان میدهد که کدام ‪ vlan‬ها تشکیل شده است‪.‬‬
‫‪Switch# show vlan brief‬‬
‫ولی یاد باید بیگیریم که کدام ‪ port‬ها مربوط ‪ vlan‬ها نیست حاال همان ‪ port‬های که به کمپیوترهای مربوطه وصل‬
‫است آن ها را مربوط ‪ vlan‬های مربوطه آن میسازیم برای بار اول هر کمپیوتر را ‪IP‬هایشان را ‪ subnet‬هایشان را و‬
‫همچنان ‪ getway‬هریک از آن ها را تعین نمایم‪.‬‬

‫‪PC number‬‬ ‫‪IP‬‬ ‫‪Subnet mask‬‬ ‫‪getway‬‬


‫‪Pc1=>vlan10‬‬ ‫‪172.17.12.12‬‬ ‫‪255.255.255.2‬‬ ‫‪172.17.12.1‬‬
‫‪Pc2=>vlan10‬‬ ‫‪172.17.12.11‬‬ ‫‪255.255.255.2‬‬ ‫‪172.17.12.1‬‬
‫‪Pc3=>vlan30‬‬ ‫‪172.17..2.12‬‬ ‫‪255.255.255.2‬‬ ‫‪172.17..2.1‬‬
‫‪Pc4=>vlan30‬‬ ‫‪172.17..2.11‬‬ ‫‪255.255.255.2‬‬ ‫‪172.17..2.1‬‬
‫اگرچی ‪ ip‬ها مربوط به ‪ class B‬میباشد بخش سوم ‪ subnet mask‬که در اصل ‪ 255.255.2.2‬میباشد ازبخش‬
‫‪ network‬ما ‪ 8bit‬قرض نموده ایم که میشود ‪ 255.255.255.2‬که دراین بخش ‪ IP Broadcast‬و ‪ IP network‬از‬
‫بین برده ایم‪.‬‬
‫‪Pc1:‬‬
‫‪Switch# config terminal‬‬
‫‪Switch (config) #interface fastEthernet 0/1‬‬
‫‪Switch (config) # switchport mode access‬‬
‫‪Switch (config) # switchport access vlan 10‬‬
‫‪Switch (config) # exit‬‬
‫‪Switch (config) # exit‬‬
‫‪Switch# wr‬‬

‫‪19‬‬
‫‪Prepared by: Ahmad Farzad Mawlayee‬‬
‫‪Ghazni University Computer Science Department‬‬
Pc2:
Switch# config terminal
Switch (config) #interface fastEthernet 0/2
Switch (config) # switchport mode access
Switch (config) # switchport access vlan 10
Switch (config) # exit
Switch (config) # exit
Switch# wr
Pc3:
Switch# config terminal
Switch (config) #interface fastEthernet 0/3
Switch (config) # switchport mode access
Switch (config) # switchport access vlan 30
Switch (config) # exit
Switch (config) # exit
Switch# wr
Pc4:
Switch# config terminal
Switch (config) #interface fastEthernet 0/4
Switch (config) # switchport mode access
Switch (config) # switchport access vlan 30
Switch (config) # exit
Switch (config) # exit
Switch# wr
.‫ ها وصل است‬port ‫ با کدام‬vlan30‫ و‬vlan10 ‫ میتوانیم بیدانیم که‬command ‫توسط این‬
Switch# show vlan brief

‫ وصل مینمایم‬router ‫ را با‬switch ‫حاال‬


‫ چای‬Subinterface .‫ میباشاد‬getway ‫ میسازیم بخاطر میسازیم که هار شابکه دارای یاک‬subinterface ‫ ما‬router ‫به‬
‫ خریااداری‬interface ‫ نمیسااازیم درآن نقااص درایاان میباشااد از بااازار فزیکاای‬interface ‫خااوبی دارد چاارا مااا جاادا جاادا‬
‫ در‬communication ‫درصاورتیکه هماه‬.‫ باه وجاود بیاوریم‬subinterface ‫ میتاوانیم بینهایات‬interface ‫دریک‬.‫میکنیم‬

20
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
‫ میگابایت دریاک ثابیاه معلوماات دهاد شابکه هاای دیگار هام‬122 ‫یک شبکه به یک استندرد باشد اگر یک شبکه میخواهد‬
.‫ های جداگانه داریم‬interface ‫باید همین مقدارمعلومات را انتقال دهد درغیر آنصورت ضرورت به‬
‫ ایان طاور نمیباشاد‬switch‫ باشاد اماا در‬on ‫ میباشاد بایاد آن هاا را‬off ‫ هاا‬interface ‫ را وصال مینماایم‬router ‫زمانیکه‬
.‫میتواند به شکل اتومات وصل گردد‬
Continue with configuration dialog? [Yes/no]: no
Router> enable
Router# config terminal
Router (config) # interface fastEthernet 0/0.10
.‫ ها را تشکیل میدهیم‬subinterface ‫ داخل نمیگردد‬interface ‫ به این معنا که شما به کدام‬2/2
Router (config-subif) #encapsulation dot1q 10
Router (config-subif) # ip address 172.17.10.1 255.255.255.0
Router (config-subif) # no shutdown
Router (config-subif) # exit
Router (config) # exit
Router # wr
Router (config-subif) #encapsulation dot1q 30
Router (config-subif) # ip address 172.17.30.1 255.255.255.0
Router (config-subif) # no shutdown
Router (config-subif) # exit
Router (config) # exit
Router # wr
‫ شااد میتاوانیم بااه آن هااا‬on ‫ ننمااایم زمانیکاه‬on ‫ شااده نمیتااوانیم کاه آن هااا را‬login ‫ هااای عماومی‬interface ‫تاا وقتاای باه‬
. ‫ نمودن آن ها قرار ذیل میباشذ‬on ‫ شد و‬login
Router# config terminal
Router (config) # interface fastEthernet 0/0
Router (config-if) # no shutdown
Router (config) # exit
Router# wr

21
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
:‫ قرار ذیل میباشد‬switch‫ در‬trunk ‫حال عمل انجام دادن‬
Switch# config terminal
Switch (config) # interface fastEthernet 0/3
Switch (config-if) #switchport mode trunk
Switch (config-if) # exit
Switch (config) #exit
Switch# wr

22
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
Switch ports security
COM = Content Addressable Memory ‫ داریم بارای امنیات شابکه‬COM table ‫برای باراول ما ضرورت به‬
.‫ وصل میباشد در آن ثبت و ذخیره میباشد‬Switch ‫ آدرس ها که همرای‬MAC ‫یک حافط میباشد که مکمل‬
Content addressable memory:
One of the three main function of a switch is to learn which devices are associated which
interface.
This information is stored in a port address, or CAM table.
Three key items are stored in the MAC table of a switch:
 MAC address
 Port interface
 Static or Dynamic configuration
.‫ ثبت و ذخیره میباشد‬Switch ‫ آدرس دریک‬MAC ‫برای فهمیدن یا دانستن اینکه چیقدر‬
‫ آدرس ثباات وذخیااره میباشااد ازایاان دستوراسااتفاده‬MAC‫ شااما میتوانیااد بداینااد کااه چقاادر‬2052 ‫ و‬1022 ‫ هااای‬switch‫در‬
:‫میگردد‬
Switch# show mac-address-table
:switch 1900‫مثال در‬
Switch> enable
Switch# show man-address-table
Number of permanent addresses: 1
Number of restricted static address: 0

Address Dest interface type Source


0000.0c7A.1210 FastEthernet 0/26 Dynamic All
0000.0c7A.341A FastEthernet 0/26 Dynamic All
0000.0c7A.17AB FastEthernet 0/1 Dynamic All
0000.0c7A.E139 FastEthernet 0/2 Dynamic All
0000.0c7A.X359 FastEthernet 0/3 Dynamic All

1900 CAM table capacity:


The 1900 can store up to 1024 MAC address in the CAM table.
An important thing to remember when designing your switched network is the
number if devices that will be in the Layer 2 network.
 You want to ensure that the switches you purchase support a CAM size to
accommodate all of your devices.
1221 ‫ میباشاد کاه چیگوناه‬port 21 ‫ کاه دارای‬switch ‫ کمپیوتر را وصل میکند پس سوال دراین جا میبشاد‬1221 ‫یعنی‬
.‫ هاای زیاادی را اساتفاده میکنناد‬switch ‫ را تنهاا اساتفاده نمیکنناد بلکاه‬switch ‫کمپیوتر وصل میکنیم در یک شبکه یاک‬
.‫ دانه را دارد از آن حد زیاد گردد در آن صورت وقفه ها به وجود میآید‬1221 ‫اگر دریک شبکه گنجایش‬

23
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
Switch 2950 this switches can hold up to 8192 entries in their CAM table.
. clear mac-address ‫ از دستور ذیل استفاده میکنیم‬CAM table ‫ یا پاک نمودن‬clear ‫برای‬

Static MAC address


Besides having the switches learn MAC addresses dynamically you can create static
entries also.
You may want to do this for security reasons.
Example:
If a user moves their connection from one switch port to another, their traffic won’t be
forwarded correctly if you had statically configured their address to the old port.
1900(config) # mac-address-table permanent MAC address
2950(config) # mac-address-table static MAC-address vlan_# interface type module/port_#

Static ‫ به‬Dynamic ‫ از‬MAC ‫تبدیل نمودن‬


.‫ تبدیل نمایم‬Static ‫ میباشد میخواهیم به‬Dynamic ‫ ها‬MAC ‫این همه‬

Vlan MAC address Type Ports


1 0060.3ea9.9c88 Dynamic Fa 0/3
1 0090.0c14.825d Dynamic Fa 0/4
1 00d0.bcc6.a89c Dynamic Fa 0/2
1 00d0.ff18.17e3 Dynamic Fa 0/1

Switch> enable
Switch# config terminal
Switch (config) # mac-address static 0006.3ea9.9c88 vlan 1 interface fastEthernet 0/3
Switch (config) #exit
Switch# exit
Switch# show mac-address-table
:‫بعد از انجام عمل باال‬

Vlan MAC address Type Ports


1 0060.3ea9.9c88 Static Fa 0/3
1 0090.0c14.825d Dynamic Fa 0/4
1 00d0.bcc6.a89c Dynamic Fa 0/2
1 00d0.ff18.17e3 Dynamic Fa 0/1

.‫ تبدیل کرد‬Static ‫ به‬Dynamic ‫ آدرس های دیگر را از‬MAC ‫به همین ترتیب میتوان سه‬

24
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
Sticky
Procedure‫ یک کار بسیار مشکیل و خیلی مغلق میباشد پس از‬PC ‫ آدرس های هزاران‬MAC ‫برای معرفی نمودن‬
‫ وصل شد همان‬port‫ میباشد که هر کس بار اول آمد در‬process ‫ یاد میگردد که عبارت از‬sticky ‫استفاده میکنیم بنام‬
.‫ وی میگردد هر کسی که باشد به اشخاص دیگر اجازه نمیدهد‬port
Switch> enable
Switch# config terminal
Switch (config) # interface fastEthernet 0/1
Switch (config) # switchport mode access
Switch (config) # switchport port-security
Switch (config) # switchport port-security mac-address 1111.2222.3333
by ‫ تعین گردیده‬switch ‫ استفاده نماید که در‬port ‫توسط این دستورما میتوانیم تعین کنیم که چند نفر همزمان از یک‬
.‫ استفاده کند‬port ‫ نفر میتواند از یک‬121 ‫ میتواند‬default
Switchport (config-if) #switchport port-security max 12
.‫ نمایم از دستور ذیل استفاده میگردد‬protect ‫اگر بیخواهیم آنرا‬
Switchport (config-if) # switchport port-security violation protect

Switch
Switch> enable
Switch# config terminal
Switch (config) # sw
Switch (config) # interface fastEthernet 0/1
Switch (config-if) # sw
Switch (config-if) # switchport mode access
Switch (config-if) # switchport port-security
Switch (config-if) # switchport port-security mac-address sticky
Switch (config-if) # switchport port-security violation shutdown
Switch (config-if) # exit
Switch (config-if) # exit
Switch> enable
Switch# config terminal
Switch (config) # sw
Switch (config) # interface fastEthernet 0/2

25
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
Switch (config-if) # sw
Switch (config-if) # switchport mode access
Switch (config-if) # switchport port-security
Switch (config-if) # switchport port-security mac-address sticky
Switch (config-if) # switchport port-security violation shutdown
Switch (config-if) # exit
Switch (config-if) # exit
.‫ ها این دستوررا انجام میدهیم‬port ‫به همین ترتیب در همه‬
Switch # show port-security

Switch password Recovery


Steps of Password Recovery for Cisco 2960 Switch:
Step 1:
Power off the switch first, then press and hold the mode button while you power on the switch again.
Hold it for about 15 seconds until the SYS led is solid green, and then release it.
The switch should then give you this prompt:
switch:
Step 2:
To initialize the flash file system, run the command:
switch: flash_init
Initializing Flash...
flashfs[0]: 5 files, 1 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 32514048
flashfs[0]: Bytes used: 8059904
flashfs[0]: Bytes available: 24454144
flashfs[0]: flashfs fsck took 10 seconds.
...done Initializing Flash.
The switch will now print a bunch of messages about the flash memory, hopefully one of them will be
‘done initializing flash’ as above shown

Step 3:
You can now list the contents of your flash by running
switch: dir flash:
Directory of flash: /
2 -rwx 12300 <date> config.text
4 -rwx 1906 <date> private-config.text
5 -rwx 676 <date> vlan.dat
6 -rwx 8040418 <date> c2960-lanbasek9-mz.122-50.SE3.bin
7 -rwx 2072 <date> multiple-fs
There should be a file named ‘config.text’, as you can rename this file as follows:
switch: rename flash:config.text flash: oldconfig.backup
Step 4:
To further boot the switch run the boot command as:
switch: boot
This will start the boot you are used to. When the switch is booted up, you will realize that the
configuration is gone. But you are enabled on the switch now.
Step 5:

26
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
To recover the old configuration:
Switch# rename flash: oldconfig.backup flash:config.text
And now to replace the running configuration with the backup
Switch# copy flash: config.text running-config
Destination filename [running-config]?
Press enter, and you will have your old switch configuration back and you are enabled.
Just remember to change your password now

Switch# config terminal

Switch (config) # line console 0

Switch (config-line) # login

Switch (config-line) # password 1234

Switch (config-line) # exit

Switch (config) #exit

Switch# wr

VTP_VLAN Trunking Protocol


.‫ استفاده میگردد‬switch ‫ بوجود آمده است برای تبادله معلومات بین چندین‬cisco ‫ توسط کمپنی‬Vtp

Cisco switches use the proprietary VTP to exchange VLAN configuration information
between switches.
VTP only matters when multiple switches use multiple VLANs

Example:

.‫ تقسیم بندی گردد‬vlan ‫ را پیکره بندی نمایم و آنها را به پنج‬switch ‫ دانه‬12 ‫دراین مثال ما میخواهیم‬

 Network = 10 switches: switch 1……………………………………..switch 10


 Number of VLANs = 5VLALs: VLAN 2…………………………….6VLAN
 Requirement
 All ten switches must be configured to support VLAN 3
 Requirement
 Offer several solutions

Configuration without VTP:

You would have to enter the same config command on all ten switches to create VLAN 3.
Number of configurations = 10

Configuration with VTP:

You would create VLAN 3 on one switch, and the other nine switches would learn about
VLAN 3 dynamically.
Number of configurations = 1

With VTP:

Administrator create VLAN 3 on switch 1.


Switch 1 has the role of VTP server.
All other switches will have the role of VTP clients.
Result.

27
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
 The changes are distributed as a broadcast throughout the network every 5 minutes or
when there is a change.
 Both VTP clients and servers hear the VTP messages and update their configuration
based in those messages.

VTP Modes of Operation:

There are three different modes of operation within a VTP domain:

 Server
 Client
 Transparent

For VTP to exchange information, some switches act as servers, and some act as clients.

VTP Modes

VTP mode Description


Server By default, all switches are configured to be VTP servers
Changes will propagate to all other VTP clients.
Client Switches receives information from VTP servers only and they can’t make any
changes.

VTP modes

VTP mode Description


transparent In this mode the switch forwards advertisements received from other switches while
ignoring the information in the VTP message.
If you don’t want to use VTP in your network, you can put the switch in this mode.

Disabling VTP:

To disable VTP in your network.


 Place all switches in your network into VTP transparent mode.
A switch configured in VTP trans pared mode
 Can crate, delete, and modify VLANs
 But the changes are not transmitted to other switches in the domain
 They affect only that switch

VTP configuration

All switches are configured to be VTP servers by default.


To configure the VTP, first you have to configure the domain name you want to use.
After you configure the VTP information on a switch, you need to verify it.

When you create the VTP domain, you have a number of options, including:

Setting the domain name, password, operation mode, and pruning capabilities of the switch.
Use the VTP global configuration mode command to set all this information.

After you configure the VTP information, you can verify it with the show vtp command.

28
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
‫ ها‬switch ‫ بین‬password، domain ‫ داریم‬mode ‫ و‬password ، domain ‫ ما ضرورت به‬vtp ‫ نمودن‬configure ‫برای‬
:‫ ها باید نوشت‬switch ‫ درور ن های پائین‬.‫ مختلط نباشد درغیر آن کارنمیکند‬.‫باید مشابه باشد‬

Switch# vtp server

Switch# vtp client

:‫درور ن های جدید ازاین دستور استفاده میگردد‬

Switch# vtp mode server

Switch# vtp mode client

.‫ ودیگر چیزهای آن معلومات میدهد‬VLAN ‫این دستور برای مشاهده نمودن معلومات درمورد ور ن‬

Switch# show vtp status

.‫ های خود نام داد زیرا مشابهت ها بین آنها به وجود میاید‬switch ‫برای باراول باید به‬

Example:

We have sex switches we want one server and 5 clients.

Sever

Switch> enable

Switch# config terminal

Switch (config) # hostname A

A (config) # interface vlan 1

A (config-if) # ip address 1.1.1.1 255.0.0.0

A (config-if) # no shutdown

A(config-if) # exit

A (config) # exit

A # wr

A #config terminal

A (config) # vtp mode server

A (config) # vtp domain sunshine

A (config) # vtp password 123

A (config) # exit

A # wr

. ‫ ها را تشکیل میدهیم‬vlan ‫حال‬

Server switch:

A # vlan database

29
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
A (vlan) # vlan 2 name admin

A (vlan) # exit

A # wr

A # vlan database

A (vlan) # vlan 3 name ICT

A (vlan) #exit

A #config terminal

A (config) # vtp mode server

A (config) # vtp domain sunshine

A (config) # vtp password 123

A (config) # exit

A # wr

A # show vlan brief

All client switches:

Switch 1:

Switch > enable

Switch # config terminal

Switch (config) # hostname B

B (config) # interface vlan 1

B (config-if) # ip address 1.1.1.2 255.0.0.0

B (config-if) # no shutdown

B (config-if) # exit

B (config) # exit

B #wr

B #config terminal

B (config) # vtp mode client

B (config) # vtp domain sunshine

B (config) # vtp password 123

B (config) # exit

B # wr

Switch 2:

30
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
Switch > enable

Switch # config terminal

Switch (config) # hostname C

C (config) # interface vlan 1

C (config-if) # ip address 1.1.1.3 255.0.0.0

C (config-if) # no shutdown

C (config-if) # exit

C (config) # exit

C #wr

C #config terminal

C (config) # vtp mode client

C (config) # vtp domain sunshine

C (config) # vtp password 123

C (config) # exit

C # wr

Switch 3:

Switch > enable

Switch # config terminal

Switch (config) # hostname D

D (config) # interface vlan 1

D (config-if) # ip address 1.1.1.4 255.0.0.0

D (config-if) # no shutdown

D (config-if) # exit

D (config) # exit

D #wr

D #config terminal

D (config) # vtp mode client

D (config) # vtp domain sunshine

D (config) # vtp password 123

D (config) # exit

D # wr

31
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
Switch 4:

Switch > enable

Switch # config terminal

Switch (config) # hostname E

E (config) # interface vlan 1

E (config-if) # ip address 1.1.1.5 255.0.0.0

E (config-if) # no shutdown

E (config-if) # exit

E (config) # exit

E #wr

E #config terminal

E (config) # vtp mode client

E (config) # vtp domain sunshine

E (config) # vtp password 123

E (config) # exit

E # wr

Switch 5:

Switch > enable

Switch # config terminal

Switch (config) # hostname F

F (config) # interface vlan 1

F (config-if) # ip address 1.1.1.6 255.0.0.0

F (config-if) # no shutdown

F (config-if) # exit

F (config) # exit

F #wr

F #config terminal

F (config) # vtp mode

F (config) # vtp domain sunshine

F (config) # vtp password 123

32
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
F (config) # exit

F # wr

.‫ را فعال میکنیم‬TRUNK ‫برای اینکه معلومات انتقال یابد‬

A # config terminal

A (config) # interface fastEthernet 0/1

A (config-if) # switchport mode trunk

A (config-if) # exit

A (config) # exit

A # wr

A # config terminal

A (config) # interface fastEthernet 0/2

A (config-if) # switchport mode trunk

A (config-if) # exit

A (config) # exit

A # wr

A # config terminal

A (config) # interface fastEthernet 0/3

A (config-if) # switchport mode trunk

A (config-if) # exit

A (config) # exit

A # wr

A # config terminal

A (config) # interface fastEthernet 0/4

A (config-if) # switchport mode trunk

A (config-if) # exit

A (config) # exit

A # wr

A # config terminal

A (config) # interface fastEthernet 0/5

A (config-if) # switchport mode trunk

A (config-if) # exit

33
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
A (config) # exit

A # wr

.‫ ها رفته این دستور را انجام میدهیم‬switch ‫بعد به همین ترتیب به همه‬

Switch 1:

B # config terminal

B (config) # interface fastEthernet 0/1

B (config-if) # switchport mode trunk

B (config-if) # exit

B (config) # exit

B # wr

Switch 2:

C # config terminal

C (config) # interface fastEthernet 0/1

C (config-if) # switchport mode trunk

C (config-if) # exit

C (config) # exit

C # wr

Switch 3:

D # config terminal

D (config) # interface fastEthernet 0/1

D (config-if) # switchport mode trunk

D (config-if) # exit

D (config) # exit

D # wr

Switch 4:

E # config terminal

E (config) # interface fastEthernet 0/1

E (config-if) # switchport mode trunk

E (config-if) # exit

E (config) # exit

E # wr

34
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
Switch 5:

F # config terminal

F (config) # interface fastEthernet 0/1

F (config-if) # switchport mode trunk

F (config-if) # exit

F (config) # exit

F # wr

‫ دستورهای که‬show running-config ‫وتوسط دستور‬.‫ این دستور را انجام داده‬client ‫ ها‬switch ‫به همین ترتیب در همه‬
.‫ گردیده است نشان میدهد‬configuration ‫ استفاده یا‬switch ‫در‬

Configuration of a switch by HTTP

‫ نمائیم‬configure ‫ را‬Switch ‫ و چیگونه میتوانیم ازاین طریق یک‬protocol HTTP ‫ ازطریق‬switch ‫فعال نمودن یک‬
‫ یا‬central point ‫ داشته باشیم و میخواهیم آنها را دریک‬switch ‫خوبی آن دراین میباشد اگر ما دریک دفتر یا اداره چندین‬
‫دیگر خوبی آن‬.‫ میتوانیم این کار را انجام داد‬Protocol HTTP ‫ نمائیم ازطریق‬configuration ‫یک نقطه مرکزی آن ها را‬
‫ صورت‬Graphical User Interface ‫ یا به اساس‬GUI ‫ از طریق‬switch ‫ یک‬Configuration ‫دراین میباشد که مکمل‬
.‫میگیرد‬

‫ ها آنها چی میباشد درکجا میباشد درمورد‬IP address ‫ داشته باشیم که‬switch ‫ از همه‬documentation ‫پس ما باید یک‬
.‫ ها وبه همین ترتیب درمورد آن معلومات کامل داشته باشیم‬port

Switch> enable

Switch # config terminal

Switch (config) # ip http server

Switch (config-if) # interface vlan 1

Switch (config-if) # ip address 192.168.1.100 255.255.255.0

Switch (config-if) # no shutdown

Switch (config-if) # exit

Switch (config) # exit

Switch # config terminal

Switch (config) # line console 0

Switch (config-line) # login

Switch (config-line) # password 123

Switch (config-line) # exit

35
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
Switch (config) # enable password 1234

Switch (config) # exit

Switch # wr

access ‫ را که میخواهیم که‬switch ‫ همان‬internet explorer ‫ بعد از مراحل باال در‬switch ‫ نمودن یک‬access ‫برای‬
‫ داخل میشویم‬switch ‫ آنرا وارید نمودن بعد ما در‬password ‫ و‬username ‫ نمودن‬access ‫ آنرا مینوسیم بعد از‬IP ‫نمایم‬
.‫ ها را انجام میدهیم‬configuration

Configuring a router using IOS CLI

Cisco ‫ های کمپنی‬Router.‫ میباشد که برای وصل نمودن شبکه های انترنیتی مورد استفاده قرار میگیرد‬Device‫عبارت از‬
.‫ میباشد‬layer ‫عموما به سه بخش یا‬

Cisco divided the Router in to 3 layer:

 Access layer Router


 Distribution layer Router
 Core layer Router

‫ ها خورد مورد استفاده قرار‬organization ‫ های میباشد که برای کمپنی ها یا‬router ‫ عبارت ار‬:Access layer Router
:‫ های ذیل‬series ‫میگیرد مانند‬

Cisco series: 800, 1000, 1600, 1700, 2500

.‫ ها‬series‫این ها در بازار ارزانترمیباشد نسبت به دیگر‬

ISP layer ‫ ها استفاده میکند که گاهی بنام‬ISP ‫ های میباشد که ازآن ها‬router ‫ عبارت از‬:Distribution layer Router
:‫ های ذیل‬series ‫ یاد میگردد مانند‬router

Cisco series: 2600, 3200, 3600, 3700, 3800

‫ مورد استفاده قرار‬Global ISPs ‫ های جهانی یعنی‬ISP ‫ های میباشد که توسط‬Router‫ عبارت از‬:Core layer Router
:‫ های ذیل‬series ‫میگیرد مانند‬

Cisco series: 6400, 7200, 7300, 7400, 7500, 7600, 10000, 12000

.‫ میباشد‬Buses, NVRAM, Flash, RAM, CPU، Interface, ROM, ‫ دارای‬computer ‫ نیز مانند یک‬Router

:‫ میباشد‬interface ‫ دارای سه‬Router

 LAN interface
 WAM interface
 Management interface

.‫ را با شبکه های داخلی وصل میکند‬router ‫ های میباشد که‬interface‫ عبارت از‬:LAN interface

.‫ وصل میکند‬WAM ‫ را با شبکه های‬router ‫ های میباشد که‬interface ‫ عبارت از‬:WAN interface

.‫ ها استفاده میکنیم‬interface ‫ را کنترول کنیم مدیریت کنیم ازاین‬router ‫ اگر بیخواهیم‬:Management interface

36
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
.‫ ها به دو بخش تقسیم گردیده است‬Management interface

‫ نمایم درآن‬configure ‫ را از فاصله های نزدیک‬router ‫ های میباشد که بیخواهیم که‬interface‫ عبارت از‬:Console
.‫ ها استفاده میکنیم‬port ‫صورت ازاین‬

.‫ ها استفاده میکنیم‬interface ‫ نمایم از این‬configure ‫ را ازفاصله های دور‬Router ‫ اگربیخواهیم‬:Auxiliary

router‫ در‬switch ‫و همچنان مانند‬.‫ استفاده مینمایم‬DB9 Converter‫ نباشد یعنی نداشته باشد از‬serial ‫اگردرکمپیوتر پورت‬
.‫ های نیزمیباشد‬mode ‫هم‬

Mode Symbol
User mode Router>
Privileged mode Router #
Global configuration mode Router (config)#
Interface mode Router (config-if)#

.‫ مشاهده کنیم ازدستور ذیل استفاده مینمایم‬router‫ را در‬configuration‫اگر بیخواهیم آغاز‬

Router# show startup-config

.‫ مشاهده نمایم ازدستور ذیل استفاده میکنیم‬router‫ های قبلی را در‬configuration ‫اگربیخواهیم‬

Router# show running-config

.‫ های قبلی را کاپی نمایم از دستورذیل استفاده مینمایم‬configuration ‫اگربیخواهیم دستورها یا‬

Router# copyrun start

.‫ یک نام داد‬router ‫توسط این دستور میتوانیم به‬

Router (config) # hostname ICT

.‫ داد‬password ‫ میتوانیم رمز یا‬switch ‫به همین ترتیب مانند‬

Router (config) # enable password 123

:enable secret password ‫ بنام‬router ‫ به‬password ‫دادن‬

Router (config) # enable secret 1234

Console password:
router>enable
Router# configure terminal
router (config) #line console 0
router (config-line) #password123
router (config-line) #login
router (config-if) #exit
router (config) #exit
router# exit
.‫ ازصفر شروع میباشد‬port console ‫بخاطری صفر نوشته کردیم که‬
Telnets password:
router>enable
router# configure terminal

37
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
router (config) #line vty 0 4
.‫ شود‬router ‫ وارید‬remote ‫ میتواند ازساحات‬4 user ‫ به این معنا که‬4 ‫دراینجا‬
router (config-line) #password1234
router (config-line) #login
router (config-if) #exit
router (config) #exit
router# exit
‫ درآن عالمه سوالیه (؟) را‬4 ‫ شود به جای‬login ‫ میتواند‬router ‫اگربیخواهید که بیدانید که چند نفردراین‬
.‫شود‬login ‫ نفر میتواند‬15‫ به تعداد‬cisco ‫ های‬router‫نوشته نماید که عموما در‬

Enables password:
router>enable
router# configure terminal
router (config) #enable password 12345
router (config-if) #exit
router (config) #exit
router# exit

the steps to configure an interface include:


1. Specify the type of interface and the interface port.
2. Specify description of the interface.
3. Configure the interface IP address and subnet mask.
4. Set the clock rate, it configure a serial interface DCE.
5. Enable the interface.
Router(config)# interface serial 0/0/0
Router(config-if)# description connection to router 2
Router (config-if)# ip address 192.168.1.2 255.255.255.0
Router(config-if)# clock rate 64000
Router(config-if)# no shutdown
‫ را‬password ‫ یاد میگردد توسط این میتوانیم‬RXboot ‫ دیگروجود دارد بنام‬mode ‫ های دیگریک‬mode ‫برعالوه‬
.‫ را انجام میدهد‬password recovery ‫ یا وظیفه‬function ‫ نمایم یعنی‬breake
‫ میباشد‬internet ‫ تعین نمودن سرعت همان‬clock rate‫ هدف از‬:Click rate
DCE: data communication equipment
DTE: data terminal equipment

‫ میباشد که نشان میدهد که یک معلومات را ازیک شبکه به شبکه دیگرچگونه‬process ‫ عبارت از یک‬Routing
‫ ثبت وذخیره‬database ‫ معلومات آن در یک‬routing ‫ یاد میگردد که‬routing ‫هدایت داده میشود این پروسه بنام‬
router ‫ زمانیکه یک‬.‫ یاد میگردد‬routing table ‫ جابجا میباشد که بنام‬table ‫ در یک‬database ‫میگردد که این‬
.‫ میکند ازدوطریق صورت میگیرد‬communication ‫ دیگر‬router ‫همرای یک‬
Two way to know router WAN network:
 Static routing: by IT manager and used for small network.

38
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
 Dynamic routing: automatically for router and used for large network.
‫ کار میکند‬network layer ‫ عبارت از پروتوکل میباشد در‬:Routed protocol
Routed protocol: IP, IPX it is works on network layers.
‫ استفاده میگردد برای پیداکردن را ها که چیگونه معلومات ازکدام راها‬WAN ‫ درشبکه های‬:Routing protocol
.‫روان ودریافت میگردد‬

AS(autonomous system)
‫ یاد میگردد که ازیک نمبر خاص استفاده میکند که‬AS ‫ تحت یک مدیریت واحد قرار گیرد بنام‬router ‫زمانیکه چندین‬
‫ ها داده میشود که این توسط‬ISP ‫ یک نمبر مشخص میباشد که ازطریق دولت به‬AS ‫ میباشد‬655.5 ‫ شروع الی‬2‫از‬
.‫ درجهان کنترول میگردد‬IANN ‫یک اداره بنام‬
‫ کارمیکند که اگر بیخواهم درداخل کشور چندین شبکه را‬AS ‫ این تحت اداره‬: interior getway protocols :IGPs
.‫ استفاده مینمایم‬IGPs‫وصل نمایم درآنصورت از‬
E.g: RIP, GRP, EIGRP, OSPF
‫ افغانستان با هم وصل نمایم در آن‬AS ‫ ایران را با‬AS ‫ های مختلف را باهم وصل نمایم بطورمثال‬AS ‫اگر بیخواهیم‬
.‫ یاد میگردد‬exterior getway protocol ‫ استفاده نموده که بنام‬Protocol ‫صورت از این‬
E.g: BGP
BGPs‫ های مختلف باشد و بیخواهیم یک نفطه مرکزی برای تبادله معلومات بوجود بیاوریم در آن صورت از‬AS‫اگر‬
.‫استفاده میکنیم‬

Basic RIP Configuration


Example:

Router1:Bakhtar
Router> enable
Router#config terminal
Router(config)#interface fastEthernet 0/0
Router(config-if)# ip address 192.168.1.1 255.255.255.0
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config) exit
Router> enable
Router#config terminal
Router(config)#interface fastEthernet 0/1
Router(config-if)# ip address 172.16.16.1 255.255.255.0
Router(config-if)# no shutdown

39
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
Router(config-if)# exit
Router(config) exit

Rip
Router# config terminal
Router(config)#router rip
Router(config-router)#network 192.168.1.0
Router(config-router)#network 172.16.16.0
Router(config-router)#exit
Router(config)#exit

Router2: ISP MANE ROUTER


Router> enable
Router#config terminal
Router(config)#interface fastEthernet 0/1
Router(config-if)# ip address 172.16.16.2 255.255.0.0
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config) exit
Router> enable
Router#config terminal
Router(config)#interface fastEthernet 1/0
Router(config-if)# ip address 10.0.0.2 255.0.0.0
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config) exit

rip
Router# config terminal
Router(config)#router rip
Router(config-router)#network 172.16.16.0
Router(config-router)#network 10.0.0.0
Router(config-router)#exit

40
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
Router(config)exit

Router3: sunshine
Router> enable
Router#config terminal
Router(config)#interface fastEthernet 0/0

Router(config-if)# ip address 10.0.0.1 255.0.0.0


Router(config-if)# no shutdown
Router(config-if)# exit
Router(config) exit
Router> enable
Router#config terminal
Router(config)#interface fastEthernet 0/1
Router(config-if)# ip address 20.0.0.1 255.0.0.0
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config) exit

41
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
rip
Router# config terminal
Router(config)#router rip
Router(config-router)#network 10.0.0.0
Router(config-router)#network 20.0.0.0
Router(config-router)#exit
Router(config)#exit

Advanced RIP configuration


‫ شبکه های انترنیتی را هم وصل میکند‬Dynamic ‫ میباشد و بشکل‬Dynamic ‫ های‬Protocol‫ یکی از‬RIP
‫ های بین این‬Router ‫ شاید‬.‫ استفاده میکنیم‬RIP ‫واگربیخواهیم چندین وزارت یا کشور را با هم وصل نمایم ازقوانین‬
‫ ویا دیگر وسایل باهم‬modem, SDH, cable fiber, satellite, microwave ‫دوشبکه ها را توسط لینک های مانند‬
.‫ارتباط داشته باشد‬
‫ های فعلی این‬Router‫ ها صورت میگیرد اما در‬Serial port ‫ ها توسط‬ISP ‫ که مربوط به‬Router‫ارتباط بین دو‬
Serial port ‫ کند ضرورت به‬Support ‫ گیگابایت را فی ثانیه معلومات را‬1000Ghs ‫امکانات وجود دارد که میتواند‬
.‫ها نمیباشد‬
.‫ ها آنها را معرفی میکنیم‬Interface ‫ و‬IP ‫ ها‬Router ‫حاال درهمه‬

Router (1) customer (sunshine): get service from afghan telecom


Router> enable
Router # config terminal
Router(config) # interface fastEthernet 0/0
Router (config-if)# ip address 172.16.16.1 255.255.0.0
Router(config-if)# no shutdown
Router(config-if)# exit
Router (config)# exit
Router # config terminal
Router(config) # interface fastEthernet 0/1
Router (config-if)# ip address 20.0.0.1 255.0.0.0
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# exit
Router# wr

42
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
Router (2) ISP (Afghan Telecom): In Afghanistan
Router> enable
Router # config terminal
Router(config) # interface fastEthernet 0/0
Router (config-if)# ip address 20.0.0.2 255.0.0.0
Router(config-if)# no shutdown
Router(config-if)# exit
Router (config)# exit
Router # config terminal
Router(config) # interface serial 0/0/0
Router (config-if)# ip address 50.0.0.1 255.0.0.0
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# exit
Router# wr

Router (3) ISP (Etisalat): In Pakistan


Router> enable
Router # config terminal
Router(config) # interface serial 0/0/0
Router (config-if)# ip address 50.0.0.2 255.0.0.0
Router(config-if)# no shutdown
Router(config-if)# exit
Router (config)# exit
Router # config terminal
Router(config) # interface fastEthernet 0/0
Router (config-if)# ip address 40.0.0.2 255.0.0.0
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# exit
Router# wr

43
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
Router (4) customer (bakhtar): get service from Etisalat
Router> enable
Router # config terminal
Router(config) # interface fastEthernet 0/0
Router (config-if)# ip address 192.168.0.1 255.255.255.0
Router(config-if)# no shutdown
Router(config-if)# exit
Router (config)# exit
Router # config terminal
Router(config) # interface fastEthernet 0/1
Router (config-if)# ip address 40.0.0.1 255.0.0.0
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# exit
Router# wr
.‫ را معرفی کنیم‬Network ‫ را انجام دهیم تا‬RIP ‫ شده میخواهیم‬configure ‫ ها در همه از آن ها‬IP ‫حاال‬

Router (1) customer (sunshine): get service from telecom


Router# config terminal
Router(config)# router rip
Router(config-router)# network 17.16.16.0
Router(config-router)# network 20.0.0.0
Router(config-router)#exit
Router(config)# exit
Router# wr

Router (2) ISP (Afghan Telecom): In Afghanistan


Router# config terminal
Router(config)# router rip
Router(config-router)# network 20.0.0.0
Router(config-router)# network 50.0.0.0
Router(config-router)#exit

44
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
Router(config)# exit
Router# wr

Router (3) ISP (Etisalat): In Pakistan


Router# config terminal
Router(config)# router rip
Router(config-router)# network 50.0.0.0
Router(config-router)# network 40.0.0.0
Router(config-router)#exit
Router(config)# exit
Router# wr

Router (4) customer (bakhtar): get service from Etisalat


Router# config terminal
Router(config)# router rip
Router(config-router)# network 40.0.0.0
Router(config-router)# network 192.168.0.0
Router(config-router)#exit
Router(config)# exit
Router# wr

Doing of clock rate in serial ports:


Router# config terminal
Router(config)# interface serial 0/0/0
Router(config-if)# clock rate 64000
Router(config-if)# exit
Router(config)#exit
Router# wr

‫ آدرس را به‬IP‫ میباشد باید‬Gateway ‫ که‬CLASS ‫ آدرس ها را معرفی میکنیم از هر‬IP ‫دراخیر به کمپیوتر ها‬
.‫ باشد‬Class ‫کمپیوتر ها از همان‬

45
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
Sunshine: Afghanistan
PC1:
Ip address: 172.16.16.2
Subnet mask: 255.255.255.0
Default gateway: 172.16.16.1

Bakhtar: Pakistan
PC1:
Ip address: 192.168.0.2
Subnet mask: 255.255.255.0
Default gateway: 192.168.0.1

46
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
DHCP Server configuration In Router
……………………………:DHCP
DHCP Discover: clients broadcast this address to DHCP 255.255.255.225 and this IP
0.0.0.0
DHCP Offer: DHCP providing this IP forward for client.
 Source IP: IP of DHCP
 Destination MAC address: client destination IP 255.255.255.0 from the range
if IP.
DHCP request: the DHCP offer IP is broadcasting from client’s side to all network.
DHCP ack, DHCP nack: if IP is not blocked by admin from DHCP range DHCP is
sending nack massage for clients.
‫ گردد و‬set ‫ باید‬manually ‫ میباشد به بشکل‬server ‫ های که مربوط همه‬IP ‫ به وجود نیاید باید‬duplicate ‫برای اینکه‬
‫ دقیقه را دربر میگیرد تا به‬5 ‫ حدودا‬DHCP ‫ به شکل‬IP ‫و عمل تعین نمودن‬.‫ را تعین نمایم‬end IP ، start IP ‫همچنان‬
‫ داریم بنام‬command ‫ ما‬DHCP server ‫ یک‬Configuration ‫ برای‬.‫ را توزیع نماید‬IP ‫ ها‬Client
Router(config)# ip dhcp excluded-address 192.168.1.1
Router(config)# ip dhcp pool internal sunshine
:Ipconfig/release
:Ipconfig/ renew
‫ یا‬switch ‫ داریم چقدر‬server ‫ داشته باشیم که چقدر‬planning ‫ نما یم باید یک‬configuration ‫قبل از آن که ما‬
‫ ها را که نمیخواهیم توزیع نمایم باید آن‬IP ‫ داریم و ما باید یک لست از آن همه وسایل داشته باشیم و همان‬device‫چقدر‬
‫ ها و‬server ‫ توزیع گردد به همه‬manually ‫ باید آورد همه آن آدرس ها باید قید نمایم یعنی‬Excluded list ‫ها را به‬
.‫ های که در شبکه میباشد‬device
‫ هم به حیث‬router ‫ میباشد یعنی این‬router ‫ با هم مشابه میباشد چرا که در یک‬dhcp‫ و‬gateway ‫ در این مثال‬:‫مثال‬
.‫ کار میکند‬gateway ‫ و هم به حیث‬dhcp server
Router customer:
Router> enable
Router# config terminal
Router (config)# interface fastEthernet 0/0
Router (config-if)# ip address 192.168.1.1 255.255.255.0
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# exit
.‫ میکنیم تعین گردد‬Excluded ‫ را معرفی مینمایم یعنی آدرس های را که‬DHCP ‫حال‬
Router#config terminal
Router(config)# ip dhcp excluded-address 192.168.1.1 192.168.1.10

47
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
Router(config)#exit
.‫ یاد میگردد‬scope pool ‫ های را که برای توزیع نمودن میباشد بنام‬ip ‫مراحل توزیع یا تعین نمودن تعداد‬
Router(config)# ip dhcp pool sunshine
Router(config-config)# network 192.168.1.0
Router(config-config)# network 192.168.1.0 255.255.255.0
‫ و‬DNS‫ بیگیرد یا داشته باشد دوچیز خیلی مهم و ضروری میباشد که عبارت از‬Internet ‫ ها‬client ‫برای اینکه‬
.‫ نمیگردد‬access ‫ در آن ها‬internet ‫ میباشد درغیر آن‬Gateway
Router(dhcp-config)# default-router 192.168.1.1
Router(dhcp-config)# dns-server 192.168.1.2
Router(dhcp-config)# exit
Router(config)# exit
Router# wr
.‫ میدهیم‬ip ‫ وصل میباشد‬client ‫ که‬switch ‫حال به‬
Switch>enable
Switch# config terminal
Switch(config)# interface vlan 1
Switch(config-if)# ip address 192.168.1.5 255.255.255.0
Switch(config-if)# no shutdown
Switch(config-if)# exit
Switch(config)#exit
Switch# wr

Router ISP:
Router>enable
Router#config terminal
Router(config)# interface fastEthernet 0/0
Router(config-if)# ip address 10.0.0.10 255.0.0.0
Router(config-if)# no shutdown
Router(config-if)#exit
Router(config)#exit
Router# wr

48
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department
49
Prepared by: Ahmad Farzad Mawlayee
Ghazni University Computer Science Department

You might also like