西邮计算机网络实验,西邮网络实验报告.doc

西邮网络实验报告

RIP

实验环境:

实验步骤:

在pocket tracer中搭建实验环境。

为各端口分配IP地址(合理分配4个子网即可)

分别为路由器各有效端口配置IP

如:

R0(config)#int fa 0/1

R0(config-if)#ip address 192.168.1.1 255.255.255.0

R0(config-if)#no sh

IP配置完毕后,在每个路由器上开启ripv2协议

拿R1举例:

R1(config)#router rip

R1(config-router)#version 2

R1(config-router)#no auto-summary 关闭自动汇总

R1(config-router)#network 192.168.2.0

R1(config-router)#network 192.168.3.0 注:与R1相连接的网络地址的网络号均需要被宣告。

检验

用PC1 ping PC0

在R1上show ip route 查看路由信息

OSPF

实验环境:

实验步骤:

在pocket tracer中搭建实验环境。

为各端口分配IP地址(合理分配4个子网即可)

分别为路由器各有效端口配置IP

如:

R0(config)#int fa 0/1

R0(config-if)#ip address 192.168.1.1 255.255.255.0

R0(config-if)#no sh

4,IP配置完毕后,在每个路由器上开启ripv2协议

拿R1举例:

R1(config)#router ospf 1 1为进程号

R1(config-router)#router-id 1.1.1.1 (router-id用于标识LSA是从哪个路由器发出的;如果没有手工指定,有环回的情况下,自动选择环回地址最大的作为router id

如果没有环回,选择物理接口地址最大的)

R1(config-router)#network 192.168.2.0 0.0.0.255 area 1

R1(config-router)#network 192.168.3.0 0.0.0.255 area 1

5,检验

用PC1 ping PC0

单臂路由

试验环境:

实验步骤:

划分两个VLAN分别划给PC0和PC1

Switch(config)#int fa 0/2

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 2

链接路由器的端口配置为trunk模式

Switch(config)#int fa 0/1

Switch(config-if)#switchport mode trunk

路由器上首先配置端口封装模式,然后创建子接口用于对应不同的VLAN

Router(config)#int fa 0/0

Router(config-if)#no sh

Router(config-if)#interface fastethernet 0/0.1

Router(config-subif)#encapsulation dot1q 2注:设定该接口识别802.1q封装 并且管理vlan2

Router(config-subif)#ip address 192.168.1.1 255.255.255.0

Router(config-if)#interface fastethernet 0/0.2

Router(config-subif)#encapsulation dot1q 3

Router(config-subif)#ip address 192.168.2.1 255.255.255.0

检测:PC1 ping PC0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值