一、路由器、交换机基本配置

29
1 路路路路 路路路路路路路 一、、

Upload: cece

Post on 05-Jan-2016

58 views

Category:

Documents


8 download

DESCRIPTION

一、路由器、交换机基本配置. 安排. 实验室各机柜设备互连介绍 学生超级终端连接到各设备 学生 PC 通过内部交换机连接到各自的路由器第一个以太网口 路由器基本结构及各配置模式介绍 讲解、学习课件 实验文件 8_ Steps_to_Success.pdf 实验 1.5.1 :网络布线和基本路由器配置. 交换机或路由器的配置模式及切换. Using exit , end and Control-Z. end. exit. 实验一文件. 实验 1.5.1 :网络布线和基本路由器配置 P3:DTE, DCE - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: 一、路由器、交换机基本配置

1

一、路由器、交换机基本配置

Page 2: 一、路由器、交换机基本配置

2

安排

• 实验室各机柜设备互连介绍• 学生超级终端连接到各设备• 学生 PC 通过内部交换机连接到各自的路由器第一个

以太网口• 路由器基本结构及各配置模式介绍• 讲解、学习课件• 实验文件

–8_Steps_to_Success.pdf

–实验 1.5.1 :网络布线和基本路由器配置

Page 3: 一、路由器、交换机基本配置

3

交换机或路由器的配置模式及切换

Page 4: 一、路由器、交换机基本配置

4

exit

end

Using exit, end and Control-Z

Page 5: 一、路由器、交换机基本配置

5

实验一文件

• 实验 1.5.1 :网络布线和基本路由器配置–P3:DTE, DCE

–P4: 通过控制台连接配置路由器时需要用到终端仿真软件。 Cisco Networking Academy 推荐使用 Tera Term 。–P5:[OK] 提示与输入–关于 setup

–P7: 步骤 10 :键入缩写的 IOS 命令。–P8: 步骤 5 :使用 no ip domain-lookup 命令禁用 DNS 查找。

• 实验 1.5.2 :基本路由器配置• 实验 1.5.3 :路由器配置练习

Page 6: 一、路由器、交换机基本配置

6

实验一文件

• 实验 1.5.2 :基本路由器配置–show running-config

–show ip route

–show ip interface brief

• 实验 1.5.3 :路由器配置练习

Page 7: 一、路由器、交换机基本配置

7

实验网络拓扑图

Page 8: 一、路由器、交换机基本配置

8

路由器配置的基本步骤

• Step 1: Physical Connections • Step 2: Boot up the router • Step 3: Host Name and Passwords • Step 4: Adding IP Addresses • Step 5a: Adding Dynamic Routing: RIP • Step 5b: Adding Dynamic Routing: EIGRP • Step 5c: Adding Dynamic Routing: OSPF• Step 6: Adding Default and Static Routes • Step 7: Testing and Monitoring • Step 8: Finishing up• 详见文档: 8_Steps_to_Success.pdf

Page 9: 一、路由器、交换机基本配置

9

实验要求及验证• 路由器基本配置

–设备命名–各种口令( console; enable; vty )–第一个以太网口分配地址–int fa0/0

–ip add 192.168.1.1 255.255.255.0

–no shut

• 将 PC 机的网线从校园网拔出,转接到内网,• 自己的 PC 通过交换机连到路由器的第一个以太网口,修改自己的 IP 地址和路由

器在同一个网段中, PC 机的网关地址指向所连接的路由器的接口地址如:• 192.168.*.10 255.255.255.0

• * 的值和路由器的编号相对应,如 R1 , 192.168.1.10

• C:>telnet 192.168.*.1

• 如果登录成功,则实验成功

Page 10: 一、路由器、交换机基本配置

10

Page 11: 一、路由器、交换机基本配置

11

二、静态路由、缺省路由

Page 12: 一、路由器、交换机基本配置

Role of the Router

Routers are primarily responsible for interconnecting networks by: Determining the best path Forwarding packets

What is the best path to 192.168.2.0/24 network?

Page 13: 一、路由器、交换机基本配置

Introducing the Topology

172.16.3.0/24

172.16.2.0/24

172.16.1.0/24

192.168.1.0/24

192.168.2.0/24

.1

.1

.1

.1

.2 .2

.1

Page 14: 一、路由器、交换机基本配置

14

实验文件

• 实验手册 ccna2-路由-学生版实验手册

–实验 2.8.1 :基本静态路由配置–实验 2.8.2 :静态路由配置练习–实验 2.8.3 :静态路由故障排除

Page 15: 一、路由器、交换机基本配置

15

实验文件• 拓扑结构及地址表结合实验室具体情况进行

Page 16: 一、路由器、交换机基本配置

16

路由器配置的基本步骤

• Step 1: Physical Connections • Step 2: Boot up the router • Step 3: Host Name and Passwords • Step 4: Adding IP Addresses • Step 5a: Adding Dynamic Routing: RIP • Step 5b: Adding Dynamic Routing: EIGRP • Step 5c: Adding Dynamic Routing: OSPF• Step 6: Adding Default and Static Routes • Step 7: Testing and Monitoring • Step 8: Finishing up• DEMO: debug ip routing• Show ip route• 直连的网络和静态路由加入的远程网络

Page 17: 一、路由器、交换机基本配置

17

常用命令

• Show ip int brief

• Show run

• Show ip route

• Show version

• Show controller s0/0/0

Page 18: 一、路由器、交换机基本配置

Examining the show commands

• show interfaces – Displays all the statistics for all the interfaces on the router. To view the statistics for a specific interface, enter the show interfaces command followed by the specific interface and port number.

• show controllers serial – Displays information-specific to the interface hardware

• show clock – Shows the time set in the router • show hosts – Displays a cached list of host names and addresses • show users – Displays all users who are connected to the router • show history – Displays a history of commands that have been entered • show flash – Displays information about flash memory and what IOS files are

stored there • show version – Displays information about the router and the IOS that is

running in RAM • show ARP – Displays the ARP table of the router • show protocol – Displays the global and interface specific status of any

configured Layer 3 protocols • show startup-configuration – Displays the saved configuration located in

NVRAM

• show running-configuration – Displays the configuration currently running in RAM

Page 19: 一、路由器、交换机基本配置

补充说明

• 1 、结合实验室的具体情况进行连线及有关说明• 主机要连接到内网中,同时修改主机地址为静态分配,以各自所在的路

由器的第一个以太网口为网关• 如果是 4 人一组,则要增加一台路由器 R4 ( 2611 ),通过以太网口

E0/0 直接连接到 R2 的 F0/0

• 一定要注意各个路由器的接口信息, # show ip int brief 查看,路由器2611 是 ethernet 的 10M 口,而 2620 , 2621 , 1841 , 2800 等都是fastethernetde 100M 口。另外, 2620 只有 1 个以太网口,而其他的则有 2 个以太网口。

• 机柜中的 R3 可能是下列中的一种: 2621 , 2620 或 2611

• DCE 、 DTE 线缆根据线缆的实际连接来判断,但一定不要忘记在 DCE端敲入 clock rate 命令,如果不能确定是否 DCE ,可用命令Router#show controllers s0/0/0 进行查看

• 各接口配置完地址等信息后,一定不要忘记敲入 no shut 命令• 2 、地址分配各组成员之间协商,地址可以自己设计和分配。

Page 20: 一、路由器、交换机基本配置

关于各个路由器之间的路由实现说明

• R1 :默认静态路由• R2 :静态路由• R3 :先静态路由,再更换为汇总结静态路由总路由• R4 :默认静态路由

Page 21: 一、路由器、交换机基本配置

静态路由与缺省路由

R1(config)#ip route 0.0.0.0 0.0.0.0 172.16.2.2

Page 22: 一、路由器、交换机基本配置

静态路由、缺省路由拓展

• 如果有 R4 ,则将 R4 也作为分支机构如 Branch2 即可。• 此时, R4 启用缺省路由, HQ 启用静态路由。

Page 23: 一、路由器、交换机基本配置

23

Print out this topology

Page 24: 一、路由器、交换机基本配置

24

基本配置 R2 conf t

host R2

enable secret class

line con 0

password cisco

login

line vty 0 4

password cisco

login

end

****R2

conf t

int fa0/0

description connet to LAN2

ip add 172.16.1.1 255.255.255.0

no shut

int s0/0/0

ip add 172.16.2.2 255.255.255.0

no shut

int s0/0/1

ip add 192.168.1.2 255.255.255.0

clock rate 56000

no shut

end

Page 25: 一、路由器、交换机基本配置

25

基本配置 R1&R3

***R1

conf t

int fa0/0

description connet to LAN1

ip add 172.16.3.1 255.255.255.0

no shut

int s0/1/0

ip add 172.16.2.1 255.255.255.0

clock rate 56000

no shut

end

***R3

conf t

int fa0/0

description connet to LAN3

ip add 192.168.2.1 255.255.255.0

no shut

int s0/0/1

ip add 192.168.1.1 255.255.255.0

no shut

end

Page 26: 一、路由器、交换机基本配置

26

静态路由

***R1

conf t

ip route 172.16.1.0 255.255.255.0 172.16.2.2

ip route 192.168.1.0 255.255.255.0 172.16.2.2

ip route 192.168.2.0 255.255.255.0 172.16.2.2

缺省路由简化路由表 ip route 0.0.0.0 0.0.0.0 172.16.2.2

***R2

conf t

ip route 172.16.3.0 255.255.255.0 172.16.2.1

ip route 192.168.2.0 255.255.255.0 192.168.1.1

***R3

conf t

ip route 172.16.1.0 255.255.255.0 192.168.1.2

ip route 172.16.2.0 255.255.255.0 192.168.1.2

ip route 172.16.3.0 255.255.255.0 192.168.1.2

汇总路由简化路由表 ip route 172.16.0.0 255.255.252.0 192.168.1.2

Page 27: 一、路由器、交换机基本配置

27

实际的网络

***R1

conf t

ip route 172.16.1.0 255.255.255.0 172.16.2.2

ip route 192.168.1.0 255.255.255.0 172.16.2.2

ip route 192.168.2.0 255.255.255.0 172.16.2.2

缺省路由简化路由表 ip route 0.0.0.0 0.0.0.0 172.16.2.2

***R2

conf t

ip route 172.16.3.0 255.255.255.0 172.16.2.1

ip route 0.0.0.0 0.0.0.0 192.168.1.1

***R3

conf t

ip route 172.16.1.0 255.255.255.0 192.168.1.2

ip route 172.16.2.0 255.255.255.0 192.168.1.2

ip route 172.16.3.0 255.255.255.0 192.168.1.2

汇总路由简化路由表 ip route 172.16.0.0 255.255.252.0 192.168.1.2

Page 28: 一、路由器、交换机基本配置

28

实际的网络

***R1

conf t

缺省路由简化路由表 ip route 0.0.0.0 0.0.0.0 172.16.2.2

***R2

conf t

ip route 172.16.3.0 255.255.255.0 172.16.2.1

ip route 0.0.0.0 0.0.0.0 192.168.1.1

***R3

conf t

汇总路由简化路由表 ip route 172.16.0.0 255.255.252.0 192.168.1.2

Page 29: 一、路由器、交换机基本配置

系统测试

• 路由器– Show run– Show ip int brief– Debug ip routing 实时观察路由的变化– Undebug ip routing/ undebug all 关闭 debug– Show ip route– Ping 远程主机– Traceroute 远程主机– telnet 远程路由器

• PC 机– Ping 远程主机– telnet 远程路由器