设为首页收藏本站language 语言切换
查看: 4160|回复: 12
收起左侧

[已解决] 三层交换的OSPF与vlan

[复制链接]
发表于 2013-5-3 01:03:02 | 显示全部楼层 |阅读模式
如图所示:ISPEdge 、R1、R2、SW1 、SW2各接口地址如图上所示且均运行OSPF并通告相应接口,各设备配置如下:
ISPEdge:

IPSEdge#show run
IPSEdge#show running-config
Building configuration...

Current configuration : 853 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname IPSEdge

interface Serial0/3/0
ip address 192.168.10.1 255.255.255.0
clock rate 64000
!
interface Serial0/3/1
ip address 192.168.11.1 255.255.255.0
clock rate 64000

router ospf 110
router-id 1.1.1.1
log-adjacency-changes
network 192.168.10.0 0.0.0.255 area 0
network 192.168.11.0 0.0.0.255 area 0



R1 -----:

hostname R1

spanning-tree mode pvst

interface FastEthernet0/0
ip address 192.168.13.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.14.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/3/0
ip address 192.168.10.2 255.255.255.0

router ospf 110
router-id 2.2.2.2
log-adjacency-changes
network 192.168.10.0 0.0.0.255 area 0
network 192.168.13.0 0.0.0.255 area 0
network 192.168.14.0 0.0.0.255 area 0



ip route 0.0.0.0 0.0.0.0 FastEthernet0/0 100
ip route 0.0.0.0 0.0.0.0 FastEthernet1/0 200  //此两条命令是???


R2---:

R2#show running-config
Building configuration...

Current configuration : 787 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R2

spanning-tree mode pvst

interface FastEthernet0/1
ip address 192.168.15.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/3/0
ip address 192.168.11.2 255.255.255.0

router ospf 110
router-id 3.3.3.3
log-adjacency-changes
network 192.168.11.0 0.0.0.255 area 0
network 192.168.15.0 0.0.0.255 area 0
network 192.168.16.0 0.0.0.255 area 0


ip route 0.0.0.0 0.0.0.0 FastEthernet0/0 200
ip route 0.0.0.0 0.0.0.0 FastEthernet1/0 100   //此两条命令是???



3SW1----              创建了VLAN 18 ,20,30,40,50, vtp mode sever /domain cisco

3SW1#show running-config
Building configuration...

Current configuration : 2987 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname 3SW1

ip dhcp excluded-address 192.168.20.1 192.168.20.10
ip dhcp excluded-address 192.168.30.1 192.168.30.10
ip dhcp excluded-address 192.168.40.1 192.168.40.10
ip dhcp excluded-address 192.168.50.1 192.168.50.10
!
ip dhcp pool vlan20
network 192.168.20.0 255.255.255.0
default-router 192.168.20.1
ip dhcp pool vlan30
network 192.168.30.0 255.255.255.0
default-router 192.168.30.1
ip dhcp pool vlan40
network 192.168.40.0 255.255.255.0
default-router 192.168.40.1
ip dhcp pool vlan50
network 192.168.50.0 255.255.255.0
default-router 192.168.50.1

spanning-tree mode pvst

interface FastEthernet0/1
no switchport
ip address 192.168.13.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/2
no switchport
ip address 192.168.15.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/3
channel-group 1 mode on
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/4
channel-group 1 mode on
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/5
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/6
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/7
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/8
switchport access vlan 18
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/9
switchport access vlan 18
switchport mode access
spanning-tree portfast
!

interface Port-channel 1
switchport trunk encapsulation dot1q
switchport mode trunk

interface Vlan18
ip address 192.168.18.1 255.255.255.0
!
interface Vlan20
ip address 192.168.20.1 255.255.255.0
!
interface Vlan30
ip address 192.168.30.1 255.255.255.0
!
interface Vlan40
ip address 192.168.40.1 255.255.255.0
!
interface Vlan50
ip address 192.168.50.1 255.255.255.0
!
router ospf 110
router-id 4.4.4.4
log-adjacency-changes
network 192.168.13.0 0.0.0.255 area 0
network 192.168.15.0 0.0.0.255 area 0
network 192.168.18.0 0.0.0.255 area 0
network 192.168.20.0 0.0.0.255 area 0
network 192.168.30.0 0.0.0.255 area 0
network 192.168.40.0 0.0.0.255 area 0
network 192.168.50.0 0.0.0.255 area 0


    //如果只有VLAN 1 ,VLAN 2 ,这两条命是做什么?



3SW2-----               vtp mode sever /domain cisco


3SW2#show run
3SW2#show running-config
Building configuration...

Current configuration : 2090 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname 3SW2

spanning-tree mode pvst
!
!
!
!
interface FastEthernet0/1
no switchport
ip address 192.168.16.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/2
no switchport
ip address 192.168.14.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/3
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/4
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/5
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/6
switchport trunk encapsulation dot1q
switchport mode trunk

!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2

interface Vlan18
ip address 192.168.18.2 255.255.255.0
!
interface Vlan20
ip address 192.168.20.2 255.255.255.0
!
interface Vlan30
ip address 192.168.30.2 255.255.255.0
!
interface Vlan40
ip address 192.168.40.2 255.255.255.0
!
interface Vlan50
ip address 192.168.50.2 255.255.255.0
!
router ospf 110
router-id 5.5.5.5
log-adjacency-changes
network 192.168.14.0 0.0.0.255 area 0
network 192.168.16.0 0.0.0.255 area 0
network 192.168.18.0 0.0.0.255 area 0
network 192.168.20.0 0.0.0.255 area 0
network 192.168.30.0 0.0.0.255 area 0
network 192.168.40.0 0.0.0.255 area 0
network 192.168.50.0 0.0.0.255 area 0


ip route 0.0.0.0 0.0.0.0 Vlan2 100
ip route 0.0.0.0 0.0.0.0 Vlan1 200     //如果只有VLAN 1 ,VLAN 2 ,这两条命是做什么?


3SW1上的ospf邻居关系:

3SW1#show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface2.2.2.2           1   FULL/BDR        00:00:31    192.168.13.1    FastEthernet0/13.3.3.3           1   FULL/BDR        00:00:31    192.168.15.1    FastEthernet0/25.5.5.5           1   FULL/DR         00:00:39    192.168.18.2    Vlan184.4.4.4           1   EXSTART/BDR     00:00:39    192.168.18.1    Vlan185.5.5.5           1   FULL/DR         00:00:39    192.168.20.2    Vlan204.4.4.4           1   EXSTART/BDR     00:00:39    192.168.20.1    Vlan205.5.5.5           1   FULL/DR         00:00:39    192.168.30.2    Vlan304.4.4.4           1   EXSTART/BDR     00:00:39    192.168.30.1    Vlan305.5.5.5           1   FULL/DR         00:00:39    192.168.40.2    Vlan404.4.4.4           1   EXSTART/BDR     00:00:39    192.168.40.1    Vlan405.5.5.5           1   FULL/DR         00:00:40    192.168.50.2    Vlan504.4.4.4           1   EXSTART/BDR     00:00:40    192.168.50.1    Vlan50     
各VLAN的邻居怎么是成对出现啊?



有以下几个问题请教,谢谢!

1.R1与R2中的    ip route 0.0.0.0 0.0.0.0 Vlan1 100            是做什么用的?
                 ip route 0.0.0.0 0.0.0.0 Vlan2 200  

2.3SW1与3SW2中的     ip route 0.0.0.0 0.0.0.0 Vlan2 100      有何用处???
                                 ip route 0.0.0.0 0.0.0.0 Vlan1 200

3.3SW1与3SW2中各VLAN之间的邻剧关系为何是这样的?

4.各交机机之间的链路均是trunk,为何3SW1、3SW2与SW1这三个交换机没有阻塞端口?
                                                为何3SW1、3SW2与SW2这三个交换机没有阻塞端口?
                                               为何3SW1、3SW2与SW3这三个交换机没有阻塞端口?

5.有时关闭模拟器重新启动时,3SW1与3SW2之间会显示这样的信息:

             Vlan50 from EXSTART to Down: Interface down or detached



以上问题求解,谢谢! document1.jpg
发表于 2013-5-3 06:55:07 | 显示全部楼层
回复 支持 反对

举报

发表于 2013-5-3 08:01:36 | 显示全部楼层
1.这两条命令是默认路由的命令。一般情况下,本地边界路由到ISP的路由都是默认路由。
2.OSPF的邻居关系是通过优先级比较选举出来的。
3.三层交换机的端口是3层的接口。
4.开启模拟器之后,等上一会就会好了。
回复 支持 反对

举报

发表于 2013-5-3 08:13:34 | 显示全部楼层
回复 支持 反对

举报

发表于 2013-5-3 08:36:17 | 显示全部楼层
我靠  太多了  没耐心了
回复 支持 反对

举报

发表于 2013-5-3 08:47:42 | 显示全部楼层
回复 支持 反对

举报

 楼主| 发表于 2013-5-3 09:34:39 | 显示全部楼层

1.这两条命令是在R1,R2上的,且不是指向ISP边界路由器,是指向两三层交换的

2.邻居关系,是每个vlan均有两个邻居关系    http://bbs.hh010.com/thread-276974-1-1.html

3.三层交换机的端口是3层的接口  no switchpor之后才是三层端口吧,再说我说的是三层交换与二层交换之间运行STP

4.收敛完成后还是显示以下信息:

00:06:54: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan30 from EXSTART to DOWN, Neighbor Down: Dead timer expired

00:06:54: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan30 from EXSTART to DOWN, Neighbor Down: Interface down or detached
3SW1#?
00:07:04: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan40 from EXSTART to DOWN, Neighbor Down: Dead timer expired

00:07:04: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan40 from EXSTART to DOWN, Neighbor Down: Interface down or detached

00:07:14: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan50 from EXSTART to DOWN, Neighbor Down: Dead timer expired

00:07:14: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan50 from EXSTART to DOWN, Neighbor Down: Interface down or detached

00:07:14: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan18 from EXSTART to DOWN, Neighbor Down: Dead timer expired

00:07:14: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan18 from EXSTART to DOWN, Neighbor Down: Interface down or detached

00:07:23: %OSPF-5-ADJCHG: Process 110, Nbr 5.5.5.5 on Vlan50 from LOADING to FULL, Loading Done

00:07:33: %OSPF-5-ADJCHG: Process 110, Nbr 5.5.5.5 on Vlan18 from LOADING to FULL, Loading Done

00:07:34: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan20 from EXSTART to DOWN, Neighbor Down: Dead timer expired

00:07:34: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan20 from EXSTART to DOWN, Neighbor Down: Interface down or detached

00:07:51: %OSPF-5-ADJCHG: Process 110, Nbr 5.5.5.5 on Vlan40 from LOADING to FULL, Loading Done

00:07:54: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan18 from EXSTART to DOWN, Neighbor Down: Dead timer expired

00:07:54: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan18 from EXSTART to DOWN, Neighbor Down: Interface down or detached

00:08:02: %OSPF-5-ADJCHG: Process 110, Nbr 5.5.5.5 on Vlan40 from LOADING to FULL, Loading Done

00:08:05: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan50 from EXSTART to DOWN, Neighbor Down: Dead timer expired

00:08:05: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan50 from EXSTART to DOWN, Neighbor Down: Interface down or detached

00:08:08: %OSPF-5-ADJCHG: Process 110, Nbr 5.5.5.5 on Vlan20 from LOADING to FULL, Loading Done

00:08:36: %OSPF-5-ADJCHG: Process 110, Nbr 5.5.5.5 on Vlan18 from LOADING to FULL, Loading Done

00:08:57: %OSPF-5-ADJCHG: Process 110, Nbr 5.5.5.5 on Vlan50 from LOADING to FULL, Loading Done

00:09:05: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan50 from EXSTART to DOWN, Neighbor Down: Dead timer expired

00:09:05: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan50 from EXSTART to DOWN, Neighbor Down: Interface down or detached

00:09:59: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan30 from EXSTART to DOWN, Neighbor Down: Dead timer expired

00:09:59: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan30 from EXSTART to DOWN, Neighbor Down: Interface down or detached

00:10:16: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan20 from EXSTART to DOWN, Neighbor Down: Dead timer expired

00:10:16: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan20 from EXSTART to DOWN, Neighbor Down: Interface down or detached

00:10:31: %OSPF-5-ADJCHG: Process 110, Nbr 5.5.5.5 on Vlan30 from LOADING to FULL, Loading Done

00:10:36: %OSPF-5-ADJCHG: Process 110, Nbr 5.5.5.5 on Vlan50 from LOADING to FULL, Loading Done

00:10:39: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan50 from EXSTART to DOWN, Neighbor Down: Dead timer expired

00:10:39: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan50 from EXSTART to DOWN, Neighbor Down: Interface down or detached

00:11:06: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan40 from EXSTART to DOWN, Neighbor Down: Dead timer expired

00:11:06: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan40 from EXSTART to DOWN, Neighbor Down: Interface down or detached

00:11:10: %OSPF-5-ADJCHG: Process 110, Nbr 5.5.5.5 on Vlan20 from LOADING to FULL, Loading Done

00:11:35: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan30 from EXSTART to DOWN, Neighbor Down: Dead timer expired

00:11:35: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan30 from EXSTART to DOWN, Neighbor Down: Interface down or detached

00:11:51: %OSPF-5-ADJCHG: Process 110, Nbr 5.5.5.5 on Vlan50 from LOADING to FULL, Loading Done

00:12:10: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan20 from EXSTART to DOWN, Neighbor Down: Dead timer expired

00:12:10: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan20 from EXSTART to DOWN, Neighbor Down: Interface down or detached

00:12:10: %OSPF-5-ADJCHG: Process 110, Nbr 5.5.5.5 on Vlan30 from LOADING to FULL, Loading Done

00:12:36: %OSPF-5-ADJCHG: Process 110, Nbr 5.5.5.5 on Vlan20 from LOADING to FULL, Loading Done

00:12:46: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan30 from EXSTART to DOWN, Neighbor Down: Dead timer expired

00:12:46: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan30 from EXSTART to DOWN, Neighbor Down: Interface down or detached

00:13:11: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan18 from EXSTART to DOWN, Neighbor Down: Dead timer expired

00:13:11: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan18 from EXSTART to DOWN, Neighbor Down: Interface down or detached

00:13:13: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan20 from INIT to DOWN, Neighbor Down: Dead timer expired

00:13:13: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan20 from INIT to DOWN, Neighbor Down: Interface down or detached

00:13:13: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan50 from EXSTART to DOWN, Neighbor Down: Dead timer expired

00:13:13: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan50 from EXSTART to DOWN, Neighbor Down: Interface down or detached

00:13:17: %OSPF-5-ADJCHG: Process 110, Nbr 5.5.5.5 on Vlan30 from LOADING to FULL, Loading Done

00:13:36: %OSPF-5-ADJCHG: Process 110, Nbr 5.5.5.5 on Vlan50 from LOADING to FULL, Loading Done

00:13:56: %OSPF-5-ADJCHG: Process 110, Nbr 5.5.5.5 on Vlan20 from LOADING to FULL, Loading Done

00:13:56: %OSPF-5-ADJCHG: Process 110, Nbr 5.5.5.5 on Vlan18 from LOADING to FULL, Loading Done

00:14:07: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan50 from INIT to DOWN, Neighbor Down: Dead timer expired

00:14:07: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan50 from INIT to DOWN, Neighbor Down: Interface down or detached

00:14:18: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan30 from EXSTART to DOWN, Neighbor Down: Dead timer expired

00:14:18: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan30 from EXSTART to DOWN, Neighbor Down: Interface down or detached

00:14:21: %OSPF-5-ADJCHG: Process 110, Nbr 5.5.5.5 on Vlan50 from LOADING to FULL, Loading Done

00:14:58: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan40 from EXSTART to DOWN, Neighbor Down: Dead timer expired

00:14:58: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan40 from EXSTART to DOWN, Neighbor Down: Interface down or detached

00:15:01: %OSPF-5-ADJCHG: Process 110, Nbr 5.5.5.5 on Vlan30 from LOADING to FULL, Loading Done

00:15:14: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan18 from EXSTART to DOWN, Neighbor Down: Dead timer expired

00:15:14: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan18 from EXSTART to DOWN, Neighbor Down: Interface down or detached

00:15:27: %OSPF-5-ADJCHG: Process 110, Nbr 5.5.5.5 on Vlan40 from LOADING to FULL, Loading Done

00:15:49: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan20 from EXSTART to DOWN, Neighbor Down: Dead timer expired

00:15:49: %OSPF-5-ADJCHG: Process 110, Nbr 4.4.4.4 on Vlan20 from EXSTART to DOWN, Neighbor Down: Interface down or detached

00:15:52: %OSPF-5-ADJCHG: Process 110, Nbr 5.5.5.5 on Vlan18 from LOADING to FULL, Loading Done


回复 支持 反对

举报

发表于 2013-5-3 22:52:13 | 显示全部楼层
是不是3SW2没配etherchannel
回复 支持 反对

举报

发表于 2013-5-7 16:06:51 | 显示全部楼层
回复 支持 反对

举报

发表于 2013-5-7 16:07:02 | 显示全部楼层
回复 支持 反对

举报

发表于 2013-5-13 10:56:04 | 显示全部楼层
回复 支持 反对

举报

发表于 2014-9-28 09:58:41 | 显示全部楼层
多看下,交换的书。。。
回复 支持 反对

举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-7-12 18:34 , Processed in 0.060883 second(s), 22 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表