欢 迎 光 临
's BLog
这就是我
最新公告
站点日历
最新日志
最新回复
最新留言
 日志搜索

友情链接
其他信息
·基于Linux下动态路由协议测试(四)     -|ixp2xxx 发表于 2006/1/17 15:04:00

network 3.3.3.0/24 area 0.0.0.0

 network 192.168.0.0/16 area 0.0.0.0

!

line vty

!

End

-------------------------------------------------------

R2

配置文件如下:

ospfd# show running-config

 

Current configuration:

!

hostname ospfd

password zebra

log stdout

!

!

!

interface lo

!

interface eth0

!

interface eth1

!

interface eth2

!

interface dummy0

!

router ospf

 network 2.2.2.0/24 area 0.0.0.0

 network 192.168.0.0/16 area 0.0.0.0

!

line vty

!

End

---------------------------------------------------

R3

配置如下:

ospfd# show running-config

 

Current configuration:

!

hostname ospfd

password zebra

log file /root/ospfd.log

log stdout

!

!

!

interface lo

!

interface eth0

!

interface eth1

!

interface eth2

!

interface dummy0

!

router ospf

 network 4.4.4.0/24 area 0.0.0.0

 network 192.168.0.0/16 area 0.0.0.0

!

line vty

!

End

----------------------------------------

各个运行状态如下:

R1

ospfd# show ip ospf route

============ OSPF network routing table ============

N    2.2.2.0/24            [20] area: 0.0.0.0

                           via 192.168.101.1, eth1

N    3.3.3.0/24            [10] area: 0.0.0.0

                           directly attached to eth3

N    4.4.4.0/24            [20] area: 0.0.0.0

                           via 192.168.102.2, eth2

N    192.168.100.0/30      [20] area: 0.0.0.0

                           via 192.168.101.1, eth1

                           via 192.168.102.2, eth2

N    192.168.101.0/30      [10] area: 0.0.0.0

                           directly attached to eth1

N    192.168.102.0/30      [10] area: 0.0.0.0

                           directly attached to eth2

 

============ OSPF router routing table =============

 

============ OSPF external routing table ===========

 

路由表:

bash-2.05# route -n

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

192.168.100.0   192.168.101.1   255.255.255.252 UG    20     0        0 eth1

192.168.101.0   0.0.0.0         255.255.255.252 U     0      0        0 eth1

192.168.102.0   0.0.0.0         255.255.255.252 U     0      0        0 eth2

10.0.1.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0

2.2.2.0         192.168.101.1   255.255.255.0   UG    20     0        0 eth1

3.3.3.0         0.0.0.0         255.255.255.0   U     0      0        0 eth3

4.4.4.0         192.168.102.2   255.255.255.0   UG    20     0        0 eth2

10.100.100.0    0.0.0.0         255.255.254.0   U     0      0        0 tap0

0.0.0.0         10.0.1.163      0.0.0.0         UG    0      0        0 eth0

------------------------------

R2

ospfd# sh ip ospf route

============ OSPF network routing table ============

N    2.2.2.0/24            [10] area: 0.0.0.0

                           directly attached to dummy0

N    3.3.3.0/24            [20] area: 0.0.0.0

                           via 192.168.101.2, eth2

N    4.4.4.0/24            [20] area: 0.0.0.0

                           via 192.168.100.2, eth1

N    192.168.100.0/30      [10] area: 0.0.0.0

                           directly attached to eth1

N    192.168.101.0/30      [10] area: 0.0.0.0

                           directly attached to eth2

N    192.168.102.0/30      [20] area: 0.0.0.0

                           via 192.168.100.2, eth1

                           via 192.168.101.2, eth2

 

============ OSPF router routing table =============

 

============ OSPF external routing table ===========

路由表:

 

-----------------------------------

R3

ospfd# sh ip ospf rou

============ OSPF network routing table ============

N    2.2.2.0/24            [20] area: 0.0.0.0

 

[阅读全文 | 回复(0) | 引用通告 | 编辑 | 收藏该日志]

发表评论:

    昵称:
    密码:
    主页:
    标题: