华为三层交换机与路由器ospfospf协议问题

关于网络内的两段RIP与OSPF协议,是通过三层交换机和两个路由器怎么进行设置两台主机可以进行通信。_百度知道
关于网络内的两段RIP与OSPF协议,是通过三层交换机和两个路由器怎么进行设置两台主机可以进行通信。
请问高手,我下面的配置可以让两台PC0与PC1相互通信么:R1与左边的设备进行的是RIP协议,R2设备进行的是OSPF协议,因此需要将R1的rip与ospf互相重新再分布redistribute协议。
1、首先将两台PC设置:PC0:192.168.1.2
255.255.255.0 192.168.1.1 PC1:192.168.4...
我有更好的答案
ospf进rip时,要加metricip routing,5.33应该是默认开启的吧,忘了。交接机f0/2那么配是对的。
谢谢,你的回答,按着你的添加了metric 3后,可以互相访问了,但我的疑问还有以下几点:1、但我看教程,版本是5.2的,那上面没有写metric,然后两台主机就能Ping通。2、rip与ospf重新分布之前,R1与R2都有那四个网段了,怎么还不能互相PING通呢?3、重新分布后,R1与R2的网段都没有变啊。
我不知道你的教程,实践出真知,进rip不加metric,都不装表的。原理是重要的,不能死记结论,不通设备、相同设备不通ios版本,有些东西都会有所不同。不是还有个3层交换机吗。在这里,三交就当做路由器看。还是三交,你来回的icmp包明明要经过3个3层设备,为什么你只盯着2台路由器呢?&重分布之前,肯定是左有左,右有右,中间的是全的。你模拟icmp包的走向,跟着走一遍就知道了,看到哪走不动。
采纳率:45%
你交换机switch0配错了,交换机和路由器r1不是通过f0/2口连接的么,你怎么给配成access口了,通信不了的而且三层交换是支持路由功能的,f0/2口可以配置一个ip地址在接口下用no swi命令,关闭端口交换就可以配ip地址了或者直接在路由上做单臂,不过不推荐
如果有时间的话,你看看这个教程,三层交换机是这么设置的将int f0/2 划到vlan 2了,教程是用5.2的,但我用的5.33版的,同样的配置我这不通,不知道怎么回事。
有几个错误:1、交换机f0/2需配置成以太口,并配置ip地址2、交换机需打开路由功能3、ospf重发布到rip时,需指定metric,否则为无穷大
为您推荐:
其他类似问题
ospf协议的相关知识
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。三层交换机使用ospf动态路由(教师用)_百度文库
您的浏览器Javascript被禁用,需开启后体验完整功能,
享专业文档下载特权
&赠共享文档下载特权
&10W篇文档免费专享
&每天抽奖多种福利
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
三层交换机使用ospf动态路由(教师用)
阅读已结束,下载本文需要
想免费下载更多文档?
定制HR最喜欢的简历
下载文档到电脑,同时保存到云知识,更方便管理
加入VIP
还剩1页未读,
定制HR最喜欢的简历
你可能喜欢两个路由和一个三层交换机的OSPF如何分别配置?_百度知道
两个路由和一个三层交换机的OSPF如何分别配置?
校园网主机首先与二台接入层交换机连接,然后通过1台三层交换机连到出口路由器R1,然后与Internet的路由器R2相接,你适当配置,实现内外网络的主机能相互通信。
三.实验拓扑 (可参考附图)
四、IP地址分配
三层交换机(Switch3):F0/1:192.168.2.1/24;
如图,其他的都已经解决,就是OSPF这块无法搞定,请高手指教,感激不尽。
我有更好的答案
Switch3:router ospf 20network 192.168.2.0 0.0.0.255 a 0router1:router ospf 20network 192.168.2.0 0.0.0.255 a 0network 192.168.3.0 0.0.0.255 a 0router2:router ospf 20network 172.16.2.0 0.0.0.255 a 0network 192.168.3.0 0.0.0.255 a 0route-id 自动选举。
采纳率:84%
swich3router ospf 10network 192.168.0.0 0.0.255.255 area 0Router1router ospf 10network 192.168.0.0 0.0.255.255 area 0Router2router ospf 10network 0.0.0.0 255.255.255.255 area 0OSPF这块只需这样
为您推荐:
其他类似问题
三层交换机的相关知识
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。三层交换机的OSPF简介
我的图书馆
三层交换机的OSPF简介
OSPFOpen Shortest Path FirstIETFL-SLink-State
l& && && & ——
l& && && & ——
l& && && & ——OSPF
l& && && & ——
l& && && & ——4
l& && && & ——
l& && && & ——
OSPFASAreaABRBackbone Area0.0.0.0ASBR
(1)& && &&&OSPFLSDBLSALSALSALSA
(2)& && &&&LSALSDBLSDB
(3)& && &&&SPF
OSPF“”DRDRDRDRDR Other——
S3500OSPFRFC2328
l& && && & STUBSTUBASE
l& && && & RIPOSPFOSPF
l& && && & OSPFMD5
l& && && & VLANVLANOSPFHelloVLAN“”
l& && && &
l& && && &
l& && && & S3500
4.2.1&&OSPF
OSPFOSPFOSPF
l& && && & ID
l& && && & OSPF
l& && && & VLAN
l& && && & VLAN
l& && && & VLAN
l& && && & DR
l& && && & Hello
l& && && &
l& && && & LSA
l& && && & LSA
l& && && & OSPFSTUB
l& && && & OSPF
l& && && &
l& && && & OSPF
l& && && & OSPF
l& && && &
l& && && & OSPF
l& && && & OSPF
l& && && & OSPF
l& && && & OSPF
ID32IDIDVLANIPIDIDIDIDVLANIP
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && &&&4-1 ID
router id router-id
no router id
4.2.3&&OSPF
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && &4-2 OSPF
router ospf
no router ospf
4.2.4&&VLAN
OSPFAreaABROSPFVLANarea-id32OSPFarea-idABR
OSPFVLANOSPFVLAN
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && & 4-3 VLAN
network address wildcard-mask area area-id
no network address wildcard-mask area area-id
4.2.5&&VLAN
S3500OSPFbroadcast
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && & 4-4 VLAN
ip ospf network { non-broadcast | broadcast | point-to-multipoint | point-to-point }
no ip ospf network
4.2.6&&VLAN
VLANOSPFVLAN
ip ospf cost cost
no ip ospf cost
4.2.7&&VLANDR
VLANVLAN“”VLAN
Designated Routerpriority0“”“”DRDRHelloDRHello“”DRDRRouter IDDR
DRDROSPFBackup Designated RouterBDRDRDRBDRBDRDRBDRDRBDR
DRBDRDR Other
l& && && & DRpriorityBDRprioritypriorityDR
l& && && & DRVLANVLANDRVLANBDRDR Other
l& && && & VLANNBMANon-Broadcast Multi-AccessX.25HDLCDRDRVLANDR
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && & 4-6 VLANDR
VLAN“DR”
ip ospf priority value
VLAN“DR”
no ip ospf priority
VLANDR10~255
4.2.8&&Hello
HelloDRBDRHelloHello-intervalHello-intervalHello-interval
0DRBDRHelloDRBDRDRBDRHello
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && & 4-7 Hello
ip ospf hello-interval seconds
no ip ospf hello-interval
VLANHello10 1~255
HelloDead-intervalDead-intervalHello-interval4Dead-interval
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && & 4-8
ip ospf dead-interval seconds
no ip ospf dead-interval
VLAN401~65535
4.2.10&&LSA
LSALSALSALSA
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && &4-9 LSA
ip ospf retransmit-interval seconds
no ip ospf retransmit-interval
LSA51~65535
4.2.11&&LSA
LSALSDBAging1LSATransmit-delay
& && && && && && && && && && && && && && && && && && && && && &&
ip ospf transmit-delay seconds
no ip ospf transmit-delay
LSA11~65535
4.2.12&&OSPFSTUB
“STUB”LSAABR0.0.0.0
STUBSTUBABRABRABR
l& && && & STUBSTUB
l& && && & STUB
l& && && & STUBASBR
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && &4-11 OSPFSTUB
area area-id stub [ no-summary ]
no area area-id stub
area area-id default-cost cost
no area area-id default-cost
STUBarea stubarea default-costSTUBarea stubSTUBarea default-costSTUBABRSTUB
STUBLSAno-summaryABRSTUBLSAs
4.2.13&&OSPF
ABROSPFABRSum_net_LSAType 3 LSArangeABRLSALSALSDB
l& && && & 202.38.160.0& & 255.255.255.0
l& && && & 202.38.180.0& & 255.255.255.0
202.38.0.0& &255.255.0.0
IPnotadvertiseIP/
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && & 4-12 OSFP
area area-id range ip-address ip-mask [ advertise | notadvertise ]
no area area-idrange ip-address ip-mask
OSPF——area-id0.0.0.0Backbone AreaOSPFOSPFABR0.0.0.00.0.0.0
ABRABRIDTransit Areaarea-id
“”ABROSPFIPABRLSA
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && & 4-13
area area-id virtua-link router-id[ hello-interval seconds ] [ retransmit-interval seconds ][ transmit-delay seconds ] [ dead-interval seconds] [ authentication-key key | message-digest-key keyid md5 key ]
no area area-id virtua-link router-id
Hello-interval10Retransmit-interval5Transmit-delay1Dead-interval40
4.2.15&&OSPF
MD5ip ospf authenticationip ospf message-digest-key md5MD5
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && & 4-14 OSPF
area area-id authentication [ message-digest ]
no area area-id authentication
4.2.16&&OSPF
VLANMD5key-idkey-idMD5MD5key-idkey-id
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && & 4-15 OSPF
ip ospf authentication-key password
no ip ospf authentication-key
ip ospf message-digest-key key-id md5 key
no ip ospf message-digest-key
OSPF“OSPF”
l& && && &
l& && && &
l& && && & Type 1
l& && && & Type 2
OSPFType 1Type 2150
Type 1IGPRIPOSPF = ASBR + ASBR
Type 2EGPBGPOSPFASBRASBR = ASBRASBR
& && && && && && && && && && && && && && && && && && &&& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && & 4-16
redistribute protocol[ metric metric][ type 1 | 2 ][ tag tag-value ]
no redistribute protocol
4.2.18&&OSPF
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && & 4-17 OSPF
default redistribute interval seconds
no default redistribute interval
default redistribute limit routes
no default redistribute limit
default redistribute metric metric
no default redistribute metric
default redistribute tag tag
no default redistribute tag
default redistribute type { 1 | 2 }
no default redistribute type
Type 21150
4.2.19&&OSPF
redistributeOSPF
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && & 4-18 OSPF
default-information originate [ always ] [metric metric][ type 1 | 2 }]
no default-information originate
4.2.20&&OSPF
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && & 4-19 OSPF
preference [ ase ] value
no preference [ ase ]
4.2.21&&OSPF
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && &4-20 /OSPF
distribute-list gateway prefix-list-name in
no distribute-list gateway prefix-list-name&&in
distribute-list { access-list-number | prefix-list&&prefix-list-name} in
no distribute-list { access-list-number | prefix-list&&prefix-list-name} in
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && &4-21 /OSPF
distribute-list { access-list-number| prefix-list&&prefix-list-name} out [ protocol ]
no distribute-list { access-list-number| prefix-list&&prefix-list-name} out [protocol ]
“”“”
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && &&&4-22 OSPF
show ip ospf
show ip ospf cumulative
show ip ospf database
show ip ospf database external
show ip ospf neighbor
show ip ospf nexthop
show ip ospf routing
show ip ospf virtual-links
show ip ospf request-lists
show ip ospf retrans-list
show ip ospf border-routers
show ip ospf interface
show ip ospf error
debug ip ospf event
debug ip ospf lsa-generation
debug ip ospf packet
debug ip ospf spf
(1)& && &&&OSPF
Quidway(config)# show ip ospf
RouterID: 0.0.0.1& && & Border Router: Area
Routing preference:& & Inter/Intra: 10& &&&External: 150
Default ASE parametres:& & Metric: 1& & Tag: 0.0.0.1& &&&Type: 2
SPF computation count: 73
Area 0.0.0.0:
& & Authtype: none& &&&Flags: &&
& &&&SPF scheduled: &&
& &&&Interface: 10.10.0.2 --& 10.10.0.1
& & Cost: 10& && & State: P To P& &&&Type: PointToPoint
& &&&Priority: 1&&
& &&&DoNotAge Lsa Allowed&&
& &&&Timers:& &Hello 10,& &Dead 40,& & Poll 0,& & Retransmit 5
Area 0.0.0.1:
& &&&Authtype: none& &&&Flags: &&
& &&&SPF scheduled: &&
& &&&Interface: 10.110.10.1 (VlanIf100)& &
& &&&Cost: 10& && & State: DR& && &&&Type: Broadcast
& &&&Priority: 1& && &
& &&&Designated Router: 10.110.10.1& &
& &&&DoNotAge Lsa Allowed&&
& &&&Timers: Hello 10,& & Dead 40,& &Poll 0,& &Retransmit 5
(2)& && &&&OSPF
Quidway(config)# show ip ospf database
Link State Database
Area: 0.0.0.0
TypeLink StateID AdvRouter&&Age& &Len&&Sequence&&Metric& &Where
Stub 10.10.0.0& &0.0.0.1& &&&388& &24& &0& && && &&&0& && && &SpfTree
Rtr& &0.0.0.1& &&&0.0.0.1& &&&362& &48& &8000002f& &0& && && &SpfTree
Rtr& &0.0.0.2& &&&0.0.0.2& &&&389& &48& &8000002e& &0& && && &SpfTree
SNet 10.110.0.0&&0.0.0.1& &&&193& &28& && &10& && & Inter List
Area: 0.0.0.1
TypeLink StateID AdvRouter Age& &Len& & Sequence& &Metric&&Where& &
Stub 10.110.0.0&&0.0.0.1& & 2074&&24& && &0& && && & 0& && && &SpfTree
Rtr& &0.0.0.1& &&&0.0.0.1& & 363& &36& && && && && &SpfTree
SNet&&10.10.0.0&&0.0.0.1& & 193& &28& && && && &&&Inter List
ASB& &0.0.0.2& &&&0.0.0.1& & 193& &28& && && && &&&SumAsb List
AS External Database
TypeLinkStateID&&AdvRouter Age&&Len& &Sequence& & Metric& &Where
ASE&&2.2.0.0& && &0.0.0.2& & 278&&36& & & & 1& && && &initialized
(3)& && &&&OSPF
Quidway(config)# show ip ospf neighbor
Area 0& && && &interface 10.10.0.2's neighbors
RouterID:& && &0.0.0.2& && && & Address: 10.10.0.1
State: Full& & Mode: Slave& &&&Priority: 1
DR: None& && & BDR: None
Last Hello: 1:11:25& && && && &Last Exchange: 55:35
OSPFOSPFOSPF
(4)& && &&&OSPF
Quidway(config)# show ip ospf routing
RoutingforNetwork
Destination& &Cost& & Type& && &NextHop& && & AdvRouter& &&&Area
10.110.0.0& & 10& && & Stub& &&&10.110.10.1& &0.0.0.1& && & 1&&
10.10.0.0& &&&10& && & Stub& &&&10.10.0.1& && &0.0.0.1& && & 0
Routing for ASEs
Destination& &Cost& &Type&&Tag& & NextHop& &&&AdvRotue& && && && &
2.2.0.0& && &&&1& && &2& &&&1& && &10.10.0.1& &0.0.0.2& && && && && &
Total Nets: 2&&
Intra Area: 2& & Inter Area: 0& & ASE: 1
4.4.1&&OSPFDR
OSPFS3526 A100S3526 ADRS3526 C2BDRS3526 B0DRS3526 D1
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && &4-1 OSPFDR
(1)& && &&&S3526A
S3526A(config)# interface vlan-interface 1
S3526A(config-VLAN-Interface1)# ip address 192.1.1.1 255.255.255.0
S3526A(config-VLAN-Interface1)# ip ospf priority 100
S3526A(config)# router id 1.1.1.1
S3526A(config)# router ospf
S3526A(config-router-ospf)# network 192.1.1.0 0.0.0.255 area 0
(2)& && &&&S3526B
S3526B(config)# interface vlan-interface 2000
S3526B(config-VLAN-Interface2000)# ip address 192.1.1.2 255.255.255.0
S3526B(config-VLAN-Interface2000)# ip ospf priority 0
S3526B(config)# router id 2.2.2.2
S3526B(config)# router ospf
S3526B(config-router-ospf)# network 192.1.1.0 0.0.0.255 area 0
(3)& && &&&S3526C
S3526C(config)# interface vlan-interface 1
S3526C(config-VLAN-Interface1)# ip address 192.1.1.3 255.255.255.0
S3526C(config-VLAN-Interface1)# ip ospf priority 2
S3526C(config)# router id 3.3.3.3
S3526C(config)# router ospf
S3526C(config-router-ospf)# network 192.1.1.0 0.0.0.255 area 0
(4)& && &&&S3526D
S3526D(config)# interface vlan-interface 1
S3526D(config-VLAN-Interface1)# ip address 192.1.1.4 255.255.255.0
S3526D(config)# router id 4.4.4.4
S3526D(config)# router ospf
S3526D(config-router-ospf)# network 192.1.1.0 0.0.0.255 area 0
S3526 Ashow ip ospf neighborOSPFS3526 A
S3526A(config)# show ip ospf neighbor
Neighbor& & pri& &State& && && && &Address& && &&&Interface
4.4.4.4& &&&1& &&&full/DRother& &&&192.1.1.4& && &GigabitEthernet2/1
3.3.3.3& &&&2& &&&full/BDR& && && & 192.1.1.3& && &GigabitEthernet2/1
2.2.2.2& &&&0& &&&full/DRother& &&&192.1.1.2& && &GigabitEthernet2/1
fullS3526 AS3526 ACDRBDRS3526 ADRS3526 CBDRDRotherDRBDR
(5)& && &&&S3526 B200
S3526B(config-VLAN-Interface2000)# ip ospf priority 200
S3526 Ashow ip ospf neighborOSPFS3526 B200DR
S3526A(config)# show ip ospf neighbor
Neighbor& &pri&&State& && && && &&&Address& && &&&Interface
4.4.4.4& & 1& && &full/DRother& &&&192.1.1.4& && &GigabitEthernet2/1
3.3.3.3& & 2& && &full/BDR& && && & 192.1.1.3& && &GigabitEthernet2/1
2.2.2.2& & 200& &full/DRother& &&&192.1.1.2& && &GigabitEthernet2/1
DRDRS3526 AS3526 Dshow ip ospf neighborBDRS3526 CDRS3526 BBDR
S3526D(config)# show ip ospf neighbor
Neighbor& &pri& & State& && && &Address& && &&&Interface
3.3.3.3& & 2& && &full/DR& && && && &192.1.1.3& && &GigabitEthernet3/1
2.2.2.2& & 200& & full/BDR& && && & 192.1.1.2& && &GigabitEthernet3/1
S3526 BDR200S3526 ABDR100DR/BDR
S3526D(config)# show ip ospf neighbor
Neighbor& & pri&&State& && && &Deadtime& &Address& && &Interface
1.1.1.1& && &100&&full/BDR& &&&00:00:33& &192.1.1.1& &GigabitEthernet3/1
3.3.3.3& && &2& & 2way/Drother 00:00:33& && &192.1.1.3& &GigabitEthernet3/1
2.2.2.2 200&&full/DR& && &00:00:30&&192.1.1.2& &GigabitEthernet3/1
4.4.2&&OSPF
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && &4-2 OSPF
(1)& && &&&S3526A
S3526A(config)# interface vlan-interface 1
S3526A(config-VLAN-Interface1)# ip address 192.1.1.1 255.255.255.0
S3526A(config)# router id 1.1.1.1
S3526A(config)# router ospf
S3526A(config-router-ospf)# network 192.1.1.0 0.0.0.255 area 0
(2)& && &&&S3526B
S3526B(config)# interface vlan-interface 7
S3526B(config-VLAN-Interface7)# ip address 192.1.1.2 255.255.255.0
S3526B(config)# interface vlan-interface 8
S3526B(config-VLAN-Interface8)# ip address 193.1.1.2 255.255.255.0
S3526B(config)# router id 2.2.2.2
S3526B(config)# router ospf
S3526B(config-router-ospf)# network 192.1.1.0 0.0.0.255 area 0
S3526B(config-router-ospf)# network 193.1.1.0 0.0.0.255 area 1
S3526B(config-router-ospf)# area 2 virtual-link 3.3.3.3
(3)& && &&&S3526C
S3526C(config)# interface vlan-interface 1
S3526C(config-VLAN-Interface1)# ip address 152.1.1.1 255.255.255.0
S3526C(config)# interface vlan-interface 2
S3526C(config-VLAN-Interface2)# ip address 193.1.1.1 255.255.255.0
S3526C(config)# router id 3.3.3.3
S3526C(config)# router ospf
S3526C(config-router-ospf)# network 193.1.1.0 0.0.0.255 area 1
S3526C (config-router-ospf)# network 152.1.1.0 0.0.0.255 area 2
S3526C(config-router-ospf)# area 1 virtual-link 2.2.2.2
4.4.3&&OSPF
MD5S3526AS3526BS3526CMD5
S3526AS3526BOSPF0S3526AS3526C11MD5
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && &4-3 OSPF
(1)& && &&&S3526A
S3526A(config)# interface vlan-interface 8
S3526A(config-VLAN-Interface8)# ip address 192.1.1.1 255.255.255.0
S3526A(config-VLAN-Interface8)# ip ospf authentication-key quidway
S3526A(config)# interface vlan-interface 2
S3526A(config-VLAN-Interface2)# ip address 193.1.1.1 255.255.255.0
S3526A(config-VLAN-Interface2)# ip ospf message-digest-key 1 md5 cisco
S3526A(config)# router id 1.1.1.1
S3526A(config)# router ospf
S3526A(config-router-ospf)# network 192.1.1.0 0.0.0.255 area 0
S3526A(config-router-ospf)# network 193.1.1.0 0.0.0.255 area 1
S3526A(config-router-ospf)# area 0 authentication
S3526A(config-router-ospf)# area 1 authentication message-digest
(2)& && &&&S3526B
S3526B(config)# interface vlan-interface 1
S3526B(config-VLAN-Interface1)# ip address 192.1.1.2 255.255.255.0
S3526B(config-VLAN-Interface1)# ip ospf authentication-key quidway
S3526B(config)# router id 2.2.2.2
S3526B(config)# router ospf
S3526B(config-router-ospf)# network 192.1.1.0 0.0.0.255 area 0
S3526B(config-router-ospf)# area 0 authentication
(3)& && &&&S3526C
S3526C(config)# interface vlan-interface 1
S3526C(config-VLAN-Interface1)# ip address 193.1.1.2 255.255.255.0
S3526C(config-VLAN-Interface1)# ip ospf message-digest-key 1 md5 cisco
S3526C(config)# router id 3.3.3.3
S3526C(config)# router ospf
S3526C(config-router-ospf)# network 193.1.1.0 0.0.0.255 area 1
S3526C(config-router-ospf)# area 1 authentication message-digest
l& && && & neighborFULLDROtherneighborFULL2 wayDRBDRFULL
show ip ospf neighbor
Quidway(config)# show ip ospf neighbor
& & Interface: 202.38.160.1& & Area: 0.0.0.2
& & Neighbors:&&
& & RouterID: 2.2.2.2& && && &Address: 202.38.160.2
& & State:FULL&&Mode: None& & Priority: 0
& & DR: 202.38.160.1&&BDR: 202.38.160.1
& & Last Hello: 14:04&&Last Exchange: 0
l& && && & pingping
l& && && & VLANOSPFshow ip ospf interfaceVLANOSPF
l& && && & VLANhello-intervaldead-intervalauthentication
l& && && & VLANdead-intervalhello-interval4
l& && && & VLAN
l& && && & AreaSTUB areaSTUB areaSTUB
l& && && & Area0
l& && && & STUB
l& && && & STUB
——RIPOSPFBGPS3500
S3500access-listprefix-list
1. access-list
access-liststandard access-listextended access-list——IPaccess-listaccess-list
2. prefix-list
prefix-listaccess-list——prefix-listprefix-listgateway
prefix-listsequence-numbersequence-numberprefix-list
sequence-numberprefix-list
l& && && &
l& && && &
l& && && &
show access-list all
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && & 5-1
access-list listnumber1 { permit | deny | match-order { config | auto } }source-addr [ source-mask ][ log ]
access-list listnumber2 { permit | deny | match-order { config | auto } } protocol source-addr source-mask [ operator port1 [ port2 ] ] dest-addr dest-mask [ operator port1 [ port2 ]| icmp-type [ icmp-code ] ] [ precedence precedence ][ tos tos ] [ log ]
ip access-list standard name [ match-order { config | auto } ] { permit | deny} { source-addr [ source-wildcard ] | any } [ log ]
ip access-list extended name [ match-order { config | auto } ]{ permit | deny } protocol source-addr source-wildcard destination destination-wildcard [ precedence precedence ] [tos tos ][ log ] [ time-range time-range-name ]
no access-list&&{ all | name [ subitem ] | listnumber [ subitem ] }
access-listACLacl
prefix-listprefix-list
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && & 5-2
ip prefix-list prefix-list-name[ seq seq-num] { permit&&| deny } network/len&&[ ge ge-value] [ le le-value ]
no ip prefix-list prefix-list-name[ permit | deny ] [ seq-number ]
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && &5-3 /
distribute-list gateway prefix-list-name in
no distribute-list gateway prefix-list-name in
distribute-list { access-list-number | prefix-list&&prefix-list-name} in
no distribute-list { access-list-number | prefix-list&&prefix-list-name} in
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && &5-4 /
distribute-list { access-list-number| prefix-list&&prefix-list-name} out [ routing-protocol ]
no distribute-list { access-list-number| prefix-list&&prefix-list-name } out [ routing-protocol]
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && &5-5 IP
show access-lists [ access-list-number ]
show ip prefix-list [ prefix-list-name ]
(1)& && &&&
Quidway(config)# show access-lists
Standard IP access list 22
deny 192.168.1.100
permit 172.20.0.0,&&wildcard bits 0.0.255.255
l& && && & S3526AS3526BOSPF
l& && && & S3526AOSPF
l& && && & S3526B——20.0.0.040.0.0.030.0.0.0
2. & && && && &
& && && && && && && & 1.1.1.1& && && && & 2.2.2.2
static 20.0.0.1/8---|@@@@@@@|-----------|@@@@@@@@|&&AREA0
& && & 30.0.0.1/8& & switchsA& && && && &switchsB
& && & 40.0.0.1/8
& && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && && & 5-1
(1)& && &S3526A
S3526A(config)# interface vlan-interface 100
S3526A(config-VLAN-Interface100)# ip address 10.0.0.1 255.0.0.0
S3526A(config)# interface vlan-interface 200
S3526A(config-VLAN-Interface200)# ip address 12.0.0.1 255.0.0.0
S3526A(config)# ip route 20.0.0.1 255.255.255.255 12.0.0.1
S3526A(config)# ip route 30.0.0.1 255.255.255.255 12.0.0.1
S3526A(config)# ip route 40.0.0.1 255.255.255.255 12.0.0.1
S3526A(config)# router id 1.1.1.1
S3526A(config)# router ospf
S3526A(config-router-ospf)# network 10.0.0.0&&255.0.0.0&&area&&0
S3526A(config-router-ospf)# redistribute static
(2)& && &S3526B
S3526B(config)# interface vlan-interface 100
S3526B(config-VLAN-Interface100)# ip address 10.0.0.2 255.0.0.0
S3526B(config)# access-list 1 deny 30.0.0.0 0.255.255.255
S3526B(config)# access-list 1 permit any
S3526B(config)# router id 2.2.2.2
S3526B(config)# router ospf
S3526B(config-router-ospf)# network 10.0.0.0&&255.0.0.0&&area&&0
S3526B(config-router-ospf)# distribute-list 1 in
permitdenydenydenypermit 0.0.0.0/0
access-listaccess-list
access-listaccess-list
喜欢该文的人也喜欢}

我要回帖

更多关于 三层交换机 vlan ospf 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信